title: Relays stay "on" after Node-red deploy
body: <p>I have Node-Red running on a Raspberry Pi controlling an Arduino. Connected to the Arduino is a Sansmart 16 relay board. </p>
  
  <p>In my flow, in the dashboard switch, "On" payload is "false" and "Off" Payload is "True" (if I reverse the payloads then the relays turn "on" when switch is turned off).</p>
  
  <p>All works fine except when I deploy a change or restart system. All relays turn on and stay on, but if I go to the dashboard and cycle the switch (on then off), the relays stay off till turned on and all works fine.</p>
  
  <p>Anyone know why the initial state is "On".  Is there a way to cycle the switch (relays) at startup?</p>
  
  <p>Thank you.</p>
  
  <p>Here is the flow:</p>
  
  <pre><code>[{"id":"63d9ce70.698d","type":"function","z":"73027f99.95023","name":"C to F","func":"var tempc = msg.payload;\n    tempf = tempc * 9/5 + 32;\n    tempf = Math.round(tempf * 10) / 10;\n    //tempf = tempf.toFixed(0);\n    msg.payload = tempf;\n    return msg;\n","outputs":1,"noerr":0,"x":370,"y":500,"wires":[["6635ceea.6df41"]]},{"id":"75445653.b45628","type":"arduino out","z":"73027f99.95023","name":"Relay","pin":"2","state":"OUTPUT","arduino":"91c80dfb.96132","x":330,"y":40,"wires":[]},{"id":"86df60ea.59775","type":"rpi-dht22","z":"73027f99.95023","name":"Temp","topic":"rpi-dht11","dht":"11","pintype":1,"pin":"7","x":230,"y":460,"wires":[["63d9ce70.698d","d9eca468.e59af8"]]},{"id":"490dc8aa.b762c8","type":"inject","z":"73027f99.95023","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"5","crontab":"","once":false,"x":90,"y":460,"wires":[["86df60ea.59775"]]},{"id":"6635ceea.6df41","type":"ui_text","z":"73027f99.95023","group":"81cc84d8.1a5d78","order":1,"width":"3","height":"1","name":"","label":"Temp","format":" {{value | number:0}}&amp;degF","layout":"row-spread","x":510,"y":500,"wires":[]},{"id":"d9eca468.e59af8","type":"ui_text","z":"73027f99.95023","group":"81cc84d8.1a5d78","order":2,"width":"3","height":"1","name":"Humidity","label":"Humidity","format":" {{value | number:0}}%","layout":"row-spread","x":520,"y":460,"wires":[]},{"id":"f9e5b087.c144d","type":"ui_switch","z":"73027f99.95023","name":"","label":"Water Heater LP","group":"4ebcec92.a5bd34","order":3,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":130,"y":40,"wires":[["75445653.b45628"]]},{"id":"db1d317f.b8069","type":"arduino out","z":"73027f99.95023","name":"Relay","pin":"3","state":"OUTPUT","arduino":"91c80dfb.96132","x":330,"y":100,"wires":[]},{"id":"b5bcf4ea.4787b8","type":"ui_switch","z":"73027f99.95023","name":"","label":"Water Heater Elec","group":"4ebcec92.a5bd34","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":130,"y":100,"wires":[["db1d317f.b8069"]]},{"id":"90953aa1.393028","type":"arduino out","z":"73027f99.95023","name":"Relay","pin":"4","state":"OUTPUT","arduino":"91c80dfb.96132","x":330,"y":160,"wires":[]},{"id":"e88a071d.cfd698","type":"ui_switch","z":"73027f99.95023","name":"","label":"Outside Lights","group":"4ebcec92.a5bd34","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":120,"y":160,"wires":[["90953aa1.393028"]]},{"id":"3c899def.edc9c2","type":"arduino out","z":"73027f99.95023","name":"Relay","pin":"5","state":"OUTPUT","arduino":"91c80dfb.96132","x":330,"y":220,"wires":[]},{"id":"fe2b8790.43aa88","type":"ui_switch","z":"73027f99.95023","name":"","label":"Inside Lights","group":"4ebcec92.a5bd34","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":220,"wires":[["3c899def.edc9c2"]]},{"id":"7e323c7a.93d234","type":"arduino out","z":"73027f99.95023","name":"Relay","pin":"6","state":"OUTPUT","arduino":"91c80dfb.96132","x":330,"y":280,"wires":[]},{"id":"5f7afe49.02c31","type":"ui_switch","z":"73027f99.95023","name":"","label":"Water Pump","group":"4ebcec92.a5bd34","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":110,"y":280,"wires":[["7e323c7a.93d234"]]},{"id":"91c80dfb.96132","type":"arduino-board","z":"","device":"/dev/ttyACM0"},{"id":"81cc84d8.1a5d78","type":"ui_group","z":"","name":"Temp","tab":"b070480d.c92ec8","disp":true,"width":"3"},{"id":"4ebcec92.a5bd34","type":"ui_group","z":"","name":"Switch Board","tab":"b070480d.c92ec8","order":2,"disp":true,"width":"6"},{"id":"b070480d.c92ec8","type":"ui_tab","z":"","name":"Command Center","icon":"dashboard"}]
  </code></pre>