RelayPLATE node fails to work when sent messages at regular intervals
Closed this issue · 2 comments
First off, thank you for putting together this node, it has the potential to be really helpful for the project I'm working on.
I'm trying to use the RelayPlate node to control a solenoid that controls a heater and/or chiller through thermostat logic.
I have found that the RelayPlate node works if I just inject a one-time message of "on" or "off", but reports an "invalid input" when I try to feed it "on" "off" controls through my thermostat logic flow.
Note that my thermostat requires that I have both cooling and heating logic available as a user input, so the RelayPlate must be fed by 4 different nodes that each could send a message depending on the situation.
Any help would be greatly appreciate!
[{"id":"7f09a382.90818c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"5fb17e35.fc3ab","type":"function","z":"7f09a382.90818c","name":"Celsius to Fahrenheit ","func":"msg.payload *= 1.8;\nmsg.payload += 32;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":180,"y":100,"wires":[["95ca1d1f.698e2"]]},{"id":"dffdcdd0.7dcdf","type":"ui_gauge","z":"7f09a382.90818c","name":"","group":"402fd1bf.c5ee2","order":2,"width":0,"height":0,"gtype":"gage","title":"Current Temperature","label":"fahrenheit","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":680,"y":60,"wires":[]},{"id":"a14825c.2057dd8","type":"ds18b20","z":"7f09a382.90818c","name":"temp probe","sensorid":"28-01193a97492c","timer":"0.01","x":90,"y":40,"wires":[["5fb17e35.fc3ab"]]},{"id":"95ca1d1f.698e2","type":"calculator","z":"7f09a382.90818c","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"round","constant":"","round":false,"decimals":0,"x":450,"y":100,"wires":[["dffdcdd0.7dcdf","964ed9d3.f2fbb8"]]},{"id":"964ed9d3.f2fbb8","type":"change","z":"7f09a382.90818c","name":"currenttemp","rules":[{"t":"set","p":"currenttemp","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":140,"wires":[[]]},{"id":"49a5048e.1d0d0c","type":"change","z":"7f09a382.90818c","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":600,"wires":[["1c400ee4.481411"]]},{"id":"c472edb1.566c5","type":"change","z":"7f09a382.90818c","name":"off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":640,"wires":[["1c400ee4.481411"]]},{"id":"2515bd52.5f0fa2","type":"switch","z":"7f09a382.90818c","name":"Heating Logic","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"currenttemp","vt":"global"},{"t":"lte","v":"currenttemp","vt":"global"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":600,"wires":[["49a5048e.1d0d0c"],["c472edb1.566c5"]]},{"id":"5e370caa.f8f0f4","type":"ui_dropdown","z":"7f09a382.90818c","name":"","label":"","tooltip":"","place":"Select option","group":"402fd1bf.c5ee2","order":3,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"heating","value":"heating","type":"str"},{"label":"cooling","value":"cooling","type":"str"}],"payload":"","topic":"","x":110,"y":320,"wires":[["575c45a8.26952c","cb1f3ae5.d703f8"]]},{"id":"f4e7e531.0ec8d8","type":"switch","z":"7f09a382.90818c","name":"heating or cooling","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"cooling","vt":"str"},{"t":"eq","v":"heating","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":150,"y":440,"wires":[["5c418f08.19301"],["737b90de.390ee"]]},{"id":"fd6b4f35.8a944","type":"change","z":"7f09a382.90818c","name":"","rules":[{"t":"set","p":"InitialSetTemp","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":700,"wires":[[]]},{"id":"78636621.6f0ad8","type":"ui_text_input","z":"7f09a382.90818c","name":"","label":"","tooltip":"","group":"402fd1bf.c5ee2","order":3,"width":0,"height":0,"passthru":true,"mode":"number","delay":300,"topic":"","x":90,"y":700,"wires":[["fd6b4f35.8a944"]]},{"id":"737b90de.390ee","type":"change","z":"7f09a382.90818c","name":"SetTemp Passthrough","rules":[{"t":"set","p":"payload","pt":"msg","to":"SetTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":160,"y":600,"wires":[["2515bd52.5f0fa2"]]},{"id":"ee515637.61c1f8","type":"inject","z":"7f09a382.90818c","name":"Feed SetTemp","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":true,"onceDelay":"0","topic":"","payload":"InitialSetTemp","payloadType":"global","x":130,"y":780,"wires":[["97dbcf78.c5cfd"]]},{"id":"97dbcf78.c5cfd","type":"change","z":"7f09a382.90818c","name":"","rules":[{"t":"set","p":"SetTemp","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":780,"wires":[[]]},{"id":"575c45a8.26952c","type":"change","z":"7f09a382.90818c","name":"","rules":[{"t":"set","p":"InitialMode","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":320,"wires":[[]]},{"id":"1a64513f.b5e04f","type":"inject","z":"7f09a382.90818c","name":"Feed H/C Mode","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"InitialMode","payloadType":"global","x":130,"y":380,"wires":[["f4e7e531.0ec8d8"]]},{"id":"40aa5bbc.321aa4","type":"ui_chart","z":"7f09a382.90818c","name":"","group":"402fd1bf.c5ee2","order":3,"width":0,"height":0,"label":"Temp History","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":630,"y":220,"wires":[[]]},{"id":"6eecb3dd.28196c","type":"inject","z":"7f09a382.90818c","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":true,"onceDelay":"0.0","topic":"","payload":"currenttemp","payloadType":"flow","x":370,"y":220,"wires":[["40aa5bbc.321aa4"]]},{"id":"f58e46d0.8e5728","type":"ui_toast","z":"7f09a382.90818c","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":550,"y":280,"wires":[]},{"id":"cb1f3ae5.d703f8","type":"change","z":"7f09a382.90818c","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"heating","fromt":"str","to":"Heating Mode Selected","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"cooling","fromt":"str","to":"Cooling Mode Selected","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":280,"wires":[["f58e46d0.8e5728"]]},{"id":"44643c06.24a0a4","type":"change","z":"7f09a382.90818c","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":520,"wires":[["1c400ee4.481411"]]},{"id":"73197d36.60d404","type":"change","z":"7f09a382.90818c","name":"off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off ","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":560,"wires":[["1c400ee4.481411"]]},{"id":"ace22537.921d18","type":"switch","z":"7f09a382.90818c","name":"Cooling Logic","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"currenttemp","vt":"global"},{"t":"gte","v":"currenttemp","vt":"global"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":520,"wires":[["44643c06.24a0a4"],["73197d36.60d404"]]},{"id":"5c418f08.19301","type":"change","z":"7f09a382.90818c","name":"SetTemp Passthrough","rules":[{"t":"set","p":"payload","pt":"msg","to":"SetTemp","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":520,"wires":[["ace22537.921d18"]]},{"id":"1c400ee4.481411","type":"ppRelay","z":"7f09a382.90818c","config_plate":"c97221d9.fd463","name":"","relay":"1","x":780,"y":620,"wires":[[]]},{"id":"402fd1bf.c5ee2","type":"ui_group","z":"","name":"Tank 1","tab":"e8180c5f.bd84b","order":1,"disp":true,"width":"6","collapse":false},{"id":"c97221d9.fd463","type":"pi_plate","z":"","model":"RELAYplate","address":"0"},{"id":"e8180c5f.bd84b","type":"ui_tab","z":"","name":"Tank 1","icon":"dashboard","disabled":false,"hidden":false}]
Hello,
You have a trailing space after the "on" and "off" values in the change nodes that feed into the RELAYplate node. So, the strings getting send to the RELAYplate are "on " and "off " when they should just be "on" and "off".