dashboard: @flowfuse/node-red-dashboard 1.37.0
node-red: v5.0.9
[
{
"id": "cc930280cfecb5c6",
"type": "hmi-push-button",
"z": "d460d58a8e700d56",
"group": "bad8e917c7029ac1",
"name": "Tor auf",
"label": "Tor auf",
"hmiColor": "green",
"hmiSymbol": "symbol_I",
"order": 2,
"height": "2",
"width": "1",
"passthru": false,
"tooltip": "Tor öffnen",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "on",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 190,
"y": 340,
"wires": [
[
"9395e10aba411924",
"5f0bdf5823175274"
]
]
},
{
"id": "e91c72ea37387291",
"type": "hmi-push-button",
"z": "d460d58a8e700d56",
"group": "bad8e917c7029ac1",
"name": "Tor zu",
"label": "Tor zu",
"hmiColor": "red",
"hmiSymbol": "symbol_O",
"order": 2,
"height": "1",
"width": "1",
"passthru": false,
"tooltip": "Tor schließen",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "on",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 190,
"y": 380,
"wires": [
[
"5f0bdf5823175274",
"9395e10aba411924"
]
]
},
{
"id": "7237df6780f9300e",
"type": "ui-template",
"z": "d460d58a8e700d56",
"group": "bad8e917c7029ac1",
"page": "",
"ui": "",
"name": "Garagentor",
"order": 1,
"width": 0,
"height": 0,
"head": "",
"format": "\n<!-- ============================================================================\n Node-RED Dashboard 2 (FlowFuse) - ui-template, Typ \"Widget (in group)\"\n\n EINGANG: msg.payload\n false oder \"false\" = Tor wird als OFFEN dargestellt (rot)\n true oder \"true\" = Tor wird als GESCHLOSSEN dargestellt (gruen)\n alles andere / noch keine Nachricht = GESCHLOSSEN (Grundzustand)\n\n HINWEIS: Die Logik ist gegenueber der ersten Version bewusst INVERTIERT\n (siehe computed / isOpen). \"isOpen\" bedeutet hier: Status false = Tor offen.\n\n ERKLAERUNG DER GRAFIK (Kommentare stehen bewusst nur hier oben, weil der\n Code-Editor Kommentare innerhalb von <template> als Fehler markiert):\n\n svg viewBox \"0 0 240 210\"\n Internes Koordinatensystem: Ursprung links oben, 240 breit, 210 hoch\n (urspruenglich 190; die 20 Einheiten mehr schaffen Platz fuer den Text).\n\n clipPath id \"garageOpening\"\n Schneidet alles ausserhalb der Tor-Oeffnung ab, das Tor verschwindet\n beim Hochfahren also hinter dem Rahmen. Die id muss pro Seite eindeutig\n sein (bei mehreren Garagentor-Widgets je eine eigene id vergeben).\n rect x 40, y 55, width 160, height 110 = Tor-Oeffnung.\n\n Hauswand : rect x 10, y 50, 220 x 120. fill = Fuellfarbe, stroke = Rand,\n stroke-width = Randdicke.\n Dach : polygon, drei Eckpunkte links unten / Spitze / rechts unten.\n Innenraum : dunkles rect, gleiche Masse wie die Oeffnung; sichtbar, wenn\n das Tor oben ist.\n Tor : Gruppe class \"garage-door\". Per :style wird transform gesetzt:\n isOpen true = translateY(-105px), Tor faehrt 105 nach oben\n isOpen false = translateY(0px), Tor sitzt unten\n Torhoehe 110; mit -110px waere das Tor ganz verschwunden.\n Negative Werte = nach oben, positive = nach unten.\n Sicken : waagerechte lines (y1 gleich y2).\n Griff : rect mit rx 3 (Eckenradius; halbe Hoehe ergibt Pillenform).\n Torrahmen : rect mit fill \"none\", nur der Rand; liegt ueber dem Tor.\n Boden : graues rect.\n Status-Text:\n x 120 = Mitte, y 200 = Textgrundlinie (kleiner als viewBox-Hoehe 210),\n text-anchor start | middle | end, class \"garage-label\" (siehe style),\n :fill isOpen true = #d32f2f (rot), false = #2e7d32 (gruen),\n Text isOpen true = OFFEN, false = GESCHLOSSEN.\n ============================================================================ -->\n\n<template>\n <div class=\"garage-wrap\">\n <svg viewBox=\"0 0 240 210\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <clipPath id=\"garageOpening\">\n <rect x=\"40\" y=\"55\" width=\"160\" height=\"110\" />\n </clipPath>\n </defs>\n\n <rect x=\"10\" y=\"50\" width=\"220\" height=\"120\" fill=\"#d9d4c7\" stroke=\"#8a857a\" stroke-width=\"2\" />\n <polygon points=\"0,52 120,5 240,52\" fill=\"#a05a4a\" stroke=\"#6e3b30\" stroke-width=\"2\" />\n <rect x=\"40\" y=\"55\" width=\"160\" height=\"110\" fill=\"#2b2b2b\" />\n\n <g clip-path=\"url(#garageOpening)\">\n <g class=\"garage-door\" :style=\"{ transform: isOpen ? 'translateY(-105px)' : 'translateY(0px)' }\">\n <rect x=\"40\" y=\"55\" width=\"160\" height=\"110\" fill=\"#e8e8e8\" stroke=\"#999\" stroke-width=\"1\" />\n <line x1=\"40\" y1=\"82\" x2=\"200\" y2=\"82\" stroke=\"#aaa\" stroke-width=\"2\" />\n <line x1=\"40\" y1=\"110\" x2=\"200\" y2=\"110\" stroke=\"#aaa\" stroke-width=\"2\" />\n <line x1=\"40\" y1=\"137\" x2=\"200\" y2=\"137\" stroke=\"#aaa\" stroke-width=\"2\" />\n <rect x=\"108\" y=\"150\" width=\"24\" height=\"6\" rx=\"3\" fill=\"#777\" />\n </g>\n </g>\n\n <rect x=\"38\" y=\"53\" width=\"164\" height=\"114\" fill=\"none\" stroke=\"#6b665c\" stroke-width=\"4\" />\n <rect x=\"0\" y=\"170\" width=\"240\" height=\"6\" fill=\"#777\" />\n\n <text x=\"120\" y=\"200\" text-anchor=\"middle\" class=\"garage-label\" :fill=\"isOpen ? '#d32f2f' : '#2e7d32'\">\n {{ isOpen ? 'OFFEN' : 'GESCHLOSSEN' }}\n </text>\n </svg>\n </div>\n</template>\n\n<script>\n // Vue-Komponente des Widgets. \"export default\" ist von Dashboard 2 so gefordert.\n export default {\n // computed = berechnete Eigenschaft; wird bei jeder neuen Nachricht neu ausgewertet\n computed: {\n // isOpen: true = Tor offen zeichnen, false = geschlossen zeichnen\n isOpen() {\n // this.msg = letzte Nachricht am ui-template-Node (undefined, solange keine kam)\n const p = this.msg ? this.msg.payload : undefined\n\n // Urspruengliche Logik (true = offen):\n // return p === true || p === 'true'\n\n // Aktuelle Logik: false = offen\n // false / \"false\" = OFFEN\n // true / \"true\" = GESCHLOSSEN\n // undefined / sonstiges = GESCHLOSSEN (Grundzustand)\n return p === false || p === 'false'\n }\n }\n }\n</script>\n\n<style>\n /* Container: Inhalt zentriert (left | center | right) */\n .garage-wrap {\n text-align: center;\n }\n\n /* Skalierung: volle Widget-Breite, hoechstens 320px, Seitenverhaeltnis bleibt */\n .garage-wrap svg {\n width: 100%;\n max-width: 320px;\n height: auto;\n }\n\n /* Animation des Tors: transition <Eigenschaft> <Dauer> <Kurve>\n Dauer 20s = Fahrzeit (z. B. 0.5s schnell bis 30s langsam)\n Kurve: ease-in-out | linear | ease | ease-in | ease-out */\n .garage-door {\n transition: transform 20s ease-in-out;\n }\n\n /* Status-Text: font <Gewicht> <Groesse> <Familie>; Groesse skaliert mit der Grafik */\n .garage-label {\n font: bold 24px sans-serif;\n }\n</style>\n",
"noerr": 0,
"storeOutMessages": true,
"passthru": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 680,
"y": 440,
"wires": [
[]
]
},
{
"id": "bad8e917c7029ac1",
"type": "ui-group",
"name": "Garagentor",
"page": "56b8f261972defaa",
"width": "2",
"height": "2",
"order": 2,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default",
"keepLoaded": false,
"tab": ""
},
{
"id": "56b8f261972defaa",
"type": "ui-page",
"name": "Garage",
"ui": "d666b8af1ba03c14",
"path": "/page9",
"icon": "home",
"layout": "grid",
"theme": "theme_default",
"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": "",
"visible": "true",
"disabled": "false"
},
{
"id": "d666b8af1ba03c14",
"type": "ui-base",
"name": "D-79426 Seefelden",
"path": "/dashboard",
"appIcon": "",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"headerContent": "page",
"navigationStyle": "fixed",
"titleBarStyle": "fixed",
"showReconnectNotification": true,
"notificationDisplayTime": "1",
"showDisconnectNotification": true,
"allowInstall": false
},
{
"id": "theme_default",
"type": "ui-theme",
"name": "Default Theme",
"colors": {
"surface": "#ffffff",
"primary": "#0094CE",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
},
{
"id": "4991b3edd129aa7e",
"type": "global-config",
"env": [],
"modules": {
"@revolutionpi/node-red-dashboard-2-hmi": "0.0.4",
"@flowfuse/node-red-dashboard": "1.37.0"
}
}
]