Při komunikaci s ModBus zařízením v NODE-RED se někdy stane, že spojení nefunguje. Nemáme jistotu, zda je problém v IP adrese, portu, unit ID, nebo samotném registru. Tento kód vám pomůže zjistit, kde je chyba.
Nabízí tři režimy, které lze spustit pomocí tlačítek:
- Skenování registrů – Prochází registry od 0 do 68835 s předem zadaným unit ID. ID si musíte nastavit přímo v kódu.
- Čtení konkrétního registru – Zadáte požadované unit ID, konkrétní registr a počet registrů ke čtení.
- Vyhledání unit ID – Máte pevně nastavený registr a hledáte unit ID, které vrací nějaká data.
Tento nástroj je rychlý pomocník, který vám pomůže najít správné hodnoty pro vaši komunikaci s ModBus zařízením.
- IP adresa zařízení musí být známá.
- Port je standardně 502 (pokud si v zařízení nevyberete jiný, např. při použití ESP8266 s ModBus knihovnou).
Druhá část kódu umožňuje načítání dat z VRM API: VRM API dokumentace.
Pro správné fungování je nutné nastavit následující proměnné:
const nVRM_site_id = fGetConfigProperty("nVRM_site_id"); // ID vaší instalace FVE
const bearerToken = fGetConfigProperty("bearerToken") || 0; // Token pro ověření
nVRM_site_id
je unikátní ID vaší instalace FVE.bearerToken
je autentizační token vašeho účtu (nelze použít token vygenerovaný na VRM portálu, protože jde o jiný typ tokenu).
Pokud nechcete řešit integraci s VRM API, můžete celý SCANNER ModBus vložit do projektu: Linea na GitHubu.
Scanner byl primárně vyvinut pro automatizaci FVE, ale lze jej použít i pro jakékoliv jiné ModBus zařízení.
[{"id":"modbus_scanner","type":"tab","label":"Modbus Scanner","disabled":false,"info":""},{"id":"0c9a30da36ac798a","type":"group","z":"modbus_scanner","name":"ModBus::Scanner","style":{"label":true},"nodes":["start_scan","scanner_function","modbus_flex","debug_node","9eeaf72014f17931","a7457aa01ebb8bb9","1311a9edda045bf5","2932e00ef4e40071","fe09435116601675","7769738e6cb4e40e","36158809f18418a9","d0536d6746dc78ed","8e9df09351fde3ba","0214af66e51076a6","faa78d874a1e1fcc","19dd2eba22865b0f","3246122662f9a090","00506b3ace2da159","e8761fecb9923309","c767dbbb4f6cbbd2","0e9de9b8a8ad6ccc","f34632e63c2cd542","263a9e370368981f","eb4495cfa12ac142","df953c796826fbca","6fedf9d1d839ebfa","309c936518eea864","f308da72aa3edf19","1b6decf62df56002","342bd838e0e32bce","ecd825df39bf9f8c","bb8faafb0997af04","0f3791c011a639f1"],"x":74,"y":119,"w":1052,"h":862},{"id":"0f3791c011a639f1","type":"debug","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":400,"wires":[]},{"id":"bb8faafb0997af04","type":"modbus-flex-getter","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Modbus Read","showStatusActivities":true,"showErrors":true,"showWarnings":true,"logIOActivities":false,"server":"96063ced72b8d332","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":true,"keepMsgProperties":true,"delayOnStart":false,"startDelayTime":"","x":660,"y":460,"wires":[["fe09435116601675"],["a7457aa01ebb8bb9"]]},{"id":"ecd825df39bf9f8c","type":"debug","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1020,"y":780,"wires":[]},{"id":"342bd838e0e32bce","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"maping VRM","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\nlet sensors = msg.payload.records.devices;\nlet mapping = {};\n\n// Prochází všechna zařízení a vytváří mapování instance → unit ID\nsensors.forEach(device => {\n if (device.name === \"Temperature sensor\") {\n let instance = device.instance;\n let customName = device.customName;\n let unitID = instance;\n let name = customName;\n mapping[instance] = unitID;\n mapping[name] = unitID;\n }\n});\n\n// Výstupem bude objekt { \"24\": 124, \"26\": 126, ... }\nmsg.payload = mapping;\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":780,"wires":[["ecd825df39bf9f8c"]]},{"id":"1b6decf62df56002","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"API widgets/TempSummaryAndGraph","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\n//definice globalních funkci\nconst fGetConfigProperty = global.get('getConfigProperty');\nconst fSetConfigProperty = global.get('setConfigProperty');\nconst getStartOfDayTimestamp = global.get('getStartOfDayTimestamp');\nconst getEndOfDayTimestamp = global.get('getEndOfDayTimestamp');\nconst intervalType = global.get('intervalType');\n\nconst nVRM_site_id = fGetConfigProperty(\"nVRM_site_id\"); //dotaz na data z globalni strukturu\nconst bearerToken = fGetConfigProperty(\"bearerToken\") || 0; //dotaz na data z globalni strukturu\n\n\nconst tStart = getStartOfDayTimestamp();\nconst tStop = getEndOfDayTimestamp();\n\n// Nastavení hlaviček a těla požadavku\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"x-authorization\": `Bearer ${bearerToken}`\n};\n\n// Nastavení parametrů dotazu\nconst params = {\n start: tStart, //\"beginning_of_day\"\n end: tStop, // \"end_of_day\"\n type: \"forecast\",\n interval: intervalType,\n //\"attributeCodes[]\": 'bs',\n //show_instance: true,\n};\n\n\n// Debugging\nif (debug) {\n node.warn(\"tStart: \" + tStart);\n node.warn(\"tStop: \" + tStop);\n}\n\n\n// Nastavení payloadu\nmsg.payload = params;\n\n// Nastavení URL pro vytvoření tokenu\nmsg.url = `https://vrmapi.victronenergy.com/v2/installations/${nVRM_site_id}/widgets/TempSummaryAndGraph`;\n\nreturn msg;\n\n// Serialize the parameters object into a URL query string\nfunction serializeParams(params) {\n return Object.keys(params)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\n .join('&');\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":940,"wires":[["c767dbbb4f6cbbd2"]]},{"id":"f308da72aa3edf19","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":170,"y":940,"wires":[["1b6decf62df56002"]]},{"id":"309c936518eea864","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":170,"y":880,"wires":[["6fedf9d1d839ebfa"]]},{"id":"6fedf9d1d839ebfa","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"API stats","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\n//definice globalních funkci\nconst fGetConfigProperty = global.get('getConfigProperty');\nconst fSetConfigProperty = global.get('setConfigProperty');\nconst getStartOfDayTimestamp = global.get('getStartOfDayTimestamp');\nconst getEndOfDayTimestamp = global.get('getEndOfDayTimestamp');\nconst intervalType = global.get('intervalType');\n\nconst nVRM_site_id = fGetConfigProperty(\"nVRM_site_id\"); //dotaz na data z globalni strukturu\nconst bearerToken = fGetConfigProperty(\"bearerToken\") || 0; //dotaz na data z globalni strukturu\n\n\nconst tStart = getStartOfDayTimestamp();\nconst tStop = getEndOfDayTimestamp();\n\n// Nastavení hlaviček a těla požadavku\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"x-authorization\": `Bearer ${bearerToken}`\n};\n\n// Nastavení parametrů dotazu\nconst params = {\n start: tStart, //\"beginning_of_day\"\n end: tStop, // \"end_of_day\"\n type: \"forecast\",\n interval: intervalType,\n //\"attributeCodes[]\": 'bs',\n //show_instance: true,\n};\n\n\n// Debugging\nif (debug) {\n node.warn(\"tStart: \" + tStart);\n node.warn(\"tStop: \" + tStop);\n}\n\n\n// Nastavení payloadu\nmsg.payload = params;\n\n// Nastavení URL pro vytvoření tokenu\nmsg.url = `https://vrmapi.victronenergy.com/v2/installations/${nVRM_site_id}/stats`;\n\nreturn msg;\n\n// Serialize the parameters object into a URL query string\nfunction serializeParams(params) {\n return Object.keys(params)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\n .join('&');\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":880,"wires":[["c767dbbb4f6cbbd2"]]},{"id":"df953c796826fbca","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"API tags","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\n//definice globalních funkci\nconst fGetConfigProperty = global.get('getConfigProperty');\nconst fSetConfigProperty = global.get('setConfigProperty');\nconst getStartOfDayTimestamp = global.get('getStartOfDayTimestamp');\nconst getEndOfDayTimestamp = global.get('getEndOfDayTimestamp');\nconst intervalType = global.get('intervalType');\n\nconst nVRM_site_id = fGetConfigProperty(\"nVRM_site_id\"); //dotaz na data z globalni strukturu\nconst bearerToken = fGetConfigProperty(\"bearerToken\") || 0; //dotaz na data z globalni strukturu\n\n\nconst tStart = getStartOfDayTimestamp();\nconst tStop = getEndOfDayTimestamp();\n\n// Nastavení hlaviček a těla požadavku\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"x-authorization\": `Bearer ${bearerToken}`\n};\n\n// Nastavení parametrů dotazu\nconst params = {\n start: tStart, //\"beginning_of_day\"\n end: tStop, // \"end_of_day\"\n type: \"forecast\",\n interval: intervalType,\n //\"attributeCodes[]\": 'bs',\n //show_instance: true,\n};\n\n\n// Debugging\nif (debug) {\n node.warn(\"tStart: \" + tStart);\n node.warn(\"tStop: \" + tStop);\n}\n\n\n// Nastavení payloadu\nmsg.payload = params;\n\n// Nastavení URL pro vytvoření tokenu\nmsg.url = `https://vrmapi.victronenergy.com/v2/installations/${nVRM_site_id}/tags`;\n\nreturn msg;\n\n// Serialize the parameters object into a URL query string\nfunction serializeParams(params) {\n return Object.keys(params)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\n .join('&');\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":820,"wires":[["c767dbbb4f6cbbd2"]]},{"id":"eb4495cfa12ac142","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":170,"y":820,"wires":[["df953c796826fbca"]]},{"id":"263a9e370368981f","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":170,"y":760,"wires":[["f34632e63c2cd542"]]},{"id":"f34632e63c2cd542","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"API diagnostics","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\n//definice globalních funkci\nconst fGetConfigProperty = global.get('getConfigProperty');\nconst fSetConfigProperty = global.get('setConfigProperty');\nconst getStartOfDayTimestamp = global.get('getStartOfDayTimestamp');\nconst getEndOfDayTimestamp = global.get('getEndOfDayTimestamp');\nconst intervalType = global.get('intervalType');\n\nconst nVRM_site_id = fGetConfigProperty(\"nVRM_site_id\"); //dotaz na data z globalni strukturu\nconst bearerToken = fGetConfigProperty(\"bearerToken\") || 0; //dotaz na data z globalni strukturu\n\n\nconst tStart = getStartOfDayTimestamp();\nconst tStop = getEndOfDayTimestamp();\n/*\ncurl --request GET \\\n --url 'https://vrmapi.victronenergy.com/v2/installations/<vase_is>/diagnostics?count=10&page=10' \\\n --header 'Content-Type: application/json' \\\n --header 'x-authorization: Bearer '\n */\n// Nastavení hlaviček a těla požadavku\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"x-authorization\": `Bearer ${bearerToken}`\n};\n\n// Nastavení parametrů dotazu\nconst params = {\n start: tStart, //\"beginning_of_day\"\n end: tStop, // \"end_of_day\"\n type: \"forecast\",\n interval: intervalType,\n //\"attributeCodes[]\": 'bs',\n //show_instance: true,\n};\n\n\n// Debugging\nif (debug) {\n node.warn(\"tStart: \" + tStart);\n node.warn(\"tStop: \" + tStop);\n}\n\n\n// Nastavení payloadu\nmsg.payload = params;\n\n// Nastavení URL pro vytvoření tokenu\n//'https://vrmapi.victronenergy.com/v2/installations/<vase_is>/diagnostics?count=10&page=10'\nmsg.url = `https://vrmapi.victronenergy.com/v2/installations/${nVRM_site_id}/diagnostics?count=10&page=10`;\n\nreturn msg;\n\n// Serialize the parameters object into a URL query string\nfunction serializeParams(params) {\n return Object.keys(params)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\n .join('&');\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":760,"wires":[["c767dbbb4f6cbbd2"]]},{"id":"0e9de9b8a8ad6ccc","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":170,"y":700,"wires":[["00506b3ace2da159"]]},{"id":"c767dbbb4f6cbbd2","type":"http request","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":650,"y":700,"wires":[["e8761fecb9923309","342bd838e0e32bce"]]},{"id":"e8761fecb9923309","type":"debug","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Data from the function node","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":960,"y":700,"wires":[]},{"id":"00506b3ace2da159","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"API system-overview","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\n//definice globalních funkci\nconst fGetConfigProperty = global.get('getConfigProperty');\nconst fSetConfigProperty = global.get('setConfigProperty');\nconst getStartOfDayTimestamp = global.get('getStartOfDayTimestamp');\nconst getEndOfDayTimestamp = global.get('getEndOfDayTimestamp');\nconst intervalType = global.get('intervalType');\n\nconst nVRM_site_id = fGetConfigProperty(\"nVRM_site_id\"); //dotaz na data z globalni strukturu\nconst bearerToken = fGetConfigProperty(\"bearerToken\") || 0; //dotaz na data z globalni strukturu\n\n\nconst tStart = getStartOfDayTimestamp();\nconst tStop = getEndOfDayTimestamp();\n/*\ncurl --request GET \\\n --url https://vrmapi.victronenergy.com/v2/installations/<install_id>/system-overview \\\n --header 'Content-Type: application/json' \\\n --header 'x-authorization: Bearer <vas_bearer_token>'\n */\n// Nastavení hlaviček a těla požadavku\nmsg.headers = {\n \"Content-Type\": \"application/json\",\n \"x-authorization\": `Bearer ${bearerToken}`\n};\n\n// Nastavení parametrů dotazu\nconst params = {\n start: tStart, //\"beginning_of_day\"\n end: tStop, // \"end_of_day\"\n type: \"forecast\",\n interval: intervalType,\n //\"attributeCodes[]\": 'bs',\n //show_instance: true,\n};\n\n\n// Debugging\nif (debug) {\n node.warn(\"tStart: \" + tStart);\n node.warn(\"tStop: \" + tStop);\n}\n\n\n// Nastavení payloadu\nmsg.payload = params;\n\n// Nastavení URL pro vytvoření tokenu\n//ttps://vrmapi.victronenergy.com/v2/installations/<install_id>/system-overview\nmsg.url = `https://vrmapi.victronenergy.com/v2/installations/${nVRM_site_id}/system-overview`;\n\nreturn msg;\n\n// Serialize the parameters object into a URL query string\nfunction serializeParams(params) {\n return Object.keys(params)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)\n .join('&');\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":700,"wires":[["c767dbbb4f6cbbd2"]]},{"id":"3246122662f9a090","type":"comment","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","info":"com.victronenergy.temperature\tProduct ID\t 3300\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t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t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ncom.victronenergy.temperature\tTemperature type\t 3303\t\ncom.victronenergy.temperature\tTemperature 3304\t\ncom.victronenergy.temperature\tTemperature status\t 3305\t\ncom.victronenergy.temperature\tHumidity\t 3306\ncom.victronenergy.temperature\tSensor battery voltage\t 3307\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n","x":160,"y":160,"wires":[]},{"id":"19dd2eba22865b0f","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Set Unit_ID","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\nlet unitId_START = 27;\nflow.set('untiID_Start', unitId_START);\nnode.status({ text: \"set complete\" });\n\n\nreturn null;\n","outputs":0,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":640,"wires":[]},{"id":"faa78d874a1e1fcc","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Set Unit_ID","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":640,"wires":[["19dd2eba22865b0f"]]},{"id":"0214af66e51076a6","type":"modbus-flex-getter","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Modbus Read","showStatusActivities":false,"showErrors":false,"showWarnings":true,"logIOActivities":false,"server":"96063ced72b8d332","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":660,"y":560,"wires":[["debug_node"],["a7457aa01ebb8bb9"]]},{"id":"8e9df09351fde3ba","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Unit ID","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\nlet unitId_START = 1;\nlet unitId_STOP = 65535;\nlet untiID_Start = flow.get('untiID_Start') || 0;\nlet start_Register = 266; // Konec skenu\nlet registerStep = 9; // Maximální čitelný blok v jednom dotazu\n\nif (untiID_Start > unitId_STOP) {\n node.status({ text: \"Scan UNIT_ID complete\" });\n return null;\n}\n\n\nmsg.payload = {\n 'fc': 4, // Read Holding Registers\n 'unitId': untiID_Start, // Dynamické Unit ID\n 'address': start_Register,\n 'quantity': registerStep\n};\n\nflow.set('untiID_Start', untiID_Start + 1);\n//node.status({ text: `Scanning ID: ${unitId}, Register: ${registerStart}` });\n\nreturn msg;\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":410,"y":560,"wires":[["0214af66e51076a6","9eeaf72014f17931"]]},{"id":"d0536d6746dc78ed","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Start Scan -> UnitID","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":210,"y":560,"wires":[["8e9df09351fde3ba"]]},{"id":"36158809f18418a9","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Constan value","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\nlet unitID = 24;\nlet address = 3304; // Zkusme o 1 menší\nlet quantity = 1; // Pokud je to string[4], potřebuješ číst 4 registry\n\nmsg.payload = { \n // value: msg.payload, \n 'fc': 3, \n 'unitid': unitID, \n 'address': address , \n 'quantity': quantity \n };\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":460,"wires":[["bb8faafb0997af04","0f3791c011a639f1"]]},{"id":"7769738e6cb4e40e","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Test","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":460,"wires":[["36158809f18418a9"]]},{"id":"fe09435116601675","type":"debug","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"output","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":910,"y":440,"wires":[]},{"id":"2932e00ef4e40071","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Reset reg.","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\nflow.set('registerStart', 0);\nnode.status({ text: \"Reset complete\" });\n\n\nreturn null;\n","outputs":0,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":430,"y":320,"wires":[]},{"id":"1311a9edda045bf5","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Reset REGISTERs","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":320,"wires":[["2932e00ef4e40071"]]},{"id":"a7457aa01ebb8bb9","type":"modbus-response","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"","registerShowMax":"130","x":930,"y":320,"wires":[]},{"id":"9eeaf72014f17931","type":"debug","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"debug 1","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":660,"y":160,"wires":[]},{"id":"debug_node","type":"debug","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Modbus Response","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":930,"y":160,"wires":[]},{"id":"modbus_flex","type":"modbus-flex-getter","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Modbus Read","showStatusActivities":false,"showErrors":false,"showWarnings":true,"logIOActivities":false,"server":"96063ced72b8d332","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":660,"y":240,"wires":[["debug_node"],["a7457aa01ebb8bb9"]]},{"id":"scanner_function","type":"function","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Registry","func":"//*****************************************************************************\n//\n// File Name : N/A\n// Title : N/A\n// Author : http://www.prochazka.zde.cz -> hacesoft 2025\n// Created : 20-02-2025, 17:01\n// Revised : 15-03-2024, 13:42\n// Version : 1.0\n// Target Platform : Node-RED\n//\n// This code is distributed under the GNU Public License\n// Všechny informace jsou zahrnuty pod GPL licenci, pokud není explicitně uveden jiný typ licence.\n// Používání těchto stránek a produktů ke komerčním účelům lze jen se souhlasem autora.\n// Všechna práva vyhrazena (c) 1997 - 2025 hacesoft.\n//\n//*****************************************************************************\n// Debugging flag\nconst debug = false; // Nastavte na true pro zapnutí debug zpráv\n\nlet unitId = 27; //Zde si nastavte ID ktere chcete skenovat\nlet registerStart = flow.get('registerStart') || 0;\nlet registerMax = 65535; // Konec skenu\nlet registerStep = 30; // Maximální čitelný blok v jednom dotazu\n\nif (registerStart > registerMax) {\n node.status({ text: \"Scan complete\" });\n return null;\n}\n\nmsg.payload = {\n 'fc': 3, // Read Holding Registers\n 'unitId': unitId, // Dynamické Unit ID\n 'address': registerStart,\n 'quantity': registerStep\n};\n\nflow.set('registerStart', registerStart + registerStep);\n//node.status({ text: `Scanning ID: ${unitId}, Register: ${registerStart}` });\n\nreturn msg;\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":240,"wires":[["modbus_flex","9eeaf72014f17931"]]},{"id":"start_scan","type":"inject","z":"modbus_scanner","g":"0c9a30da36ac798a","name":"Start Scan -> Registry","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","x":220,"y":240,"wires":[["scanner_function"]]},{"id":"96063ced72b8d332","type":"modbus-client","name":"Modbus_Scanner","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.50.200","tcpPort":502,"tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":9600,"serialDatabits":8,"serialStopbits":1,"serialParity":"none","serialConnectionDelay":100,"serialAsciiResponseStartDelimiter":"0x3A","unit_id":"","commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true,"showErrors":false,"showWarnings":true,"showLogs":true}]
Autor tohoto projektu neposkytuje žádné záruky, výslovné ani implicitní, ohledně správnosti, spolehlivosti, funkčnosti nebo vhodnosti k jakémukoli účelu. Veškeré použití tohoto softwaru, kódu, schémat, návodů, technických řešení, produktů a jakýchkoli dalších poskytnutých materiálů je na vlastní odpovědnost uživatele.
Autor nenese žádnou odpovědnost za jakékoli škody, ztráty, finanční náklady, přímé či nepřímé škody vzniklé v důsledku použití těchto materiálů, a to včetně, ale nejen, ztráty dat, poškození zařízení, výpadků systému, poruchy elektrických či jiných instalací, požárů, ztrát příjmů nebo jiných nepředvídatelných následků.
Uživatel bere na vědomí, že jakékoli úpravy, sestavování, instalace, zapojení či implementace na základě poskytnutých informací provádí výhradně na vlastní riziko. Autor neposkytuje žádné garance funkčnosti, bezpečnosti ani souladu s platnými právními normami a předpisy.
Uživatel se zavazuje, že nevyužije žádné právní kroky vůči autorovi v souvislosti s jakýmikoli škodami nebo jinými nároky vyplývajícími z používání tohoto softwaru, produktů, schémat nebo návodů. Jakékoli právní nároky vůči autorovi jsou tímto výslovně vyloučeny a nevymahatelné, a to i soudní cestou.
Použitím těchto materiálů uživatel potvrzuje svůj souhlas s výše uvedenými podmínkami. Pokud s nimi nesouhlasíte, nepoužívejte tento software, schémata, návody ani jiné poskytnuté materiály.