Hi
I have flow which reads the binary state(Active/InActive) of a sensor using a std tcp request, it reads an ASCI buffer to send an alarm message based on the buffer string, a message is then sent to pushover which works fine, at the same time I am trying to show the state of sensor on my dashboard using an LED node.
When I connect my LED node to the same 'buffer to string' function node output my LED fails to change state? but at the same time if I use a couple of inject nodes to send the same strings 'Active', 'InActive' to test the LED node they work!?
What am I missing? I thought I read somewhere on the forum there was a nuance about using buffer to string, so I added(inserted) the extra 'Fudge' function node to see if that fixed it but no...
Thanks
[{"id":"2a8d439.b7589bc","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"8f3ec4af.8bff78","type":"change","z":"2a8d439.b7589bc","name":"conv message","rules":[{"t":"change","p":"payload","pt":"msg","from":"InActive","fromt":"str","to":"Granary Gate Beam Tripped","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":380,"wires":[["dabf8294.cb2b"]]},{"id":"de1c0ea7.3695a","type":"ui_led","z":"2a8d439.b7589bc","order":3,"group":"43f72cbd.eb2dd4","width":0,"height":0,"label":"Granary IR Beam","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#008000","value":"Active","valueType":"str"},{"color":"#ff0000","value":"InActive","valueType":"str"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"Granary IR Beam","x":690,"y":320,"wires":[]},{"id":"cdb04f39.57aad","type":"tcp request","z":"2a8d439.b7589bc","server":"192.168.1.122","port":"17123","out":"time","splitc":"0","name":"","x":310,"y":260,"wires":[["9bed70f6.5aa1a","9c037bd8.415368"]]},{"id":"157caa0e.8c4836","type":"pushover","z":"2a8d439.b7589bc","name":"","device":"","title":"Alarm System","priority":"1","sound":"","url":"","url_title":"","html":false,"x":920,"y":440,"wires":[]},{"id":"d0b88611.1765f8","type":"debug","z":"2a8d439.b7589bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":520,"wires":[]},{"id":"31aec1e9.a36f7e","type":"inject","z":"2a8d439.b7589bc","name":"trip test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"InActive","payloadType":"str","x":430,"y":440,"wires":[["5921cdcf.7e7174"]]},{"id":"9bed70f6.5aa1a","type":"debug","z":"2a8d439.b7589bc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":160,"wires":[]},{"id":"b9c6c427.5079a8","type":"inject","z":"2a8d439.b7589bc","name":"trip test bypass clock","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Granary Gate Beam Tripped","payloadType":"str","x":470,"y":520,"wires":[["d0b88611.1765f8","157caa0e.8c4836"]]},{"id":"64c8208e.6242a","type":"function","z":"2a8d439.b7589bc","name":"buffer to string","func":"msg.payload = msg.payload.toString();\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":180,"y":380,"wires":[["64f5d9e8.e5b8e8","5921cdcf.7e7174","34b9aa30.d6a126"]]},{"id":"f418e652.38bfd8","type":"inject","z":"2a8d439.b7589bc","name":"ASCI di1 Read","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"GI 1","payloadType":"str","x":200,"y":140,"wires":[["cdb04f39.57aad"]]},{"id":"64f5d9e8.e5b8e8","type":"debug","z":"2a8d439.b7589bc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":170,"y":440,"wires":[]},{"id":"dabf8294.cb2b","type":"time-range-switch","z":"2a8d439.b7589bc","name":"","lat":"51.392568","lon":"-1.704475","startTime":"dusk","endTime":"06:00","startOffset":0,"endOffset":0,"x":670,"y":440,"wires":[["d0b88611.1765f8","157caa0e.8c4836"],[]]},{"id":"5921cdcf.7e7174","type":"switch","z":"2a8d439.b7589bc","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"InActive","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":380,"wires":[["8f3ec4af.8bff78"]]},{"id":"92cab16.5c1e75","type":"inject","z":"2a8d439.b7589bc","name":"NO trip test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Active","payloadType":"str","x":450,"y":480,"wires":[["5921cdcf.7e7174"]]},{"id":"7ec1405e.195bc","type":"inject","z":"2a8d439.b7589bc","name":"ASCI di2 Read","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"GI 2","payloadType":"str","x":200,"y":180,"wires":[["cdb04f39.57aad"]]},{"id":"9c037bd8.415368","type":"rbe","z":"2a8d439.b7589bc","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":150,"y":320,"wires":[["64c8208e.6242a"]]},{"id":"4fcef35a.c9a42c","type":"comment","z":"2a8d439.b7589bc","name":"Granary IR Beam -------------------------------------------------------------------------------------------------------------------------","info":"","x":470,"y":100,"wires":[]},{"id":"32ebb3c3.19b9bc","type":"inject","z":"2a8d439.b7589bc","name":"Led Green","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Active","payloadType":"str","x":680,"y":220,"wires":[["de1c0ea7.3695a"]]},{"id":"1e57a2c7.c761dd","type":"inject","z":"2a8d439.b7589bc","name":"Led Red","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"InActive","payloadType":"str","x":680,"y":260,"wires":[["de1c0ea7.3695a"]]},{"id":"34b9aa30.d6a126","type":"change","z":"2a8d439.b7589bc","name":"Fudge","rules":[{"t":"change","p":"payload","pt":"msg","from":"Active","fromt":"str","to":"Active","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"InActive","fromt":"str","to":"InActive","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":320,"wires":[["de1c0ea7.3695a"]]},{"id":"43f72cbd.eb2dd4","type":"ui_group","name":"Workshop","tab":"78d863c9.1da73c","order":3,"disp":true,"width":"6","collapse":false},{"id":"78d863c9.1da73c","type":"ui_tab","name":"Kingstones Alarm System","icon":"dashboard","disabled":false,"hidden":false}]