With Dashboard 1.0 I used this flow to set background image that seems to work no longer with Dashboard 2.0. Could someone point out where I have the error?
{
"id": "123a3abe13057c25",
"type": "inject",
"z": "a6df4c391c658bbc",
"name": "Trigger Image Load",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "00 12 * * *",
"once": true,
"onceDelay": "1",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 900,
"wires": [
[
"3de0634d2a482679"
]
]
},
{
"id": "8efe01f5a0056fa7",
"type": "file in",
"z": "a6df4c391c658bbc",
"name": "",
"filename": "/home/gesinne/Logo/gesinne.jpg",
"filenameType": "str",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 610,
"y": 900,
"wires": [
[
"515f9079f70bb618"
]
]
},
{
"id": "515f9079f70bb618",
"type": "function",
"z": "a6df4c391c658bbc",
"name": "Convert to base64",
"func": "msg.payload = Buffer.from(msg.payload).toString('base64');\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 850,
"y": 900,
"wires": [
[
"c5f4ddf9eb75d72a"
]
]
},
{
"id": "76eac3cee3ed3655",
"type": "file in",
"z": "a6df4c391c658bbc",
"name": "",
"filename": "/home/gesinne/Logo/gesinne_inicio.jpg",
"filenameType": "str",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 590,
"y": 940,
"wires": [
[
"843b0d1bf1d69263"
]
]
},
{
"id": "843b0d1bf1d69263",
"type": "function",
"z": "a6df4c391c658bbc",
"name": "Convert to base64",
"func": "msg.payload = Buffer.from(msg.payload).toString('base64');\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 850,
"y": 940,
"wires": [
[
"f93b1cb17cbba913"
]
]
},
{
"id": "3de0634d2a482679",
"type": "delay",
"z": "a6df4c391c658bbc",
"name": "",
"pauseType": "delay",
"timeout": "30",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 340,
"y": 900,
"wires": [
[
"8efe01f5a0056fa7",
"76eac3cee3ed3655"
]
]
},
{
"id": "c5f4ddf9eb75d72a",
"type": "ui-template",
"z": "a6df4c391c658bbc",
"group": "4fea4ef402f7f9de",
"page": "",
"ui": "",
"name": "Set Background Image",
"order": 4,
"width": 2,
"height": 0,
"head": "",
"format": "<style>\n #dashboard-root {\n background-image: url('data:image/jpeg;base64,{{msg.payload}}');\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n width: 100%;\n height: 100%;\n }\n .nr-dashboard-app {\n background-image: url('data:image/jpeg;base64,{{msg.payload}}');\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n }\n</style>",
"storeOutMessages": true,
"passthru": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 1120,
"y": 900,
"wires": [
[]
]
},
{
"id": "f93b1cb17cbba913",
"type": "ui-template",
"z": "a6df4c391c658bbc",
"group": "1eb81248916883dc",
"page": "",
"ui": "",
"name": "Set Background Image",
"order": 1,
"width": 0,
"height": 0,
"head": "",
"format": "<style>\n #dashboard-root {\n background-image: url('data:image/jpeg;base64,{{msg.payload}}');\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n width: 100%;\n height: 100%;\n }\n</style>\n",
"storeOutMessages": true,
"passthru": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 1120,
"y": 940,
"wires": [
[]
]
},
{
"id": "4fea4ef402f7f9de",
"type": "ui-group",
"name": "Escrituras",
"page": "a31827662386e738",
"width": 6,
"height": "1",
"order": 2,
"showTitle": true,
"className": "",
"visible": true,
"disabled": false
},
{
"id": "1eb81248916883dc",
"type": "ui-group",
"name": "Group 1",
"page": "666d17ce4d703f44",
"width": "6",
"height": "1",
"order": 1,
"showTitle": false,
"className": "",
"visible": true,
"disabled": false
},
{
"id": "a31827662386e738",
"type": "ui-page",
"name": "Registros",
"ui": "e8131e089dc51482",
"path": "/registros",
"icon": "error_outline",
"layout": "grid",
"theme": "f8ed03d03ad5243c",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 12,
"className": "registros",
"visible": "true",
"disabled": "false"
},
{
"id": "666d17ce4d703f44",
"type": "ui-page",
"name": "Inicio",
"ui": "e8131e089dc51482",
"path": "/inicio",
"icon": "dashboard",
"layout": "grid",
"theme": "f8ed03d03ad5243c",
"breakpoints": [
{
"name": "Default",
"px": "0",
"cols": "3"
},
{
"name": "Tablet",
"px": "576",
"cols": "6"
},
{
"name": "Small Desktop",
"px": "768",
"cols": "9"
},
{
"name": "Desktop",
"px": "1024",
"cols": "12"
}
],
"order": 1,
"className": "inicio",
"visible": "true",
"disabled": "false"
},
{
"id": "e8131e089dc51482",
"type": "ui-base",
"name": "My Dashboard",
"path": "/dashboard",
"appIcon": "",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"headerContent": "page",
"navigationStyle": "default",
"titleBarStyle": "default",
"showReconnectNotification": true,
"notificationDisplayTime": 5,
"showDisconnectNotification": true
},
{
"id": "f8ed03d03ad5243c",
"type": "ui-theme",
"name": "Mi tema",
"colors": {
"surface": "#ffffff",
"primary": "#0094ce",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"density": "compact",
"pagePadding": "0px",
"groupGap": "0px",
"groupBorderRadius": "0px",
"widgetGap": "0px"
}
}
]```