Outils pour utilisateurs

Outils du site


start:esp32:nodered:heure:nr

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
start:esp32:nodered:heure:nr [2024/01/23 11:23] gerardadminstart:esp32:nodered:heure:nr [2024/01/23 11:28] (Version actuelle) gerardadmin
Ligne 36: Ligne 36:
  
 {{ :start:esp32:nodered:heure:capture_d_ecran_du_2024-01-23_11-16-41.png?direct&600 |}} {{ :start:esp32:nodered:heure:capture_d_ecran_du_2024-01-23_11-16-41.png?direct&600 |}}
 +
 +=== Code javascript ===
 +
 +Vous pouvez importer ce code javascript dans un flux Node-Red pour avoir la date et l'heure dans votre dashboard , mais vous pouvez aussi tout refaire à la main en suivant les exemples ci-dessus ...
 +
 +<code javascript Heure_PI_Node_red.json>
 +
 +[
 +    {
 +        "id": "35ba45dfea2add23",
 +        "type": "moment",
 +        "z": "cd6db7a86b3ae202",
 +        "name": "Format date",
 +        "topic": "",
 +        "input": "",
 +        "inputType": "date",
 +        "inTz": "Europe/Paris",
 +        "adjAmount": "0",
 +        "adjType": "hours",
 +        "adjDir": "add",
 +        "format": "DD - MM - YYYY",
 +        "locale": "fr-FR",
 +        "output": "mytime",
 +        "outputType": "msg",
 +        "outTz": "Europe/Paris",
 +        "x": 530,
 +        "y": 140,
 +        "wires": [
 +            [
 +                "e5b65527ac9c319f"
 +            ]
 +        ]
 +    },
 +    {
 +        "id": "e5b65527ac9c319f",
 +        "type": "ui_text",
 +        "z": "cd6db7a86b3ae202",
 +        "group": "932d398289bfe457",
 +        "order": 23,
 +        "width": 0,
 +        "height": 0,
 +        "name": "",
 +        "label": "Date",
 +        "format": "{{msg.mytime}}",
 +        "layout": "row-spread",
 +        "className": "",
 +        "style": false,
 +        "font": "",
 +        "fontSize": 16,
 +        "color": "#000000",
 +        "x": 850,
 +        "y": 140,
 +        "wires": []
 +    },
 +    {
 +        "id": "446e81bd677607f0",
 +        "type": "inject",
 +        "z": "cd6db7a86b3ae202",
 +        "name": "",
 +        "props": [
 +            {
 +                "p": "payload"
 +            },
 +            {
 +                "p": "topic",
 +                "vt": "str"
 +            }
 +        ],
 +        "repeat": "1",
 +        "crontab": "",
 +        "once": false,
 +        "onceDelay": 0.1,
 +        "topic": "",
 +        "payload": "",
 +        "payloadType": "date",
 +        "x": 190,
 +        "y": 180,
 +        "wires": [
 +            [
 +                "35ba45dfea2add23",
 +                "6eda1c3d5cedd21b"
 +            ]
 +        ]
 +    },
 +    {
 +        "id": "70e3312fe2a2ccbb",
 +        "type": "ui_text",
 +        "z": "cd6db7a86b3ae202",
 +        "group": "932d398289bfe457",
 +        "order": 23,
 +        "width": 0,
 +        "height": 0,
 +        "name": "",
 +        "label": "Heure minutes",
 +        "format": "{{msg.mytime}}",
 +        "layout": "row-spread",
 +        "className": "",
 +        "style": false,
 +        "font": "",
 +        "fontSize": 16,
 +        "color": "#000000",
 +        "x": 860,
 +        "y": 220,
 +        "wires": []
 +    },
 +    {
 +        "id": "6eda1c3d5cedd21b",
 +        "type": "moment",
 +        "z": "cd6db7a86b3ae202",
 +        "name": "Format heures",
 +        "topic": "",
 +        "input": "",
 +        "inputType": "date",
 +        "inTz": "Europe/Paris",
 +        "adjAmount": "0",
 +        "adjType": "hours",
 +        "adjDir": "add",
 +        "format": "h - m - s ",
 +        "locale": "fr-FR",
 +        "output": "mytime",
 +        "outputType": "msg",
 +        "outTz": "Europe/Paris",
 +        "x": 540,
 +        "y": 220,
 +        "wires": [
 +            [
 +                "70e3312fe2a2ccbb"
 +            ]
 +        ]
 +    },
 +    {
 +        "id": "503ce05089ffc9a2",
 +        "type": "comment",
 +        "z": "cd6db7a86b3ae202",
 +        "name": "Noeud dans \"Commun\" ==> inject",
 +        "info": "",
 +        "x": 140,
 +        "y": 140,
 +        "wires": []
 +    },
 +    {
 +        "id": "2ace59f945371216",
 +        "type": "comment",
 +        "z": "cd6db7a86b3ae202",
 +        "name": "Noeud dans \" formats\" ==> Date/time Formatter",
 +        "info": "",
 +        "x": 500,
 +        "y": 80,
 +        "wires": []
 +    },
 +    {
 +        "id": "b38d4bc26e9e0a95",
 +        "type": "comment",
 +        "z": "cd6db7a86b3ae202",
 +        "name": "Noeud dans \" dashboard\" ==> texte",
 +        "info": "",
 +        "x": 920,
 +        "y": 80,
 +        "wires": []
 +    },
 +    {
 +        "id": "932d398289bfe457",
 +        "type": "ui_group",
 +        "name": "ESP32 ",
 +        "tab": "868039c03e1e9bab",
 +        "order": 1,
 +        "disp": true,
 +        "width": "10",
 +        "collapse": false,
 +        "className": ""
 +    },
 +    {
 +        "id": "868039c03e1e9bab",
 +        "type": "ui_tab",
 +        "name": "ESP32_802060",
 +        "icon": "dashboard",
 +        "order": 2,
 +        "disabled": false,
 +        "hidden": false
 +    }
 +]
 +</code>
  
  
  
  
/home/chanteri/www/fablab37110/data/attic/start/esp32/nodered/heure/nr.1706005406.txt.gz · Dernière modification : 2024/01/23 11:23 de gerardadmin