


File="011_fhem-nopasswd"
echo "fhem ALL=(ALL) NOPASSWD: /opt/fhem/FHEM/fhem_backup_pi.sh" >/etc/sudoers.d/$File
chmod 0440 /etc/sudoers.d/$File
Ich halte es nach wie vor für Unfug, sowohl sudo für mount und auch das Script im docker. Sowas macht man mMn außerhalb.Zitat von: Starkstrombastler am 09 Dezember 2025, 20:54:57Ich schaue mir gerne ein fertig konfiguriertes Readings-Proxy Device für den Shelly-Dimmer an und übernehme dann für den xtrachannels - Befehl.
[{"id":"cbf5417ec7d111d1","type":"tab","label":"Einzelne Readings auslesen","disabled":false,"info":"","env":[]},{"id":"f490de5e80fcb281","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read ab h40226 ","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"40226","quantity":"40","rate":"901","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":230,"y":100,"wires":[[],["52e7fc330f338088"]]},{"id":"52e7fc330f338088","type":"function","z":"cbf5417ec7d111d1","name":"Ausgabe Imported und Exported","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Create influxdb JSON\nmsg.payload = [\n [{\n \n 'M_Exported': round(uint32(40226)* scalefactor(40242), 2)/1000,\n 'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\n\nreturn msg;\n\nfunction word(address) {\n // Find the correct offset in bytes\n // ORIGINAL -> 40070 is the starting address we fetch from SolarEdge inverter\n //40226 is the starting address we fetch from SolarEdge inverter\n return (address-40226) * 2;\n}\n\nfunction scalefactor(address) {\n return Math.pow(10, buf.readInt16BE(word(address)));\n}\n\nfunction int16(address) {\n return buf.readInt16BE(word(address))\n}\n\nfunction uint16(address) {\n return buf.readUInt16BE(word(address));\n}\n\nfunction int32(address) {\n return buf.readInt32BE(word(address))\n}\n\nfunction uint32(address) {\n return buf.readUInt32BE(word(address))\n}\n\nfunction round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n} ","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":100,"wires":[["92ef9715d1c3e1cd","086c953c5babe1bd","6178295ac005168a"]]},{"id":"086c953c5babe1bd","type":"debug","z":"cbf5417ec7d111d1","name":"debug 7","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1220,"y":240,"wires":[]},{"id":"92ef9715d1c3e1cd","type":"influxdb out","z":"cbf5417ec7d111d1","influxdb":"73984c5082b24055","name":"","measurement":"SolarEdge","precision":"ms","retentionPolicy":"","database":"","retentionPolicyV18Flux":"","org":"","bucket":"","x":1170,"y":120,"wires":[]},{"id":"3fb4096723c69310","type":"comment","z":"cbf5417ec7d111d1","name":"Ab hier Automatisch -> und funktioniert in Influxdb","info":"","x":260,"y":40,"wires":[]},{"id":"581724c7cdbe9d09","type":"function","z":"cbf5417ec7d111d1","name":"Ausgabe I_AC-, I_DC-, I_Temperatur","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Create influxdb JSON\nmsg.payload = [\n [{\n // 'AC Total Current': round(uint16(40072) * scalefactor(40076), 2),\n // 'AC Current phase A': round(uint16(40073) * scalefactor(40076), 2),\n // 'AC Current phase B': round(uint16(40074) * scalefactor(40076), 2),\n // 'AC Current phase C': round(uint16(40075) * scalefactor(40076), 2),\n // 'AC Voltage phase A': round(uint16(40080) * scalefactor(40083), 2),\n // 'AC Voltage phase B': round(uint16(40081) * scalefactor(40083), 2),\n // 'AC Voltage phase C': round(uint16(40082) * scalefactor(40083), 2),\n 'I_AC Power output': round(int16(40083) * scalefactor(40084), 2),\n // 'AC Lifetimeproduction': round(uint32(40094) * scalefactor(40096), 2),\n // 'DC Current': round(uint16(40097) * scalefactor(40098), 2),\n // 'DC Voltage': round(uint16(40099) * scalefactor(40100), 2),\n 'I_DC Power input': round(int16(40100) * scalefactor(40101), 2),\n // 'Battery temp': round(int16(60828) * scalefactor(60828), 2),\n //'M_AC_Power': round(int16(40207) * scalefactor(40211), 2),\n 'I_Temp': round(int16(40103) * scalefactor(40106), 2), \n //'M_Exported': round(uint32(40226)* scalefactor(40242), 2)/1000,\n //'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n // 'Status': round(uint16(40109), 2),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;\n\nfunction word(address) {\n // Find the correct offset in bytes\n // ORIGINAL -> 40070 is the starting address we fetch from SolarEdge inverter\n //40084 is the starting address we fetch from SolarEdge inverter\n return (address-40083) * 2;\n}\n\nfunction scalefactor(address) {\n return Math.pow(10, buf.readInt16BE(word(address)));\n}\n\nfunction int16(address) {\n return buf.readInt16BE(word(address))\n}\n\nfunction uint16(address) {\n return buf.readUInt16BE(word(address));\n}\n\nfunction int32(address) {\n return buf.readInt32BE(word(address))\n}\n\nfunction uint32(address) {\n return buf.readUInt32BE(word(address))\n}\n\nfunction round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n} ","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":690,"y":160,"wires":[["086c953c5babe1bd","92ef9715d1c3e1cd"]]},{"id":"e9b9f407368a3165","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read ab h40083","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"40083","quantity":"50","rate":"601","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":230,"y":160,"wires":[[],["581724c7cdbe9d09"]]},{"id":"34a76fd7d6b5b3c1","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read nur M_AC_Power","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"40206","quantity":"20","rate":"601","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":260,"y":220,"wires":[[],["90a25693f0dbdfe5"]]},{"id":"90a25693f0dbdfe5","type":"function","z":"cbf5417ec7d111d1","name":"Ausgabe M_AC_Power","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Create influxdb JSON\nmsg.payload = [\n [{\n // 'AC Total Current': round(uint16(40072) * scalefactor(40076), 2),\n // 'AC Current phase A': round(uint16(40073) * scalefactor(40076), 2),\n // 'AC Current phase B': round(uint16(40074) * scalefactor(40076), 2),\n // 'AC Current phase C': round(uint16(40075) * scalefactor(40076), 2),\n // 'AC Voltage phase A': round(uint16(40080) * scalefactor(40083), 2),\n // 'AC Voltage phase B': round(uint16(40081) * scalefactor(40083), 2),\n // 'AC Voltage phase C': round(uint16(40082) * scalefactor(40083), 2),\n //'I_AC Power output': round(int16(40083) * scalefactor(40084), 2),\n // 'AC Lifetimeproduction': round(uint32(40094) * scalefactor(40096), 2),\n // 'DC Current': round(uint16(40097) * scalefactor(40098), 2),\n // 'DC Voltage': round(uint16(40099) * scalefactor(40100), 2),\n //'I_DC Power input': round(int16(40100) * scalefactor(40101), 2),\n // 'Battery temp': round(int16(60828) * scalefactor(60828), 2),\n 'M_AC_Power': round(int16(40206) * scalefactor(40210), 2),\n //'I_Temp': round(int16(40103) * scalefactor(40106), 2), \n //'M_Exported': round(uint32(40226)* scalefactor(40242), 2)/1000,\n //'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n // 'Status': round(uint16(40109), 2),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;\n\nfunction word(address) {\n // Find the correct offset in bytes\n // ORIGINAL -> 40070 is the starting address we fetch from SolarEdge inverter\n //40084 is the starting address we fetch from SolarEdge inverter\n return (address-40206) * 2;\n}\n\nfunction scalefactor(address) {\n return Math.pow(10, buf.readInt16BE(word(address)));\n}\n\nfunction int16(address) {\n return buf.readInt16BE(word(address))\n}\n\nfunction uint16(address) {\n return buf.readUInt16BE(word(address));\n}\n\nfunction int32(address) {\n return buf.readInt32BE(word(address))\n}\n\nfunction uint32(address) {\n return buf.readUInt32BE(word(address))\n}\n\nfunction round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n} ","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":220,"wires":[["92ef9715d1c3e1cd","086c953c5babe1bd"]]},{"id":"75431c6d6eacb061","type":"solaredge-power","z":"cbf5417ec7d111d1","site":"ae5e5b0eea24af68","interval":900,"command":"envBenefits","name":"SolarEdge-API CO2","x":150,"y":280,"wires":[["3b3211d9490dbc95"]]},{"id":"3b3211d9490dbc95","type":"function","z":"cbf5417ec7d111d1","name":"Ausgabe CO2 in JSON","func":"// Create new Buffer based on array bytes\n// const buf = Buffer.from(msg.payload.envBenefits.gasEmissionSaved);\n\n// Create influxdb JSON\nmsg.payload = [\n [{\n // 'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n 'CO2 Erspart': msg.payload.envBenefits.gasEmissionSaved.co2,\n 'Einheit': msg.payload.envBenefits.gasEmissionSaved.units,\n // 'Status': round(uint16(40109), 2),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\nreturn msg;\n\n\n//payload.envBenefits.gasEmissionSaved.co2\n//payload.envBenefits.gasEmissionSaved.units","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":280,"wires":[["92ef9715d1c3e1cd","086c953c5babe1bd","6178295ac005168a"]]},{"id":"a589a552e576e7e9","type":"solaredge-power","z":"cbf5417ec7d111d1","site":"ae5e5b0eea24af68","interval":"901","command":"currentPowerFlow","name":"Leistungs Werte","x":140,"y":340,"wires":[["cb27aa8684d2bf8e"]]},{"id":"cb27aa8684d2bf8e","type":"function","z":"cbf5417ec7d111d1","name":"Leistungswerte in JSON","func":"// Create influxdb JSON\nmsg.payload = [\n [{\n // 'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n 'Verbrauch Haus': msg.payload.siteCurrentPowerFlow.LOAD.currentPower,\n 'Leistung vom Netz': msg.payload.siteCurrentPowerFlow.GRID.currentPower,\n 'Leistung vom Dach': msg.payload.siteCurrentPowerFlow.PV.currentPower,\n 'Leistung vom Speicher': msg.payload.siteCurrentPowerFlow.STORAGE.currentPower,\n //'Einheit': msg.payload.siteCurrentPowerFlow.unit,\n // 'Status': round(uint16(40109), 2),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":340,"wires":[["92ef9715d1c3e1cd","086c953c5babe1bd"]]},{"id":"47477fe824209aca","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read nur Speicher Temp","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"62828","quantity":"4","rate":"591","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":240,"y":400,"wires":[[],["8590dfced25ab845"]]},{"id":"8590dfced25ab845","type":"buffer-parser","z":"cbf5417ec7d111d1","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"B_Average_Temp","offset":0,"length":2,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":570,"y":400,"wires":[["6d1148ec0952cb04"]]},{"id":"6d1148ec0952cb04","type":"function","z":"cbf5417ec7d111d1","name":"Wert vom ersten Feld in °C ausgeben","func":"// Create influxdb JSON\nmsg.payload = [\n [{\n 'Temperatur Speicher': msg.payload[0][0],\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":400,"wires":[["086c953c5babe1bd","92ef9715d1c3e1cd"]]},{"id":"5b84dadcefcea899","type":"buffer-parser","z":"cbf5417ec7d111d1","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"B_Speicher","offset":0,"length":2,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":550,"y":460,"wires":[["a2542dfa1d022d22"]]},{"id":"a2542dfa1d022d22","type":"function","z":"cbf5417ec7d111d1","name":"Wert vom ersten Feld in kWh ausgeben","func":"// Create influxdb JSON\nmsg.payload = [\n [{\n 'Speicher in kWh': (msg.payload[0][0]/(100)*(9.53)),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":460,"wires":[["086c953c5babe1bd","92ef9715d1c3e1cd"]]},{"id":"53ffca4b813e6db9","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read Speicher kWh","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"62852","quantity":"4","rate":"592","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":230,"y":460,"wires":[[],["5b84dadcefcea899"]]},{"id":"e8c0ca413e61e03d","type":"modbus-read","z":"cbf5417ec7d111d1","name":"Ladeleistung Speicher","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"62836","quantity":"2","rate":"603","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":180,"y":520,"wires":[[],["30c464b992dea821"]]},{"id":"30c464b992dea821","type":"buffer-parser","z":"cbf5417ec7d111d1","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"B_Speicher_Leistung","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":1,"x":490,"y":520,"wires":[["07bd8571a65798e8"]]},{"id":"07bd8571a65798e8","type":"function","z":"cbf5417ec7d111d1","name":"Ladeleistung in kW ausgeben","func":"// Create influxdb JSON\nmsg.payload = [\n [{\n 'Speicher-Leistung': (msg.payload/1000),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":520,"wires":[["92ef9715d1c3e1cd","086c953c5babe1bd"]]},{"id":"6178295ac005168a","type":"mqtt out","z":"cbf5417ec7d111d1","name":"An FHEM über MQTT","topic":"/","qos":"1","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"2d07bb701b11af6f","x":1260,"y":540,"wires":[]},{"id":"2b0aedef57239223","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read ab h40083","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"40083","quantity":"40","rate":"14901","rateUnit":"ms","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":210,"y":620,"wires":[[],["b14565a2039d9576"]]},{"id":"b14565a2039d9576","type":"function","z":"cbf5417ec7d111d1","name":"Ausgabe I_DC für Panele-Leistung","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Create influxdb JSON\nmsg.payload = [\n [{\n // 'AC Total Current': round(uint16(40072) * scalefactor(40076), 2),\n // 'AC Current phase A': round(uint16(40073) * scalefactor(40076), 2),\n // 'AC Current phase B': round(uint16(40074) * scalefactor(40076), 2),\n // 'AC Current phase C': round(uint16(40075) * scalefactor(40076), 2),\n // 'AC Voltage phase A': round(uint16(40080) * scalefactor(40083), 2),\n // 'AC Voltage phase B': round(uint16(40081) * scalefactor(40083), 2),\n // 'AC Voltage phase C': round(uint16(40082) * scalefactor(40083), 2),\n //'I_AC Power output': round(int16(40083) * scalefactor(40084), 2),\n // 'AC Lifetimeproduction': round(uint32(40094) * scalefactor(40096), 2),\n // 'DC Current': round(uint16(40097) * scalefactor(40098), 2),\n // 'DC Voltage': round(uint16(40099) * scalefactor(40100), 2),\n 'I_DC Power input': round(int16(40100) * scalefactor(40101), 2),\n // 'Battery temp': round(int16(60828) * scalefactor(60828), 2),\n //'M_AC_Power': round(int16(40207) * scalefactor(40211), 2),\n //'I_Temp': round(int16(40103) * scalefactor(40106), 2), \n //'M_Exported': round(uint32(40226)* scalefactor(40242), 2)/1000,\n //'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n // 'Status': round(uint16(40109), 2),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;\n\nfunction word(address) {\n // Find the correct offset in bytes\n // ORIGINAL -> 40070 is the starting address we fetch from SolarEdge inverter\n //40084 is the starting address we fetch from SolarEdge inverter\n return (address-40100) * 2;\n}\n\nfunction scalefactor(address) {\n return Math.pow(10, buf.readInt16BE(word(address)));\n}\n\nfunction int16(address) {\n return buf.readInt16BE(word(address))\n}\n\nfunction uint16(address) {\n return buf.readUInt16BE(word(address));\n}\n\nfunction int32(address) {\n return buf.readInt32BE(word(address))\n}\n\nfunction uint32(address) {\n return buf.readUInt32BE(word(address))\n}\n\nfunction round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n} ","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":620,"wires":[["6178295ac005168a"]]},{"id":"361ee28d58ca23cc","type":"modbus-read","z":"cbf5417ec7d111d1","name":"Ladeleistung Speicher","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"62836","quantity":"2","rate":"603","rateUnit":"s","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":240,"y":2020,"wires":[[],[]]},{"id":"eaf02e1d4bda4df8","type":"function","z":"cbf5417ec7d111d1","name":"Ladeleistung in kW ausgeben","func":"// Create influxdb JSON\nmsg.payload = [\n [{\n 'Speicher-Leistung': (msg.payload/1000),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":790,"y":2020,"wires":[[]]},{"id":"7019582fadbc3606","type":"modbus-read","z":"cbf5417ec7d111d1","name":"Ladeleistung Speicher","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"62836","quantity":"2","rate":"15000","rateUnit":"ms","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":160,"y":680,"wires":[[],["1713780cc8669038"]]},{"id":"1713780cc8669038","type":"buffer-parser","z":"cbf5417ec7d111d1","name":"","data":"payload.buffer","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"floatle","name":"B_Speicher_Leistung","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"swap16","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"value","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":1,"x":470,"y":680,"wires":[["e727796696991bfc"]]},{"id":"e727796696991bfc","type":"function","z":"cbf5417ec7d111d1","name":"Ladeleistung in kW ausgeben","func":"// Create influxdb JSON\nmsg.payload = [\n [{\n 'Speicher-Leistung': (msg.payload/1000),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":680,"wires":[["6178295ac005168a"]]},{"id":"dbc2ae1088fd4b8f","type":"comment","z":"cbf5417ec7d111d1","name":"Das hier ist zu Ermittlung der PV-Leistung vom Dach","info":"","x":250,"y":580,"wires":[]},{"id":"d4da76e4ae19e549","type":"debug","z":"cbf5417ec7d111d1","name":"debug 17","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1240,"y":700,"wires":[]},{"id":"f6aec4af334d81bc","type":"function","z":"cbf5417ec7d111d1","name":"Ausgabe M_AC für Panele-Leistung","func":"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Create influxdb JSON\nmsg.payload = [\n [{\n // 'AC Total Current': round(uint16(40072) * scalefactor(40076), 2),\n // 'AC Current phase A': round(uint16(40073) * scalefactor(40076), 2),\n // 'AC Current phase B': round(uint16(40074) * scalefactor(40076), 2),\n // 'AC Current phase C': round(uint16(40075) * scalefactor(40076), 2),\n // 'AC Voltage phase A': round(uint16(40080) * scalefactor(40083), 2),\n // 'AC Voltage phase B': round(uint16(40081) * scalefactor(40083), 2),\n // 'AC Voltage phase C': round(uint16(40082) * scalefactor(40083), 2),\n //'I_AC Power output': round(int16(40083) * scalefactor(40084), 2),\n // 'AC Lifetimeproduction': round(uint32(40094) * scalefactor(40096), 2),\n // 'DC Current': round(uint16(40097) * scalefactor(40098), 2),\n // 'DC Voltage': round(uint16(40099) * scalefactor(40100), 2),\n //'I_DC Power input': round(int16(40100) * scalefactor(40101), 2),\n // 'Battery temp': round(int16(60828) * scalefactor(60828), 2),\n 'M_AC_Power': round(int16(40207) * scalefactor(40211), 2),\n //'I_Temp': round(int16(40103) * scalefactor(40106), 2), \n //'M_Exported': round(uint32(40226)* scalefactor(40242), 2)/1000,\n //'M_Imported': round(uint32(40234)* scalefactor(40242), 2)/1000,\n // 'Status': round(uint16(40109), 2),\n \n time: new Date()\n },\n {\n inverter: '1'\n }]\n];\n\nreturn msg;\n\nfunction word(address) {\n // Find the correct offset in bytes\n // ORIGINAL -> 40070 is the starting address we fetch from SolarEdge inverter\n //40084 is the starting address we fetch from SolarEdge inverter\n return (address-40207) * 2;\n}\n\nfunction scalefactor(address) {\n return Math.pow(10, buf.readInt16BE(word(address)));\n}\n\nfunction int16(address) {\n return buf.readInt16BE(word(address))\n}\n\nfunction uint16(address) {\n return buf.readUInt16BE(word(address));\n}\n\nfunction int32(address) {\n return buf.readInt32BE(word(address))\n}\n\nfunction uint32(address) {\n return buf.readUInt32BE(word(address))\n}\n\nfunction round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n} ","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":740,"wires":[["6178295ac005168a"]]},{"id":"4ca41d67efeda56c","type":"modbus-read","z":"cbf5417ec7d111d1","name":"SolarEdge mit Modbus-Read ab h40206","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"showWarnings":true,"unitid":"1","dataType":"HoldingRegister","adr":"40206","quantity":"20","rate":"15100","rateUnit":"ms","delayOnStart":false,"enableDeformedMessages":false,"startDelayTime":"","server":"d37bdace40c5d6c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":210,"y":740,"wires":[[],["f6aec4af334d81bc"]]},{"id":"d37bdace40c5d6c7","type":"modbus-client","name":"SE10K-RWS","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.XXX.XXX","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true,"showErrors":false,"showWarnings":true,"showLogs":true},{"id":"73984c5082b24055","type":"influxdb","hostname":"127.0.0.1","port":8086,"protocol":"http","database":"solaredge","name":"Dabian-NODERED","usetls":false,"tls":"","influxdbVersion":"1.x","url":"http://localhost:8086","timeout":10,"rejectUnauthorized":true},{"id":"ae5e5b0eea24af68","type":"solaredge-power-site","siteid":"4688753","apikey":"FZHWA4ZM0FXWTVAGVNC18UK3GFC1G0WD"},{"id":"2d07bb701b11af6f","type":"mqtt-broker","name":"MD_FHEM","broker":"192.168.XXX.XXX","port":"1883","clientid":"NODERED","autoConnect":true,"usetls":false,"protocolVersion":"3","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"29552907b44054db","type":"global-config","env":[],"modules":{"node-red-contrib-modbus":"5.45.2","node-red-contrib-influxdb":"0.7.0","node-red-contrib-solaredge-power":"0.3.4","node-red-contrib-buffer-parser":"3.2.2"}}]
Zitat von: derHeimwerker am 08 Dezember 2025, 11:08:09Ich versuchen den shellyprodm2pm DIMMER mit 2 Kanälen zum Laufen zu bringenDa hat das Modul tatsächlich noch etwas Bedarf zum Nachschärfen. Bislang hat halt noch niemand danach gefragt.