Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Hi Guest this is an announcement for guests !!!

Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Fichier Json utilisé dans la démo Youtube
#1
Voici le code utilisé dans la démo "https://youtu.be/DhYyicJD-Fo"
"Accès aux batteries Pylontech et ensuite démo lecture des données la domotique sous Nodered"

Disponible soit en clair ci-dessous ou alors en fichier à télécharger directement


Code :
[
    {
        "id": "c3961ef2ba359cf4",
        "type": "tab",
        "label": "démo",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "8ea84dee3f010158",
        "type": "ui_template",
        "z": "c3961ef2ba359cf4",
        "group": "16353272e83592ac",
        "name": "",
        "order": 5,
        "width": 15,
        "height": 10,
        "format": "\n<!--<pre><code id=\"shell\" class=\"language-bash bash\" ng-bind=\"msg.payload\"></code></pre>-->\n<pre><code id=\"shell\" class=\"language-bash bash\"></code></pre>\n\n<script>\n    $(document).ready(function() {\n      $('#shell').each(function(i, e) {hljs.highlightElement(e)});\n    }); \n</script>\n\n\n<script>\n(function(scope) {\n  scope.$watch('msg', function(msg) {\n    if (msg) {\n        debugger\n      $(\"#shell\").text(msg.payload);\n      $('#shell').each(function(i, e) {hljs.highlightElement(e)});\n      //$(\"#shell\").scrollTop(function() { return this.scrollHeight; });\n      $(\"#shell\").closest(\".nr-dashboard-template\").scrollTop(function() { return this.scrollHeight; });\n    }\n  });\n})(scope);\n</script>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 720,
        "y": 100,
        "wires": [
            []
        ]
    },
    {
        "id": "99256957e388dfee",
        "type": "function",
        "z": "c3961ef2ba359cf4",
        "name": "",
        "func": "if(!msg.payload) return;\n\nconst MAXLINES = 200;\nlet data = context.get(\"data\") || [];\nif(msg.topic==\"clear\") {\n    data = [];\n} else {\n    const lines = msg.payload.split(\"\\n\");\n    data.push(...lines);\n    data = data.slice(-MAXLINES);\n}\ncontext.set(\"data\", data);\nmsg.payload = data.join(\"\\n\");\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 560,
        "y": 100,
        "wires": [
            [
                "8ea84dee3f010158"
            ]
        ]
    },
    {
        "id": "eed933e69c164694",
        "type": "inject",
        "z": "c3961ef2ba359cf4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": "1",
        "topic": "",
        "payload": "coucou",
        "payloadType": "str",
        "x": 360,
        "y": 100,
        "wires": [
            [
                "99256957e388dfee"
            ]
        ]
    },
    {
        "id": "0b01bbdcfd3549e9",
        "type": "inject",
        "z": "c3961ef2ba359cf4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": "2",
        "topic": "",
        "payload": "coucou2",
        "payloadType": "str",
        "x": 388,
        "y": 139,
        "wires": [
            [
                "99256957e388dfee"
            ]
        ]
    },
    {
        "id": "6001b1b3aa334b33",
        "type": "inject",
        "z": "c3961ef2ba359cf4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": "3",
        "topic": "",
        "payload": "coucou3",
        "payloadType": "str",
        "x": 420,
        "y": 180,
        "wires": [
            [
                "99256957e388dfee"
            ]
        ]
    },
    {
        "id": "16353272e83592ac",
        "type": "ui_group",
        "name": "display",
        "tab": "2a33392ec021348e",
        "order": 1,
        "disp": true,
        "width": "15",
        "collapse": false,
        "className": ""
    },
    {
        "id": "2a33392ec021348e",
        "type": "ui_tab",
        "name": "Display",
        "icon": "dashboard",
        "order": 9,
        "disabled": false,
        "hidden": false
    }
]
Jean-Luc
Like Répondre


Sujets apparemment similaires…
Sujet Auteur Réponses Affichages Dernier message
  Monitorer batteries Pylontech dans Jeedom Twin 13 10,457 11-11-2023, 02:16 PM
Dernier message: jlm

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
[-]
discussions récentes
Unlock the Benefits of Using I...
Invoice templates streamline b...Aathivithyah — 01:15 PM
U4GM MLB The Show 26 Guide How...
Conquest on the USA map in MLB...Andrew736 — 11:01 AM
U4GM Monopoly go Guide Why Tea...
Teatime Treats has returned to...Andrew736 — 11:00 AM
U4GM PoE2 Chronomancer Levelin...
The Chronomancer is a tidy lea...Andrew736 — 10:59 AM
U4GM MLB The Show 26 Guide Whe...
Road to the Show can be brilli...Andrew736 — 10:57 AM
MMoexp: GTA 6 Expands Vice Cit...
Few open-world franchises have...Anselmrosseti — 09:45 AM
MMoexp: Inside PoE2’s New Chal...
The upcoming Path of Exile 2 l...Anselmrosseti — 09:35 AM
MMoexp: Diablo IV Celebrates I...
The world of Sanctuary is once...Anselmrosseti — 09:17 AM
Wallbox DYI 32 Ampères avec g...
Pour le moment je n'ai pas enc...Marco202 — 10:50 AM
Double MPTT
OK il ne redémarre que le ve...sharaid — 04:41 PM
How to Maximize Chemistry Link...
Chemistry remains one of the m...Taylorlly — 03:42 AM

[-]
Rechercher








(Advanced Search)

[-]
Who's Online
There are currently no members online.

[-]
goals
78.4% of the way to our goal of 10,000 posts!
Only 2,160 posts left to go!

[-]
Statistics
» Members: 1,030
» Latest member: Aathivithyah
» Forum threads: 867
» Forum posts: 7,840

Full Statistics

[-]
Latest Threads
Unlock the Benefits of Using Invoice Tem...
Last Post: Aathivithyah
Hier 01:15 PM
» Replies: 0
» Views: 27
U4GM MLB The Show 26 Guide How to Conque...
Last Post: Andrew736
Hier 11:01 AM
» Replies: 0
» Views: 24
U4GM Monopoly go Guide Why Teatime Treat...
Last Post: Andrew736
Hier 11:00 AM
» Replies: 0
» Views: 26
U4GM PoE2 Chronomancer Leveling and Gear...
Last Post: Andrew736
Hier 10:59 AM
» Replies: 0
» Views: 29
U4GM MLB The Show 26 Guide Where To Get ...
Last Post: Andrew736
Hier 10:57 AM
» Replies: 0
» Views: 28
MMoexp: GTA 6 Expands Vice City With Ful...
Last Post: Anselmrosseti
27-05-2026 09:45 AM
» Replies: 0
» Views: 56
MMoexp: Inside PoE2’s New Challenge Prog...
Last Post: Anselmrosseti
27-05-2026 09:35 AM
» Replies: 0
» Views: 68
MMoexp: Diablo IV Celebrates Its Biggest...
Last Post: Anselmrosseti
27-05-2026 09:17 AM
» Replies: 0
» Views: 52
Wallbox DYI 32 Ampères avec gestion dyna...
Last Post: Marco202
26-05-2026 10:50 AM
» Replies: 59
» Views: 35783
Double MPTT
Last Post: sharaid
24-05-2026 04:41 PM
» Replies: 31
» Views: 10507

>