Good day everyone,
I have a SDM120 and SDM630 KW/H meter.
One has ID 1 the other ID 2.
When I write a flow which calls either 1 or 2, it works fine, when I write a flow that calls both......., I get an error.
It then try to connect again, and shows the same error.
What am I doing wrong here?
[{"id":"ed1e1e20.b4d9f","type":"function","z":"1d156a91.d1f435","name":"Energy","func":"var rawData = new ArrayBuffer(4);\nvar intView = new Uint16Array(rawData);\nvar fltView = new Float32Array(rawData);\n\nintView[0] = msg.payload[1]; //low\nintView[1] = msg.payload[0]; //high\n\nmsg.payload = parseFloat(fltView[0].toFixed(2));\nmsg.topic = \"energy\";\n\nnode.status({fill:\"blue\",shape:\"ring\",text:msg.topic + \":\" + msg.payload}); \n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":120,"wires":[[]]},{"id":"ea08d434.1da898","type":"modbus-read","z":"1d156a91.d1f435","name":"SDM 120 Energy","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"unitid":"1","dataType":"InputRegister","adr":"342","quantity":"2","rate":"500","rateUnit":"ms","delayOnStart":false,"startDelayTime":"","server":"cf021167.900c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":178,"y":125,"wires":[["ed1e1e20.b4d9f"],[]]},{"id":"6c4cb9bd.4e5128","type":"modbus-queue-info","z":"1d156a91.d1f435","name":"SDM630_queue","topic":"","unitid":"1","queueReadIntervalTime":"1000","lowLowLevel":"60","lowLevel":75,"highLevel":150,"highHighLevel":300,"server":"cf021167.900c7","errorOnHighLevel":false,"x":524.1428527832031,"y":240.107177734375,"wires":[["e5db2f84.bd3df","ee37888.1706a78"]]},{"id":"8f20346a.c3a0b8","type":"inject","z":"1d156a91.d1f435","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":153.14286041259766,"y":241.10720252990723,"wires":[["a8aa8497.e44718"]]},{"id":"a8aa8497.e44718","type":"change","z":"1d156a91.d1f435","name":"Reset queue","rules":[{"t":"set","p":"resetQueue","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":322.14286041259766,"y":241.1071891784668,"wires":[["6c4cb9bd.4e5128"]]},{"id":"e5db2f84.bd3df","type":"debug","z":"1d156a91.d1f435","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"items","targetType":"msg","x":734.1428527832031,"y":240.107177734375,"wires":[]},{"id":"ee37888.1706a78","type":"debug","z":"1d156a91.d1f435","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"unitid","targetType":"msg","x":734.1428527832031,"y":280.107177734375,"wires":[]},{"id":"2e3d4665.e21bfa","type":"function","z":"1d156a91.d1f435","name":"Energy","func":"var rawData = new ArrayBuffer(4);\nvar intView = new Uint16Array(rawData);\nvar fltView = new Float32Array(rawData);\n\nintView[0] = msg.payload[1]; //low\nintView[1] = msg.payload[0]; //high\n\nmsg.payload = parseFloat(fltView[0].toFixed(2));\nmsg.topic = \"energy\";\n\nnode.status({fill:\"blue\",shape:\"ring\",text:msg.topic + \":\" + msg.payload}); \n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":400,"wires":[[]]},{"id":"6356c118.88c07","type":"modbus-read","z":"1d156a91.d1f435","name":"SDM 630 Energy","topic":"","showStatusActivities":true,"logIOActivities":false,"showErrors":true,"unitid":"2","dataType":"InputRegister","adr":"342","quantity":"2","rate":"500","rateUnit":"ms","delayOnStart":false,"startDelayTime":"","server":"cf021167.900c7","useIOFile":false,"ioFile":"","useIOForPayload":false,"x":178,"y":405,"wires":[["2e3d4665.e21bfa"],[]]},{"id":"26624c54.6c1a54","type":"modbus-queue-info","z":"1d156a91.d1f435","name":"SDM630_queue","topic":"","unitid":"2","queueReadIntervalTime":"1000","lowLowLevel":"60","lowLevel":75,"highLevel":150,"highHighLevel":300,"server":"cf021167.900c7","errorOnHighLevel":false,"x":524.1428527832031,"y":520.107177734375,"wires":[["36cc2d1a.d382b2","26e57213.8caa4e"]]},{"id":"a2b9d8b5.f7ae38","type":"inject","z":"1d156a91.d1f435","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":153.14286041259766,"y":521.1072025299072,"wires":[["19708f3c.3d42a1"]]},{"id":"19708f3c.3d42a1","type":"change","z":"1d156a91.d1f435","name":"Reset queue","rules":[{"t":"set","p":"resetQueue","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":322.14286041259766,"y":521.1071891784668,"wires":[["26624c54.6c1a54"]]},{"id":"36cc2d1a.d382b2","type":"debug","z":"1d156a91.d1f435","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"items","targetType":"msg","x":734.1428527832031,"y":520.107177734375,"wires":[]},{"id":"26e57213.8caa4e","type":"debug","z":"1d156a91.d1f435","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"unitid","targetType":"msg","x":734.1428527832031,"y":560.107177734375,"wires":[]},{"id":"cf021167.900c7","type":"modbus-client","z":"","name":"Modbus RS485 Serial","clienttype":"serial","bufferCommands":true,"stateLogEnabled":true,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyAMA0","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"500","unit_id":"0","commandDelay":"1","clientTimeout":"2000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false}]