Das Problem ist, dass die context-Variablen nicht ordentlich initialisiert sind. Da kommt dann aus der Summierfunktion ein NaN heraus (hab' ich mit der debug-node rausgefunden) und damit kann die Gauge nix anfangen. Die Inject-Node übernimmt nun das initialisieren. Alternativ halt auf allen drei Slidern rumklickern beim letzten kommt dann ein Wert in der Gauge an. Aber es gibt bestimmt auch einen anderen Weg das ordentlich zu machen: Entweder alle drei Variablen beim Deploy auf 0 initialisieren oder in der Summenfunktion nur die addieren, die auch gesetzt sind.
Code: Alles auswählen
[{"id":"cf354afd.9bc818","type":"tab","label":"Gero","disabled":false,"info":""},{"id":"5719608c.cb6d5","type":"ui_slider","z":"cf354afd.9bc818","name":"","label":"HV1","tooltip":"","group":"e4b1e54c.678138","order":1,"width":"4","height":"1","passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":"20","step":1,"className":"","x":270,"y":100,"wires":[["bbecace6.cf6118"]]},{"id":"4c4decd7.181c64","type":"ui_slider","z":"cf354afd.9bc818","name":"","label":"HV2","tooltip":"","group":"e4b1e54c.678138","order":3,"width":"4","height":"1","passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":"20","step":1,"className":"","x":270,"y":180,"wires":[["73c7b491.eca484"]]},{"id":"73c7b491.eca484","type":"ui_numeric","z":"cf354afd.9bc818","name":"n2","label":"","tooltip":"","group":"e4b1e54c.678138","order":4,"width":"2","height":"1","wrap":false,"passthru":true,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":"20","step":1,"className":"","x":410,"y":180,"wires":[["90ab8442.f81ce","4c4decd7.181c64"]]},{"id":"bbecace6.cf6118","type":"ui_numeric","z":"cf354afd.9bc818","name":"n1","label":"","tooltip":"","group":"e4b1e54c.678138","order":2,"width":"2","height":"1","wrap":false,"passthru":true,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":"20","step":1,"className":"","x":410,"y":100,"wires":[["c0e5a2f6.6011a8","5719608c.cb6d5"]]},{"id":"c0e5a2f6.6011a8","type":"change","z":"cf354afd.9bc818","name":"","rules":[{"t":"set","p":"s1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":100,"wires":[["532109e9.94e058"]]},{"id":"90ab8442.f81ce","type":"change","z":"cf354afd.9bc818","name":"","rules":[{"t":"set","p":"s2","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":180,"wires":[["532109e9.94e058"]]},{"id":"532109e9.94e058","type":"function","z":"cf354afd.9bc818","name":"Summe in Watt","func":"msg.payload = flow.get(\"s1\")+flow.get(\"s2\")+flow.get(\"s3\");\nmsg.payload = 230*msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":820,"y":180,"wires":[["73d4ae7a.9e5378","9e6ce960.f2e4a8"]]},{"id":"73d4ae7a.9e5378","type":"ui_gauge","z":"cf354afd.9bc818","name":"","group":"e4b1e54c.678138","order":7,"width":0,"height":0,"gtype":"gage","title":"total","label":"Watt","format":"{{value}}","min":0,"max":"13800","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1030,"y":180,"wires":[]},{"id":"9f19e960.3fd5e8","type":"mqtt in","z":"cf354afd.9bc818","name":"Hausverbrauch","topic":"openWB/global/WHouseConsumption","qos":"2","datatype":"auto","broker":"978968c8.7b5238","x":300,"y":380,"wires":[[]]},{"id":"33e16f4f.c097e8","type":"ui_slider","z":"cf354afd.9bc818","name":"","label":"HV3","tooltip":"","group":"e4b1e54c.678138","order":5,"width":"4","height":"1","passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":"20","step":1,"className":"","x":270,"y":260,"wires":[["c46e3ffe.11dc18"]]},{"id":"c46e3ffe.11dc18","type":"ui_numeric","z":"cf354afd.9bc818","name":"n3","label":"","tooltip":"","group":"e4b1e54c.678138","order":6,"width":"2","height":"1","wrap":false,"passthru":true,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":"20","step":1,"className":"","x":410,"y":260,"wires":[["db7c49ee.fd03e8","33e16f4f.c097e8"]]},{"id":"db7c49ee.fd03e8","type":"change","z":"cf354afd.9bc818","name":"","rules":[{"t":"set","p":"s3","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":260,"wires":[["532109e9.94e058"]]},{"id":"9e6ce960.f2e4a8","type":"debug","z":"cf354afd.9bc818","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1020,"y":260,"wires":[]},{"id":"3b68517d.870aae","type":"inject","z":"cf354afd.9bc818","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":70,"y":180,"wires":[["5719608c.cb6d5","4c4decd7.181c64","33e16f4f.c097e8"]]},{"id":"e4b1e54c.678138","type":"ui_group","name":"Sim Hausverbrauch","tab":"744b5117.d18b28","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"978968c8.7b5238","type":"mqtt-broker","name":"OpenWB","broker":"192.168.8.11","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"30","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"744b5117.d18b28","type":"ui_tab","name":"Haussimulation","icon":"dashboard","disabled":false,"hidden":false}]
Die Rückwärtsschleifen funktionieren bei mir aber. Sowohl auf dem Raspi als auf der CCU.
richtig interpretiere, ist das Buster. Das ist das aktuelle Image von raspberrypi.org