From 6e9b0630bcc7e3365f4a0656388f71a9895834e0 Mon Sep 17 00:00:00 2001 From: "e.medina" Date: Wed, 10 Dec 2025 09:29:59 +0100 Subject: [PATCH] flows au bon endroit --- .devcontainer/compose.yml | 6 +- .devcontainer/devcontainer.json | 1 + .devcontainer/nodered/Dockerfile | 7 + .devcontainer/nodered/flows.json | 124 +++ .vscode/launch.json | 5 +- CMakeLists.txt | 6 +- nodered-flows/flows.json | 1378 ------------------------------ 7 files changed, 140 insertions(+), 1387 deletions(-) create mode 100644 .devcontainer/nodered/Dockerfile create mode 100644 .devcontainer/nodered/flows.json delete mode 100644 nodered-flows/flows.json diff --git a/.devcontainer/compose.yml b/.devcontainer/compose.yml index e8fb880..ad065eb 100644 --- a/.devcontainer/compose.yml +++ b/.devcontainer/compose.yml @@ -10,7 +10,7 @@ services: - dev_net nodered: - image: nodered/node-red:4.1 + build: ./nodered container_name: nodered ports: - "1880:1880" @@ -19,8 +19,7 @@ services: environment: TZ: Europe/Paris volumes: - - ./nodered-data:/data - - ./nodered-flows/flows.json:/data/flows.json + - nodered:/data rabbitmq: image: rabbitmq:4.1.4-management @@ -51,4 +50,5 @@ networks: dev_net: volumes: + nodered: rabbitmq: diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 510ad5f..91ee83f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,6 +5,7 @@ ], "service": "dev", "workspaceFolder": "/workspace", + "postStartCommand": "cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON", "customizations": { "vscode": { "settings": { diff --git a/.devcontainer/nodered/Dockerfile b/.devcontainer/nodered/Dockerfile new file mode 100644 index 0000000..c9aeb6e --- /dev/null +++ b/.devcontainer/nodered/Dockerfile @@ -0,0 +1,7 @@ +FROM nodered/node-red:4.1 + +# Installer FlowFuse Dashboard +RUN npm install --unsafe-perm @flowfuse/node-red-dashboard + +# Copier votre flux si nécessaire +COPY flows.json /data/flows.json diff --git a/.devcontainer/nodered/flows.json b/.devcontainer/nodered/flows.json new file mode 100644 index 0000000..d7a2d64 --- /dev/null +++ b/.devcontainer/nodered/flows.json @@ -0,0 +1,124 @@ +[ + { + "id": "b5dc1ebb90703c45", + "type": "ui-text", + "z": "41526b8c80d5a5f7", + "g": "cc2c8bd885d00eb5", + "group": "d7c1d71a4dcf42ce", + "order": 5, + "width": "2", + "height": "1", + "name": "", + "label": "max", + "format": "{{msg.payload}}", + "layout": "row-right", + "style": false, + "font": "", + "fontSize": 16, + "color": "#717171", + "wrapText": false, + "className": "", + "value": "payload", + "valueType": "msg", + "x": 850, + "y": 700, + "wires": [] + }, + { + "id": "d7c1d71a4dcf42ce", + "type": "ui-group", + "name": "Réservoir", + "page": "5e9c1f56ed1b2af5", + "width": 6, + "height": 1, + "order": 1, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "5e9c1f56ed1b2af5", + "type": "ui-page", + "name": "Tableau de bord", + "ui": "15f54ff2469ec593", + "path": "/page1", + "icon": "home", + "layout": "grid", + "theme": "64cdf126ed34d37d", + "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": "", + "visible": true, + "disabled": false + }, + { + "id": "15f54ff2469ec593", + "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": 1, + "showDisconnectNotification": true, + "allowInstall": false + }, + { + "id": "64cdf126ed34d37d", + "type": "ui-theme", + "name": "Default Theme", + "colors": { + "surface": "#ffffff", + "primary": "#813d9c", + "bgPage": "#eeeeee", + "groupBg": "#ffffff", + "groupOutline": "#cccccc" + }, + "sizes": { + "density": "default", + "pagePadding": "12px", + "groupGap": "12px", + "groupBorderRadius": "4px", + "widgetGap": "12px" + } + }, + { + "id": "d55adf124e9ef5ad", + "type": "global-config", + "env": [], + "modules": { + "@flowfuse/node-red-dashboard": "1.29.0" + } + } +] \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 31a8b9e..463e2c5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,10 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug geii_exporter", + "name": "Debug pompes", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/build/geii_exporter", + "program": "${workspaceFolder}/build/pompes", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", @@ -23,4 +23,3 @@ } ] } - diff --git a/CMakeLists.txt b/CMakeLists.txt index 73b9cd9..866dc7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(geii_exporter LANGUAGES CXX) +project(pompes LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -9,7 +9,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") # Executable principal -add_executable(geii_exporter +add_executable(pompes main.cpp ) @@ -45,7 +45,7 @@ find_package(prometheus-cpp REQUIRED) # ------------------------------- # Lien des bibliothèques # ------------------------------- -target_link_libraries(geii_exporter +target_link_libraries(pompes prometheus-cpp::core prometheus-cpp::pull ${CURL_LIBRARIES} diff --git a/nodered-flows/flows.json b/nodered-flows/flows.json deleted file mode 100644 index 9a15cf4..0000000 --- a/nodered-flows/flows.json +++ /dev/null @@ -1,1378 +0,0 @@ -[ - { - "id": "41526b8c80d5a5f7", - "type": "tab", - "label": "Flux 1", - "disabled": false, - "info": "", - "env": [] - }, - { - "id": "2a8407e428af559f", - "type": "group", - "z": "41526b8c80d5a5f7", - "name": "Min", - "style": { - "label": true - }, - "nodes": [ - "4b979855487fc0b1", - "3f74047aefdac05f", - "d2388fac5fea8d03", - "ba3afa8b6ed20d2b" - ], - "x": 214, - "y": 919, - "w": 552, - "h": 122 - }, - { - "id": "5ebff09bebc9865a", - "type": "group", - "z": "41526b8c80d5a5f7", - "style": { - "stroke": "#999999", - "stroke-opacity": "1", - "fill": "none", - "fill-opacity": "1", - "label": true, - "label-position": "nw", - "color": "#a4a4a4" - }, - "nodes": [ - "74df0c43c72c39fa", - "f9f217f841405293", - "0410cff39c4521c5", - "08379faee7b95178" - ], - "x": 214, - "y": 1059, - "w": 552, - "h": 122 - }, - { - "id": "12ed9a9e97b00f80", - "type": "group", - "z": "41526b8c80d5a5f7", - "style": { - "stroke": "#999999", - "stroke-opacity": "1", - "fill": "none", - "fill-opacity": "1", - "label": true, - "label-position": "nw", - "color": "#a4a4a4" - }, - "nodes": [ - "0a64cd6407eb9beb", - "74ee6826173e5cff", - "ba844710a3cd418f", - "01aa1516d332fbdb" - ], - "x": 214, - "y": 1199, - "w": 552, - "h": 122 - }, - { - "id": "cc2c8bd885d00eb5", - "type": "group", - "z": "41526b8c80d5a5f7", - "style": { - "stroke": "#999999", - "stroke-opacity": "1", - "fill": "none", - "fill-opacity": "1", - "label": true, - "label-position": "nw", - "color": "#a4a4a4" - }, - "nodes": [ - "b5dc1ebb90703c45", - "220ae50ebb21ef39", - "2af8b2907370f976", - "cb789bc9c5a12562" - ], - "x": 214, - "y": 1339, - "w": 552, - "h": 122 - }, - { - "id": "627a082dc43aa9d0", - "type": "mqtt in", - "z": "41526b8c80d5a5f7", - "name": "", - "topic": "geii/telemetry", - "qos": "2", - "datatype": "auto-detect", - "broker": "16928f30f5e1270e", - "nl": false, - "rap": true, - "rh": 0, - "inputs": 0, - "x": 70, - "y": 920, - "wires": [ - [ - "e6bbd953a6bc5b52", - "2e2332cd3bc7aba0", - "96e0876107bdfb89", - "7054bc345a349ff8", - "4eb0e47e1c97983f", - "eceee7354caa4397", - "1ba681875b5ebc3a", - "3f74047aefdac05f", - "f9f217f841405293", - "74ee6826173e5cff", - "220ae50ebb21ef39", - "df9ea9412cfc8a6d" - ] - ] - }, - { - "id": "e6bbd953a6bc5b52", - "type": "ui-gauge", - "z": "41526b8c80d5a5f7", - "name": "", - "group": "d7c1d71a4dcf42ce", - "order": 7, - "value": "$round(payload.entree,1)", - "valueType": "jsonata", - "width": 3, - "height": 3, - "gtype": "gauge-half", - "gstyle": "needle", - "title": "Entrée", - "alwaysShowTitle": false, - "floatingTitlePosition": "top-left", - "units": "units", - "icon": "", - "prefix": "", - "suffix": "", - "segments": [ - { - "from": "0", - "color": "#5cd65c", - "text": "", - "textType": "label" - }, - { - "from": "150", - "color": "#f8e45c", - "text": "", - "textType": "label" - }, - { - "from": "300", - "color": "#c061cb", - "text": "", - "textType": "label" - }, - { - "from": "450", - "color": "#ffa348", - "text": "", - "textType": "label" - } - ], - "min": 0, - "max": "640", - "sizeThickness": 16, - "sizeGap": 4, - "sizeKeyThickness": 8, - "styleRounded": true, - "styleGlow": false, - "className": "", - "x": 390, - "y": 740, - "wires": [ - [] - ] - }, - { - "id": "2e2332cd3bc7aba0", - "type": "ui-gauge", - "z": "41526b8c80d5a5f7", - "name": "", - "group": "d7c1d71a4dcf42ce", - "order": 6, - "value": "$round(payload.sortie,1)", - "valueType": "jsonata", - "width": 3, - "height": 3, - "gtype": "gauge-half", - "gstyle": "needle", - "title": "Sortie", - "alwaysShowTitle": false, - "floatingTitlePosition": "top-left", - "units": "units", - "icon": "", - "prefix": "", - "suffix": "", - "segments": [ - { - "from": "0", - "color": "#5cd65c", - "text": "", - "textType": "label" - }, - { - "from": "4", - "color": "#ffc800", - "text": "", - "textType": "label" - }, - { - "from": "7", - "color": "#ea5353", - "text": "", - "textType": "label" - } - ], - "min": 0, - "max": "150", - "sizeThickness": 16, - "sizeGap": 4, - "sizeKeyThickness": 8, - "styleRounded": true, - "styleGlow": false, - "className": "", - "x": 390, - "y": 780, - "wires": [ - [] - ] - }, - { - "id": "f4d17ca934f62db0", - "type": "ui-progress", - "z": "41526b8c80d5a5f7", - "group": "d7c1d71a4dcf42ce", - "name": "", - "label": "Tank level", - "order": 1, - "width": 0, - "height": 0, - "color": "", - "className": "", - "x": 780, - "y": 820, - "wires": [] - }, - { - "id": "96e0876107bdfb89", - "type": "change", - "z": "41526b8c80d5a5f7", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "payload.tank", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 430, - "y": 820, - "wires": [ - [ - "9145a0e552810586" - ] - ] - }, - { - "id": "9145a0e552810586", - "type": "range", - "z": "41526b8c80d5a5f7", - "minin": "0", - "maxin": "10", - "minout": "0", - "maxout": "100", - "action": "scale", - "round": false, - "property": "payload", - "name": "", - "x": 620, - "y": 820, - "wires": [ - [ - "f4d17ca934f62db0" - ] - ] - }, - { - "id": "7054bc345a349ff8", - "type": "ui-gauge", - "z": "41526b8c80d5a5f7", - "name": "", - "group": "5628ce0b7dc12431", - "order": 1, - "value": "$round(payload.pompe1,1)", - "valueType": "jsonata", - "width": 3, - "height": 3, - "gtype": "gauge-half", - "gstyle": "needle", - "title": "Pompe1", - "alwaysShowTitle": false, - "floatingTitlePosition": "top-left", - "units": "units", - "icon": "", - "prefix": "", - "suffix": "", - "segments": [ - { - "from": "0", - "color": "#5cd65c", - "text": "", - "textType": "label" - }, - { - "from": "4", - "color": "#ffc800", - "text": "", - "textType": "label" - }, - { - "from": "7", - "color": "#ea5353", - "text": "", - "textType": "label" - } - ], - "min": 0, - "max": "150", - "sizeThickness": 16, - "sizeGap": 4, - "sizeKeyThickness": 8, - "styleRounded": true, - "styleGlow": false, - "className": "", - "x": 240, - "y": 1520, - "wires": [ - [] - ] - }, - { - "id": "1ba681875b5ebc3a", - "type": "ui-gauge", - "z": "41526b8c80d5a5f7", - "name": "", - "group": "5628ce0b7dc12431", - "order": 6, - "value": "$round(payload.pompe4,1)", - "valueType": "jsonata", - "width": 3, - "height": 3, - "gtype": "gauge-half", - "gstyle": "needle", - "title": "Pompe 4", - "alwaysShowTitle": false, - "floatingTitlePosition": "top-left", - "units": "units", - "icon": "", - "prefix": "", - "suffix": "", - "segments": [ - { - "from": "0", - "color": "#5cd65c", - "text": "", - "textType": "label" - }, - { - "from": "4", - "color": "#ffc800", - "text": "", - "textType": "label" - }, - { - "from": "7", - "color": "#ea5353", - "text": "", - "textType": "label" - } - ], - "min": 0, - "max": "150", - "sizeThickness": 16, - "sizeGap": 4, - "sizeKeyThickness": 8, - "styleRounded": true, - "styleGlow": false, - "className": "", - "x": 240, - "y": 1640, - "wires": [ - [] - ] - }, - { - "id": "eceee7354caa4397", - "type": "ui-gauge", - "z": "41526b8c80d5a5f7", - "name": "", - "group": "5628ce0b7dc12431", - "order": 5, - "value": "$round(payload.pompe3,1)", - "valueType": "jsonata", - "width": 3, - "height": 3, - "gtype": "gauge-half", - "gstyle": "needle", - "title": "Pompe 3", - "alwaysShowTitle": false, - "floatingTitlePosition": "top-left", - "units": "units", - "icon": "", - "prefix": "", - "suffix": "", - "segments": [ - { - "from": "0", - "color": "#5cd65c", - "text": "", - "textType": "label" - }, - { - "from": "4", - "color": "#ffc800", - "text": "", - "textType": "label" - }, - { - "from": "7", - "color": "#ea5353", - "text": "", - "textType": "label" - } - ], - "min": 0, - "max": "150", - "sizeThickness": 16, - "sizeGap": 4, - "sizeKeyThickness": 8, - "styleRounded": true, - "styleGlow": false, - "className": "", - "x": 240, - "y": 1600, - "wires": [ - [] - ] - }, - { - "id": "4eb0e47e1c97983f", - "type": "ui-gauge", - "z": "41526b8c80d5a5f7", - "name": "", - "group": "5628ce0b7dc12431", - "order": 2, - "value": "$round(payload.pompe2,1)", - "valueType": "jsonata", - "width": 3, - "height": 3, - "gtype": "gauge-half", - "gstyle": "needle", - "title": "Pompe 2", - "alwaysShowTitle": false, - "floatingTitlePosition": "top-left", - "units": "units", - "icon": "", - "prefix": "", - "suffix": "", - "segments": [ - { - "from": "0", - "color": "#5cd65c", - "text": "", - "textType": "label" - }, - { - "from": "4", - "color": "#ffc800", - "text": "", - "textType": "label" - }, - { - "from": "7", - "color": "#ea5353", - "text": "", - "textType": "label" - } - ], - "min": 0, - "max": "150", - "sizeThickness": 16, - "sizeGap": 4, - "sizeKeyThickness": 8, - "styleRounded": true, - "styleGlow": false, - "className": "", - "x": 240, - "y": 1560, - "wires": [ - [] - ] - }, - { - "id": "4b979855487fc0b1", - "type": "ui-text", - "z": "41526b8c80d5a5f7", - "g": "2a8407e428af559f", - "group": "d7c1d71a4dcf42ce", - "order": 2, - "width": "2", - "height": "1", - "name": "", - "label": "text", - "format": "{{msg.payload}}", - "layout": "row-left", - "style": false, - "font": "", - "fontSize": 16, - "color": "#717171", - "wrapText": false, - "className": "", - "value": "payload", - "valueType": "msg", - "x": 690, - "y": 980, - "wires": [] - }, - { - "id": "74df0c43c72c39fa", - "type": "ui-text", - "z": "41526b8c80d5a5f7", - "g": "5ebff09bebc9865a", - "group": "d7c1d71a4dcf42ce", - "order": 3, - "width": "1", - "height": "1", - "name": "", - "label": "text", - "format": "{{msg.payload}}", - "layout": "row-center", - "style": false, - "font": "", - "fontSize": 16, - "color": "#717171", - "wrapText": false, - "className": "", - "value": "payload", - "valueType": "msg", - "x": 690, - "y": 1120, - "wires": [] - }, - { - "id": "0a64cd6407eb9beb", - "type": "ui-text", - "z": "41526b8c80d5a5f7", - "g": "12ed9a9e97b00f80", - "group": "d7c1d71a4dcf42ce", - "order": 4, - "width": "1", - "height": "1", - "name": "", - "label": "text", - "format": "{{msg.payload}}", - "layout": "row-center", - "style": false, - "font": "", - "fontSize": 16, - "color": "#717171", - "wrapText": false, - "className": "", - "value": "payload", - "valueType": "msg", - "x": 690, - "y": 1260, - "wires": [] - }, - { - "id": "b5dc1ebb90703c45", - "type": "ui-text", - "z": "41526b8c80d5a5f7", - "g": "cc2c8bd885d00eb5", - "group": "d7c1d71a4dcf42ce", - "order": 5, - "width": "2", - "height": "1", - "name": "", - "label": "text", - "format": "{{msg.payload}}", - "layout": "row-right", - "style": false, - "font": "", - "fontSize": 16, - "color": "#717171", - "wrapText": false, - "className": "", - "value": "payload", - "valueType": "msg", - "x": 690, - "y": 1400, - "wires": [] - }, - { - "id": "3f74047aefdac05f", - "type": "switch", - "z": "41526b8c80d5a5f7", - "g": "2a8407e428af559f", - "name": "", - "property": "payload.min", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 300, - "y": 980, - "wires": [ - [ - "d2388fac5fea8d03" - ], - [ - "ba3afa8b6ed20d2b" - ] - ] - }, - { - "id": "d2388fac5fea8d03", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "2a8407e428af559f", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🔴", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 960, - "wires": [ - [ - "4b979855487fc0b1" - ] - ] - }, - { - "id": "ba3afa8b6ed20d2b", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "2a8407e428af559f", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🟢", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1000, - "wires": [ - [ - "4b979855487fc0b1" - ] - ] - }, - { - "id": "f9f217f841405293", - "type": "switch", - "z": "41526b8c80d5a5f7", - "g": "5ebff09bebc9865a", - "name": "", - "property": "payload.low", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 300, - "y": 1120, - "wires": [ - [ - "0410cff39c4521c5" - ], - [ - "08379faee7b95178" - ] - ] - }, - { - "id": "74ee6826173e5cff", - "type": "switch", - "z": "41526b8c80d5a5f7", - "g": "12ed9a9e97b00f80", - "name": "", - "property": "payload.high", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 300, - "y": 1260, - "wires": [ - [ - "ba844710a3cd418f" - ], - [ - "01aa1516d332fbdb" - ] - ] - }, - { - "id": "220ae50ebb21ef39", - "type": "switch", - "z": "41526b8c80d5a5f7", - "g": "cc2c8bd885d00eb5", - "name": "", - "property": "payload.max", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 300, - "y": 1400, - "wires": [ - [ - "2af8b2907370f976" - ], - [ - "cb789bc9c5a12562" - ] - ] - }, - { - "id": "0410cff39c4521c5", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "5ebff09bebc9865a", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🔴", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1100, - "wires": [ - [ - "74df0c43c72c39fa" - ] - ] - }, - { - "id": "08379faee7b95178", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "5ebff09bebc9865a", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🟢", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1140, - "wires": [ - [ - "74df0c43c72c39fa" - ] - ] - }, - { - "id": "ba844710a3cd418f", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "12ed9a9e97b00f80", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🔴", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1240, - "wires": [ - [ - "0a64cd6407eb9beb" - ] - ] - }, - { - "id": "01aa1516d332fbdb", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "12ed9a9e97b00f80", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🟢", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1280, - "wires": [ - [ - "0a64cd6407eb9beb" - ] - ] - }, - { - "id": "2af8b2907370f976", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "cc2c8bd885d00eb5", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🔴", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1380, - "wires": [ - [ - "b5dc1ebb90703c45" - ] - ] - }, - { - "id": "cb789bc9c5a12562", - "type": "change", - "z": "41526b8c80d5a5f7", - "g": "cc2c8bd885d00eb5", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "🟢", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 490, - "y": 1420, - "wires": [ - [ - "b5dc1ebb90703c45" - ] - ] - }, - { - "id": "d8111b0a27868d58", - "type": "ui-button", - "z": "41526b8c80d5a5f7", - "group": "5628ce0b7dc12431", - "name": "", - "label": "Pompe 1", - "order": 3, - "width": "3", - "height": "1", - "emulateClick": false, - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "water-pump", - "iconPosition": "left", - "payload": "p1", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "buttonColor": "", - "textColor": "", - "iconColor": "", - "enableClick": true, - "enablePointerdown": false, - "pointerdownPayload": "", - "pointerdownPayloadType": "str", - "enablePointerup": false, - "pointerupPayload": "", - "pointerupPayloadType": "str", - "x": 500, - "y": 1520, - "wires": [ - [ - "816849e6aacc27a5" - ] - ] - }, - { - "id": "0d27cf86f5545bf6", - "type": "ui-button", - "z": "41526b8c80d5a5f7", - "group": "5628ce0b7dc12431", - "name": "", - "label": "Pompe 2", - "order": 4, - "width": "3", - "height": "1", - "emulateClick": false, - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "water-pump", - "iconPosition": "left", - "payload": "p2", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "buttonColor": "", - "textColor": "", - "iconColor": "", - "enableClick": true, - "enablePointerdown": false, - "pointerdownPayload": "", - "pointerdownPayloadType": "str", - "enablePointerup": false, - "pointerupPayload": "", - "pointerupPayloadType": "str", - "x": 500, - "y": 1560, - "wires": [ - [ - "816849e6aacc27a5" - ] - ] - }, - { - "id": "26a3b450d5b336de", - "type": "ui-button", - "z": "41526b8c80d5a5f7", - "group": "5628ce0b7dc12431", - "name": "", - "label": "Pompe 3", - "order": 7, - "width": "3", - "height": "1", - "emulateClick": false, - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "water-pump", - "iconPosition": "left", - "payload": "p3", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "buttonColor": "", - "textColor": "", - "iconColor": "", - "enableClick": true, - "enablePointerdown": false, - "pointerdownPayload": "", - "pointerdownPayloadType": "str", - "enablePointerup": false, - "pointerupPayload": "", - "pointerupPayloadType": "str", - "x": 500, - "y": 1600, - "wires": [ - [ - "816849e6aacc27a5" - ] - ] - }, - { - "id": "7debce7bf128d572", - "type": "ui-button", - "z": "41526b8c80d5a5f7", - "group": "5628ce0b7dc12431", - "name": "", - "label": "Pompe 4", - "order": 8, - "width": "3", - "height": "1", - "emulateClick": false, - "tooltip": "", - "color": "", - "bgcolor": "", - "className": "", - "icon": "water-pump", - "iconPosition": "left", - "payload": "p4", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "buttonColor": "", - "textColor": "", - "iconColor": "", - "enableClick": true, - "enablePointerdown": false, - "pointerdownPayload": "", - "pointerdownPayloadType": "str", - "enablePointerup": false, - "pointerupPayload": "", - "pointerupPayloadType": "str", - "x": 500, - "y": 1640, - "wires": [ - [ - "816849e6aacc27a5" - ] - ] - }, - { - "id": "816849e6aacc27a5", - "type": "mqtt out", - "z": "41526b8c80d5a5f7", - "name": "", - "topic": "geii/ordre", - "qos": "", - "retain": "", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "16928f30f5e1270e", - "x": 720, - "y": 1580, - "wires": [] - }, - { - "id": "df9ea9412cfc8a6d", - "type": "ui-chart", - "z": "41526b8c80d5a5f7", - "group": "33f2b2ce581a176c", - "name": "", - "label": "chart", - "order": 1, - "chartType": "area", - "category": "topic", - "categoryType": "msg", - "xAxisLabel": "", - "xAxisProperty": "", - "xAxisPropertyType": "timestamp", - "xAxisType": "time", - "xAxisFormat": "", - "xAxisFormatType": "auto", - "xmin": "", - "xmax": "", - "yAxisLabel": "", - "yAxisProperty": "payload.tank", - "yAxisPropertyType": "msg", - "ymin": "0", - "ymax": "10", - "bins": 10, - "action": "append", - "stackSeries": false, - "pointShape": "circle", - "pointRadius": 4, - "showLegend": true, - "removeOlder": "10", - "removeOlderUnit": "60", - "removeOlderPoints": "", - "colors": [ - "#0095ff", - "#ff0000", - "#ff7f0e", - "#2ca02c", - "#a347e1", - "#d62728", - "#ff9896", - "#9467bd", - "#c5b0d5" - ], - "textColor": [ - "#666666" - ], - "textColorDefault": true, - "gridColor": [ - "#e5e5e5" - ], - "gridColorDefault": true, - "width": 6, - "height": 8, - "className": "", - "interpolation": "linear", - "x": 390, - "y": 860, - "wires": [ - [] - ] - }, - { - "id": "16928f30f5e1270e", - "type": "mqtt-broker", - "name": "", - "broker": "rabbitmq", - "port": 1883, - "clientid": "", - "autoConnect": true, - "usetls": false, - "protocolVersion": "4", - "keepalive": 60, - "cleansession": true, - "autoUnsubscribe": true, - "birthTopic": "", - "birthQos": "0", - "birthRetain": "false", - "birthPayload": "", - "birthMsg": {}, - "closeTopic": "", - "closeQos": "0", - "closeRetain": "false", - "closePayload": "", - "closeMsg": {}, - "willTopic": "", - "willQos": "0", - "willRetain": "false", - "willPayload": "", - "willMsg": {}, - "userProps": "", - "sessionExpiry": "" - }, - { - "id": "d7c1d71a4dcf42ce", - "type": "ui-group", - "name": "Réservoir", - "page": "5e9c1f56ed1b2af5", - "width": 6, - "height": 1, - "order": 1, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "5628ce0b7dc12431", - "type": "ui-group", - "name": "Pompes", - "page": "5e9c1f56ed1b2af5", - "width": 6, - "height": 1, - "order": 2, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "33f2b2ce581a176c", - "type": "ui-group", - "name": "Level", - "page": "5e9c1f56ed1b2af5", - "width": 6, - "height": 1, - "order": 3, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "5e9c1f56ed1b2af5", - "type": "ui-page", - "name": "Tableau de bord", - "ui": "15f54ff2469ec593", - "path": "/page1", - "icon": "home", - "layout": "grid", - "theme": "64cdf126ed34d37d", - "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": "", - "visible": true, - "disabled": false - }, - { - "id": "15f54ff2469ec593", - "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": 1, - "showDisconnectNotification": true, - "allowInstall": false - }, - { - "id": "64cdf126ed34d37d", - "type": "ui-theme", - "name": "Default Theme", - "colors": { - "surface": "#ffffff", - "primary": "#813d9c", - "bgPage": "#eeeeee", - "groupBg": "#ffffff", - "groupOutline": "#cccccc" - }, - "sizes": { - "density": "default", - "pagePadding": "12px", - "groupGap": "12px", - "groupBorderRadius": "4px", - "widgetGap": "12px" - } - }, - { - "id": "1cbf5775f61d728c", - "type": "global-config", - "env": [], - "modules": { - "@flowfuse/node-red-dashboard": "1.29.0" - } - } -] \ No newline at end of file