Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
M-BUS Zähler - MEEEEEEHR Werte
#1
Question 
Liebe Helfenden und Hilfesuchenden,

wir haben hier ein nettes Häuschen der DFH und ich spiele beim Gekko mit Node-Red und QueryAPI herum. Nun wurden standardmäßig ein Energie- und ein Wärmemengenzähler bei uns verbaut, die über M-BUS mit dem Gekko verbunden sind.

Alles klar! Da gibt es ja so viele schöne Werte auf den Zählern: L1-3, Verbrauch, und und und ... aber im Gekko finde ich nur den Momentanverbrauch kumuliert - wie langweilig.

Gibt es eine Möglichkeit auch die anderen Werte aus den Zählern auszulesen, auszuwerten, weiterzuleiten (bevorzugt über die QueryAPI oder mittels MQTT zu versenden)?

Ich finde das alles recht spannend, weil wir demnächst eine PV Anlage bekommen und von zwei auf einen Zähler zurückstellen. Die PV Anlage und Einspeisung bekomme ich über den Wechselrichter heraus, Haus und Wärmepumpe über den Hauszähler. Alles hinter der Wärmepumpe ist über den M-BUS Zähler angeschlossen, weshalb ich so auf alle Verbrauchswerte kommen kann mit etwas Dreisatz. Aber die beiden Zähler können noch mehr und ich will das haben!

Danke und viele Grüße
Björn
#2
Ok, wie immer habe ich eine Lösung gefunden ... mittels MBUS Interface und NodeRed.

myGekko bleibt wieder mal hinter meinen Erwartungen bzw. Ansprüchen zurück!


Beste Grüße
Björn
#3
(20.09.2020, 23:15)Bjoern schrieb: Ok, wie immer habe ich eine Lösung gefunden ... mittels MBUS Interface und NodeRed.

Hallo Bjoern,

Zeig doch mal deine Lösung. Das interessiert mich auch :-D
An oder Aus … Geht oder geht nicht … Strom fließt oder nicht ... 1 oder 0 ....  [Bild: dodgy.png]
#4
Hi Björn,
würde mich auch interessieren. Zeig mal her, was du in NodeRed gebastelt hast.
#5
Hallo zusammen,
sehr gerne. Eigentlich ist es wirklich sehr einfach, da es nur einen sinnvollen MBUS Port gibt.

Zuerst braucht ihr ein MBUS Slave Interface: Z.B. sowas https://www.amazon.de/JOYKK-USB-zu-MBUS-...B07PDH2ZBV

Danach natürlich Node-Red und den folgenden Flow

Code:
[{"id":"2383050b.1b6a8a","type":"tab","label":"M-Bus_Dashboard","disabled":false,"info":""},{"id":"26db480e.356318","type":"mbus-out","z":"2383050b.1b6a8a","name":"","client":"9b19c7aa.2bc1c8","x":910,"y":240,"wires":[["3560bac7.87cd76","20ac2005.dc0c","5a4cd79f.a08a38"]]},{"id":"3b264764.e6f458","type":"mbus-controller","z":"2383050b.1b6a8a","name":"","client":"9b19c7aa.2bc1c8","x":511,"y":303,"wires":[["5006a870.f0be98"]]},{"id":"8a2c383e.42bb38","type":"inject","z":"2383050b.1b6a8a","name":"scan","topic":"scan","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"","x":122,"y":72,"wires":[["3b264764.e6f458"]]},{"id":"85c4a1.fa573b6","type":"inject","z":"2383050b.1b6a8a","name":"Read ID 1","topic":"getDevice","payload":"{\"address\": 1}","payloadType":"json","repeat":"","crontab":"","once":false,"x":129,"y":146,"wires":[["3b264764.e6f458"]]},{"id":"68a33a7f.0b99f4","type":"inject","z":"2383050b.1b6a8a","name":"Get Devices","topic":"getDevices","payload":"","payloadType":"str","repeat":"10","crontab":"","once":true,"x":145,"y":220,"wires":[["3b264764.e6f458"]]},{"id":"5006a870.f0be98","type":"ui_template","z":"2383050b.1b6a8a","group":"73b994b4.ed2f4c","name":"mbus-table","order":0,"width":"14","height":"10","format":"<table>\n  <tr>\n    <th>ID</th>\n    <th>Primary ID</th>\n    <th>Info</th>\n    <th>Data</th>\n    <th>Last Update</th>\n    <th>Status</th>\n  </tr>\n  <tr style=\"cursor:pointer;\" ng-click=\"showData(device)\" ng-repeat=\"(id, device) in devices\">\n    <td>{{ device.secondaryID }}</td>\n    <td>{{ device.primaryID }}</td>\n    <td ng-bind-html=\"getInfo(device)\"></td>\n    <td>{{ device.DataRecord.length }}</td>\n    <td>{{ device.lastUpdate }}</td>\n    <td>\n        <div class=\"online\" ng-style=\"{background: !device.error ? '#4CAF50' : '#f44336'}\">\n            <md-tooltip md-direction=\"bottom\">{{ device.error ? device.error : 'OK' }}</md-tooltip>\n        </div>\n    </td>\n  </tr>\n</table>\n\n<style>\ntable {\n    border-collapse: collapse;\n    width: 100%;\n}\n\nth, td{\n    text-align: left;\n    padding: 8px;\n    background-color: #f2f2f2;\n    color: black;\n}\n\nth {\n    background-color: #4CAF50;\n    color: white;\n}\n\n.online {\n\tbackground:#ff3333;\n\twidth:20px;\n\theight:20px;\n\tmargin:0 auto;\n\t-webkit-border-radius:50%;\n\t-moz-border-radius:50%;\n\tborder-radius:50%;\n}\n</style>\n\n<script>\n\n\n(function(scope) {\n    \n    scope.send({topic: 'getDevices'});\n    scope.devices = [];\n    \n    scope.showData = function(device){\n        scope.send({topic: 'deviceData', payload: device});\n    }\n    \n    scope.getInfo = function(device){\n        var text = '';\n        var info = device.SlaveInformation;\n        \n        for(key in info){\n            text += `<p><b>${key}</b>: ${info[key]}</p>`;\n        }\n        \n        return text;\n    }\n\n    scope.$watch('msg', function(data) {\n        if(data && data.topic){\n            switch(data.topic){\n                case \"getDevices\":\n                    if(data.payload && data.payload.devices)\n                        scope.devices = data.payload.devices;\n                break;\n            }\n        }\n    });\n    \n})(scope);\n\n</script>\n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":708,"y":303,"wires":[["f98cf066.26838"]]},{"id":"9a9a3544.e4dbd8","type":"inject","z":"2383050b.1b6a8a","name":"restart","topic":"restart","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"x":119,"y":108,"wires":[["3b264764.e6f458"]]},{"id":"f98cf066.26838","type":"ui_template","z":"2383050b.1b6a8a","group":"5526ec59.d64354","name":"data-table","order":0,"width":"14","height":"10","format":"<p><b>Device ID:</b> {{ID}} </p>\n\n<br>\n<br>\n\n<table>\n  <tr>\n    <th>ID</th>\n    <th>Function</th>\n    <th>Unit</th>\n    <th>Value</th>\n    <th>Timestamp</th>\n  </tr>\n  <tr ng-repeat=\"(key, data) in deviceData\">\n    <td>{{ data.id }}</td>\n    <td>{{ data.Function }}</td>\n    <td>{{ data.Unit }}</td>\n    <td>{{ data.Value }}</td>\n    <td>{{ data.Timestamp }}</td>\n  </tr>\n</table>\n\n<style>\ntable {\n    border-collapse: collapse;\n    width: 100%;\n}\n\nth, td{\n    text-align: left;\n    padding: 8px;\n    background-color: #f2f2f2;\n    color: black;\n}\n\nth {\n    background-color: #4CAF50;\n    color: white;\n}\n\n.online {\n\tbackground:#ff3333;\n\twidth:20px;\n\theight:20px;\n\tmargin:0 auto;\n\t-webkit-border-radius:50%;\n\t-moz-border-radius:50%;\n\tborder-radius:50%;\n}\n</style>\n\n<script>\n\n\n(function(scope) {\n    \n    scope.deviceData = [];\n    scope.ID = '';\n\n    scope.$watch('msg', function(data) {\n        if(data && data.topic){\n            switch(data.topic){\n                case \"deviceData\":\n                    if(data.payload){\n                        scope.deviceData = data.payload.DataRecord;\n                        scope.ID = data.payload.SlaveInformation.Id;\n                    }\n                break;\n            }\n        }\n    });\n    \n})(scope);\n\n</script>\n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":872,"y":303,"wires":[[]]},{"id":"5d31fc7c.f0dfd4","type":"inject","z":"2383050b.1b6a8a","name":"Read ID 2","topic":"getDevice","payload":"{\"address\": 2}","payloadType":"json","repeat":"","crontab":"","once":false,"x":130,"y":184,"wires":[["3b264764.e6f458"]]},{"id":"53f375ef.4863fc","type":"ui_button","z":"2383050b.1b6a8a","name":"Scan","group":"66389a81.e9a9c4","order":3,"width":"2","height":"1","passthru":false,"label":"Scan","tooltip":"","color":"","bgcolor":"","icon":"location_searching","payload":"","payloadType":"str","topic":"scan","x":97,"y":306,"wires":[["3b264764.e6f458"]]},{"id":"65ae3ad7.73ba24","type":"ui_button","z":"2383050b.1b6a8a","name":"Restart","group":"66389a81.e9a9c4","order":4,"width":"3","height":"1","passthru":false,"label":"Restart","color":"","bgcolor":"","icon":"refresh","payload":"","payloadType":"str","topic":"restart","x":107,"y":343,"wires":[["3b264764.e6f458"]]},{"id":"aa348f39.2981d","type":"ui_button","z":"2383050b.1b6a8a","name":"GetDevices","group":"66389a81.e9a9c4","order":5,"width":"3","height":"1","passthru":false,"label":"Update Devices","color":"","bgcolor":"","icon":"refresh","payload":"","payloadType":"str","topic":"getDevices","x":115,"y":380,"wires":[["3b264764.e6f458"]]},{"id":"864c6e94.272cc","type":"ui_button","z":"2383050b.1b6a8a","name":"readAddress","group":"66389a81.e9a9c4","order":2,"width":"3","height":"1","passthru":false,"label":"Read Device","color":"","bgcolor":"","icon":"","payload":"deviceID","payloadType":"flow","topic":"getDevice","x":112,"y":419,"wires":[["c38de0b9.212c9"]]},{"id":"1a42b06d.5a4d","type":"ui_text_input","z":"2383050b.1b6a8a","name":"Device_ID","label":"ID: ","group":"66389a81.e9a9c4","order":1,"width":"3","height":"1","passthru":true,"mode":"text","delay":300,"topic":"","x":559,"y":427,"wires":[["85bd4233.e1e85"]]},{"id":"85bd4233.e1e85","type":"function","z":"2383050b.1b6a8a","name":"storeID","func":"\nflow.set('deviceID', msg.payload);\n\nreturn msg;","outputs":0,"noerr":0,"x":735,"y":427,"wires":[]},{"id":"c38de0b9.212c9","type":"function","z":"2383050b.1b6a8a","name":"readAddr","func":"var data = {address: msg.payload}\n\nmsg.payload = data;\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":419,"wires":[["3b264764.e6f458"]]},{"id":"2281a89.2f0e358","type":"status","z":"2383050b.1b6a8a","name":"controller_status","scope":["3b264764.e6f458"],"x":411,"y":97,"wires":[["519b5621.fe7ae8"]]},{"id":"431b6706.3ae058","type":"status","z":"2383050b.1b6a8a","name":"mbus_status","scope":["26db480e.356318"],"x":404,"y":142,"wires":[["23137864.036ca8"]]},{"id":"519b5621.fe7ae8","type":"ui_text","z":"2383050b.1b6a8a","group":"ec712bbe.f218b8","order":0,"width":0,"height":0,"name":"controller_status","label":"Controller","format":"{{msg.status.text}}","layout":"row-spread","x":623,"y":97,"wires":[]},{"id":"23137864.036ca8","type":"ui_text","z":"2383050b.1b6a8a","group":"ec712bbe.f218b8","order":0,"width":0,"height":0,"name":"mbus_status","label":"M-Bus","format":"{{msg.status.text}}","layout":"row-spread","x":613,"y":142,"wires":[]},{"id":"3fddf09b.6bf13","type":"inject","z":"2383050b.1b6a8a","name":"setPrimary","topic":"setPrimary","payload":"{\"newAddr\":3,\"oldAddr\":2}","payloadType":"json","repeat":"","crontab":"","once":false,"x":121,"y":35,"wires":[["3b264764.e6f458"]]},{"id":"b9663b4b.981578","type":"ui_text_input","z":"2383050b.1b6a8a","name":"Old_ID","label":"Old ID","group":"66389a81.e9a9c4","order":6,"width":"3","height":"1","passthru":true,"mode":"text","delay":300,"topic":"","x":566,"y":467,"wires":[["8ed7d1d.a4fdf3"]]},{"id":"8ed7d1d.a4fdf3","type":"function","z":"2383050b.1b6a8a","name":"storeID","func":"\nflow.set('oldID', msg.payload);\n\nreturn msg;","outputs":0,"noerr":0,"x":733,"y":467,"wires":[]},{"id":"13241d46.4ae383","type":"ui_text_input","z":"2383050b.1b6a8a","name":"New_ID","label":"New ID","group":"66389a81.e9a9c4","order":7,"width":"3","height":"1","passthru":true,"mode":"text","delay":300,"topic":"","x":563,"y":507,"wires":[["1732761a.df04ca"]]},{"id":"1732761a.df04ca","type":"function","z":"2383050b.1b6a8a","name":"storeID","func":"\nflow.set('newID', msg.payload);\n\nreturn msg;","outputs":0,"noerr":0,"x":731,"y":507,"wires":[]},{"id":"bc17eb70.46ec58","type":"ui_button","z":"2383050b.1b6a8a","name":"SetPrimary","group":"66389a81.e9a9c4","order":8,"width":"3","height":"1","passthru":false,"label":"Set Primary ID","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"setPrimary","x":111,"y":460,"wires":[["35af593d.df7476"]]},{"id":"35af593d.df7476","type":"function","z":"2383050b.1b6a8a","name":"setPrimary","func":"var data = {\n    oldAddr: flow.get('oldID'), \n    newAddr:flow.get('newID')\n    }\n\nmsg.payload = data;\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":460,"wires":[["3b264764.e6f458"]]},{"id":"31146972.282b66","type":"inject","z":"2383050b.1b6a8a","name":"","topic":"getDevice","payload":"counter","payloadType":"flow","repeat":"4","crontab":"","once":false,"onceDelay":"","x":130,"y":520,"wires":[["2d48b654.b9bfda"]]},{"id":"2d48b654.b9bfda","type":"function","z":"2383050b.1b6a8a","name":"scanPrimary","func":"\nif(msg.payload == null) msg.payload = 1;\n\nif(msg.payload >= 76) msg.payload = 1;\n\nmsg.payload++;\n\nflow.set(\"counter\",msg.payload);\n\nmsg.payload = {address: msg.payload};\n\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":520,"wires":[[]]},{"id":"dba79d90.1af17","type":"inject","z":"2383050b.1b6a8a","name":"setDevices","topic":"setDevices","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":260,"wires":[["a9bd8cbe.fbfab"]]},{"id":"a9bd8cbe.fbfab","type":"function","z":"2383050b.1b6a8a","name":"devices","func":"var devices = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\",\"32\",\"33\",\"34\",\"35\",\"36\",\"37\",\"38\",\"39\",\"40\",\"41\",\"42\",\"43\",\"44\",\"45\",\"46\",\"47\",\"48\",\"49\",\"50\",\"51\",\"52\",\"53\",\"54\",\"55\",\"56\",\"57\",\"58\",\"59\",\"60\",\"61\",\"62\",\"63\",\"64\",\"65\",\"66\",\"67\",\"68\",\"69\",\"70\",\"71\",\"72\",\"73\",\"74\",\"75\",\"76\"];\n\nmsg.payload = devices;\n\nreturn msg;","outputs":1,"noerr":0,"x":258,"y":260,"wires":[["3b264764.e6f458"]]},{"id":"60269c0f.209c24","type":"comment","z":"2383050b.1b6a8a","name":"USB Ports","info":"Enocean auf USB2\nMBUS auf USB1\nVZ auf USB0","x":800,"y":60,"wires":[]},{"id":"3560bac7.87cd76","type":"switch","z":"2383050b.1b6a8a","name":"Wärmepumpe","property":"payload.secondaryID","propertyType":"msg","rules":[{"t":"eq","v":"90045629361CC702","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1180,"y":340,"wires":[["954db5d9.44cc78"]]},{"id":"5a4cd79f.a08a38","type":"switch","z":"2383050b.1b6a8a","name":"Hauszähler","property":"payload.secondaryID","propertyType":"msg","rules":[{"t":"eq","v":"90048073361CC702","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1190,"y":60,"wires":[["3a323bb3.669bc4","1c4147dc.de54a8"]]},{"id":"20ac2005.dc0c","type":"switch","z":"2383050b.1b6a8a","name":"Wärmemengenzähler","property":"payload.secondaryID","propertyType":"msg","rules":[{"t":"eq","v":"10318903496A8804","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1200,"y":580,"wires":[[]]},{"id":"3a323bb3.669bc4","type":"function","z":"2383050b.1b6a8a","name":"Strom","func":"var msg1 = { payload:msg.payload.DataRecord[0].Value/10 };\nvar msg2 = { payload:msg.payload.DataRecord[2].Value/10 };\nvar msg3 = { payload:msg.payload.DataRecord[12].Value/10 };\nvar msg4 = { payload:msg.payload.DataRecord[13].Value/10 };\nvar msg5 = { payload:msg.payload.DataRecord[14].Value/10 };\nvar msg6 = { payload:msg.payload.DataRecord[40].Value/10 };\nvar msg7 = { payload:msg.payload.DataRecord[41].Value/10 };\nreturn [msg1,msg2,msg3,msg4,msg5,msg6,msg7];","outputs":7,"noerr":0,"x":1350,"y":60,"wires":[["e098940f.813408"],["52239f56.c0c81","40db457c.f471bc"],["1648fa4f.9b67f6"],["b7325590.33b788"],["f138138b.f520a"],["78dbca42.0747f4"],["a84d84c5.caf638"]]},{"id":"e098940f.813408","type":"ui_text","z":"2383050b.1b6a8a","group":"c880abd9.1194b8","order":1,"width":0,"height":0,"name":"","label":"Energiemenge in kWh","format":"{{msg.payload}}","layout":"row-spread","x":1640,"y":20,"wires":[]},{"id":"1c4147dc.de54a8","type":"debug","z":"2383050b.1b6a8a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1330,"y":200,"wires":[]},{"id":"2f21de51.ce8032","type":"function","z":"2383050b.1b6a8a","name":"Strom","func":"var msg1 = { payload:msg.payload.DataRecord[0].Value/10 };\nvar msg2 = { payload:msg.payload.DataRecord[2].Value/10 };\nvar msg3 = { payload:msg.payload.DataRecord[12].Value/10 };\nreturn [msg1,msg2,msg3];","outputs":3,"noerr":0,"x":1150,"y":220,"wires":[[],[],[]]},{"id":"52239f56.c0c81","type":"ui_text","z":"2383050b.1b6a8a","group":"c880abd9.1194b8","order":2,"width":0,"height":0,"name":"","label":"Aktuelle Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1640,"y":60,"wires":[]},{"id":"1648fa4f.9b67f6","type":"ui_text","z":"2383050b.1b6a8a","group":"c880abd9.1194b8","order":4,"width":0,"height":0,"name":"","label":"L1 Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1630,"y":100,"wires":[]},{"id":"b7325590.33b788","type":"ui_text","z":"2383050b.1b6a8a","group":"c880abd9.1194b8","order":5,"width":0,"height":0,"name":"","label":"L2 Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1630,"y":140,"wires":[]},{"id":"f138138b.f520a","type":"ui_text","z":"2383050b.1b6a8a","group":"c880abd9.1194b8","order":6,"width":0,"height":0,"name":"","label":"L3 Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1630,"y":180,"wires":[]},{"id":"78dbca42.0747f4","type":"ui_text","z":"2383050b.1b6a8a","group":"c880abd9.1194b8","order":3,"width":0,"height":0,"name":"","label":"Average Leistung in W über 5min","format":"{{msg.payload}}","layout":"row-spread","x":1680,"y":220,"wires":[]},{"id":"a84d84c5.caf638","type":"ui_text","z":"2383050b.1b6a8a","d":true,"group":"c880abd9.1194b8","order":7,"width":0,"height":0,"name":"","label":"Max. Leistung in W über 5min","format":"{{msg.payload}}","layout":"row-spread","x":1670,"y":260,"wires":[]},{"id":"954db5d9.44cc78","type":"function","z":"2383050b.1b6a8a","name":"Strom","func":"var msg1 = { payload:msg.payload.DataRecord[0].Value/10 };\nvar msg2 = { payload:msg.payload.DataRecord[2].Value/10 };\nvar msg3 = { payload:msg.payload.DataRecord[12].Value/10 };\nvar msg4 = { payload:msg.payload.DataRecord[13].Value/10 };\nvar msg5 = { payload:msg.payload.DataRecord[14].Value/10 };\nvar msg6 = { payload:msg.payload.DataRecord[40].Value/10 };\nvar msg7 = { payload:msg.payload.DataRecord[41].Value/10 };\nreturn [msg1,msg2,msg3,msg4,msg5,msg6,msg7];","outputs":7,"noerr":0,"x":1350,"y":340,"wires":[["e744e9b6.630af8"],["48694675.77dcf8","45743f8e.f1f6a"],["4d4805c5.7eb2fc"],["ed7fd3d0.cfa5f"],["aafe9e15.e731a"],["34a13ce7.0c0454"],["ed3434e6.ea7e28"]]},{"id":"e744e9b6.630af8","type":"ui_text","z":"2383050b.1b6a8a","group":"512198fc.344f78","order":1,"width":0,"height":0,"name":"","label":"Energiemenge in kWh","format":"{{msg.payload}}","layout":"row-spread","x":1640,"y":300,"wires":[]},{"id":"48694675.77dcf8","type":"ui_text","z":"2383050b.1b6a8a","group":"512198fc.344f78","order":2,"width":0,"height":0,"name":"","label":"Aktuelle Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1640,"y":340,"wires":[]},{"id":"4d4805c5.7eb2fc","type":"ui_text","z":"2383050b.1b6a8a","group":"512198fc.344f78","order":4,"width":0,"height":0,"name":"","label":"L1 Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1630,"y":380,"wires":[]},{"id":"ed7fd3d0.cfa5f","type":"ui_text","z":"2383050b.1b6a8a","group":"512198fc.344f78","order":5,"width":0,"height":0,"name":"","label":"L2 Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1630,"y":420,"wires":[]},{"id":"aafe9e15.e731a","type":"ui_text","z":"2383050b.1b6a8a","group":"512198fc.344f78","order":6,"width":0,"height":0,"name":"","label":"L3 Leistung in W","format":"{{msg.payload}}","layout":"row-spread","x":1630,"y":460,"wires":[]},{"id":"34a13ce7.0c0454","type":"ui_text","z":"2383050b.1b6a8a","group":"512198fc.344f78","order":3,"width":0,"height":0,"name":"","label":"Average Leistung in W über 5min","format":"{{msg.payload}}","layout":"row-spread","x":1680,"y":500,"wires":[]},{"id":"ed3434e6.ea7e28","type":"ui_text","z":"2383050b.1b6a8a","d":true,"group":"512198fc.344f78","order":7,"width":0,"height":0,"name":"","label":"Max. Leistung in W über 5min","format":"{{msg.payload}}","layout":"row-spread","x":1670,"y":540,"wires":[]},{"id":"40db457c.f471bc","type":"ui_chart","z":"2383050b.1b6a8a","name":"","group":"c880abd9.1194b8","order":8,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#ea30f8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1890,"y":40,"wires":[[]]},{"id":"45743f8e.f1f6a","type":"ui_chart","z":"2383050b.1b6a8a","name":"","group":"512198fc.344f78","order":8,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#ea30f8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1890,"y":320,"wires":[[]]},{"id":"55e9f9aa.4e3618","type":"ui_ui_control","z":"2383050b.1b6a8a","name":"","events":"all","x":1620,"y":680,"wires":[[]]},{"id":"9b19c7aa.2bc1c8","type":"mbus-client","z":"","name":"gekko","clienttype":"serial","tcpHost":"127.0.0.1","tcpPort":"10001","tcpTimeout":"4000","serialPort":"/dev/ttyUSB1","serialBaudrate":"2400","reconnectTimeout":"20000","autoScan":true,"storeDevices":true,"disableLogs":true},{"id":"73b994b4.ed2f4c","type":"ui_group","z":"","name":"M-Bus Devices","tab":"cc046c8c.cf2ce","order":3,"disp":true,"width":"14"},{"id":"5526ec59.d64354","type":"ui_group","z":"","name":"Data","tab":"cc046c8c.cf2ce","order":4,"disp":true,"width":"14"},{"id":"66389a81.e9a9c4","type":"ui_group","z":"","name":"Commands","tab":"cc046c8c.cf2ce","order":2,"disp":true,"width":"14"},{"id":"ec712bbe.f218b8","type":"ui_group","z":"","name":"Status","tab":"cc046c8c.cf2ce","order":1,"disp":true,"width":"14"},{"id":"c880abd9.1194b8","type":"ui_group","z":"","name":"Hauszähler","tab":"13fa13b.3296dec","order":3,"disp":true,"width":"6","collapse":false},{"id":"512198fc.344f78","type":"ui_group","z":"","name":"Wärmepumpe","tab":"13fa13b.3296dec","order":4,"disp":true,"width":"6","collapse":false},{"id":"cc046c8c.cf2ce","type":"ui_tab","z":"","name":"M-Bus","icon":"plug","order":1},{"id":"13fa13b.3296dec","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Dieser Flow setzt das MBUS Paket und das Dashboard voraus. Eigentlich macht es alles alleine. Wenn der MBUS angeschlossen und der richtige Port eingestellt ist, dann sucht der Baustein nach Zählern und listet sie. Ich teile die Ergebnisse dann auf, indem ich erstmal einen bestimmten Zähler an seiner sekundären Adresse identifiziere.

Ich nutze selber die MBUS Zähler, die auch Ekon gerne verwendet. Die EM340. Diese haben aber ein paar Probleme - sie unterscheiden z.B. nicht in der Stromrichtung - also meine Einspeisung wird falsch gemessen und zur Leistung addiert, anstatt davon abgezogen.

Hier ist die MBUS Kanalliste des EM340 - der Hersteller will mir leider keine weiteren Informationen geben. Ein typisch italienischer Laden...

... Ich hätte euch gerne etwas gezeigt - aber dieses Forum erlaubt mir keine Bilder, die nicht irgendwo im Netz gespeichert sind ...

Beste Grüße und viel Spaß
Björn

Hier die Kanalzuordnung

Kanal Bedeutung Einheit
0 Bezogene Wirkenergie gesamt 0,1*kWh
1 ?
2 Gesamtwirkleistung 0,1*W
3 ? Eventuell Gesamtblindleistung 0,1*W
4 ? Eventuell Gesamtscheinleistung 0,1*W
5 Leistungsfaktor C kapazitiv L induktiv 1
6 Durchschnittliche Leiterspannung im System 0,1*V
7 Durchschnittliche Phasenspannung im System 0,1*V
8 Stromstärke L1 mA
9 Stromstärke L2 mA
10 Stromstärke L3 mA
11 nüscht
12 Wirkleistung L1 0,1*W
13 Wirkleistung L2 0,1*W
14 Wirkleistung L3 0,1*W
15 ? Blindleistung L1 0,1*W
16 ? Blindleistung L2 0,1*W
17 ? Blindleistung L3 0,1*W
18 ? Scheinleistung L1 0,1*W
19 ? Scheinleistung L2 0,1*W
20 ? Scheinleistung L3 0,1*W
21 Leistungsfaktor L1 1
22 Leistungsfaktor L2 1
23 Leistungsfaktor L3 1
24 nüscht
25 Leiterspannung L12 0,1*V
26 Leiterspannung L23 0,1*V
27 Leitserpsannung L31 0,1*V
28 Phasenspannung L1n 0,1*V
29 Phasenspannung L2n 0,1*V
30 Phasenspannung L3n 0,1*V
31 Bezogene Wirkenergie gesamt 0,1*kWh
32 ??
33 ?
34 ?
35 ? Eventuell Frequenz 0,1*Hz
36 nüscht
37 Wirkenergie L1 0,1*kWh
38 Wirkenergie L2 0,1*kWh
39 Wirkenergie L3 0,1*kWh
40 ? Durchschnittliche Wirkleistung pro zeitraum 0,1*W
41 ? Max Wirkleistung pro Zeiteinheit 0,1*W
42 nüscht
43 ?
44 ?
45 nüscht
#6
Guten Abend,

wir haben diese Woche auch unsere PV-Anlage inkl. Batteriespeicher (Alpha ESS Smile 5) in Betrieb genommen. Auh wir haben den M-Bus Zähler EM340 verbaut. Der Gekko zählt nun aber leider auch falsch. Ca. das doppelte wie der  Stromzähler. Habe an dem EM340 die Messmodus umgestellt von A auf b. Wenn ich jetzt Strom einspeise zeigt der Gekko einen Minuswert an. Bin noch relativ neu hier und komm leider nicht weiter Sad .Kann mir hier bitte jemand Helfen
Massa Haus, MyGekko Slide 2 (Einzelraumregelung, Rolläden, 2 Lichtkreise, 2 BWM, VoIP-Klingel, Tecalor THZ 304 Eco, PV-Anlage inkl. Speicher per NodeRed verbunden
#7
Hallo Bjoern,
ich bin offensichtlich zu doof, könntest du mir helfen? 

Fand die Idee mit dem "MBUS Slave Interface" aus Post#5 sehr cool und hab bestellt. habe auch einen EM340 und NodeRed. Die Installation von "node-red-contrib-m-bus" war alles kein Problem. Dein Flow reinkopiert und beim Client den richtigen Serial Port ausgewählt (/dev/ttyUSB1). Am Rio die beiden M-Bus-Kabel abgeklemmt und an das MBus Slave Interface angeklemmt (Da keine Beschriftung an dem Interface war, hab ich beide Verkabelungen getestet. Ich kann bis jetzt nicht sagen welche die richtige ist). Flow gestartet und ins Dashboard gewechselt, dann den Scan ausgeführt. Dann auf die Inject Node "Set Devices" gedrückt (Setzt wohl eine Liste, die ID 1 - 76 abscannt), dann erneut gescannt. Der Rückgemeldete Satus ist immer rot. Während des Scanvorgangs wird im Dashboard unter M-Bus der Text: Error: Failed to send/recieve M-Bus request frame [x] angezeigt. x steht dann für die aktuell gescannte ID. 

Im EM340 im Zählerschrank kann ich mir die Primär- und Sekundäradresse anzeigen lassen:
- Primär: 0  (obwohl laut Bedienungsanleitung Standard 1 sein soll; Ich habe auch nur einen M-Bus-Zähler)
- Sekundär: 90037434 (die habe ich im Flow nirgends eingetragen; Nummer ist identisch mit der Gekkokonfig). 

Hab danach im Flow noch die ID: 0 gescannt mit identischen Ergebnis. Nach knapp 5 Stunden gefummel ist mir die Lust vergangen. Hast du eine Idee was ich falsch mache?

Nachtrag 15.12.21:
ich habe die Primär-ID im EM340 von ID0 auf 1 gestellt. Gekko kann den Gesamtverbrauch weiterhin auslesen. Klemme ich auf das M-Bus-Interface um, ändert sich leider nichts. Scheinbar ist M-Bus verpolungssicher, sodass ich die Verkabelung am Interface auch ausschließe. Hat jemand eine Idee was ich hier falsch mache?


Angehängte Dateien Thumbnail(s)
               
#8
Hallo Zusammen,
ich hab noch etwas rumprobiert und mich mit dem M-Bus an sich beschäftigt. Das EM340 und das MBUS Interface sind wohl beides Slaves innerhalb des Bussystem. Es benötigt aber noch einen Master. Der Gekko ist an sich der Master (gelesen ich in einem Dokument auf der MyGekko-Homepage gefunden). 
Damit sollte das RIO, das EM340 und das MBUS-Interface-Interface jeweils mit den 2-adrigen Kabeln verbunden sein (z.B. Stern-Verkabelung). 
Wird das so verkabelt leuchtet auch das Rx- (Reciever --> Empfangen) und Tx-Lämpchen (Transmitter --> Sender) am MBus-Interface. Am EM340 wird auf dem Display auch Rx und Tx angezeigt. Der Gekko zeigt auch wie gewohnt den Gesamtverbrauch an. Soweit so gut.

Nach meinen Verständnis fragt der Gekko nun regelmäßig  den aktuellen Verbrauch am EM340 ab (durch Konfiguration der Sekundäradresse am Gekko) und das MBUS-Slave-Interface sollte diese Info abgreifen und an NodeRed am Raspberry übergeben Huh .

Hat jemand dieses Mbus-Slave-Interface im Einsatz und kann mir die Verkabelung bzw. meine Beschreibung zum MBus bestätigen?

Nach wie vor erhalte ich keine Werte über NodeRed. Was muss man denn im Dashboard drücken? Ich kenne Sowohl Primär-ID als auch Sekundär-ID. Bisher habe ich im Feld "ID" die PrimärID eingetragen und auf "Read Device" gedrückt, anschließend auf "Scan" und dann auf "Update Device". Der Status bleibt jedoch auf rot (siehe Bild Post#8 )

Hat jemand eine Idee?


Möglicherweise verwandte Themen...
Thema Verfasser Antworten Ansichten Letzter Beitrag
  M-Bus Zähler Conner 6 10.293 26.01.2023, 22:59
Letzter Beitrag: santos
  Modbus Zähler Schneider nur noch positive Werte jumparound246 0 2.364 10.04.2020, 22:40
Letzter Beitrag: jumparound246
Lightbulb Werte Drehstromzähler über Modbus Leimegger 1 4.218 10.04.2020, 22:35
Letzter Beitrag: jumparound246

Gehe zu:


Benutzer, die gerade dieses Thema anschauen:
1 Gast/Gäste