forked from LundSoftwares/ESPtoNRtoSigK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ESPtoNRtoSigK.json
1 lines (1 loc) · 10.1 KB
/
ESPtoNRtoSigK.json
1
[{"id":"b884fa68.1c7538","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"8472ec00.a4b33","type":"split","z":"b884fa68.1c7538","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":250,"y":480,"wires":[["5a4174ce.14b86c"]]},{"id":"5a4174ce.14b86c","type":"join","z":"b884fa68.1c7538","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":370,"y":480,"wires":[["eb0280ce.c4086"]]},{"id":"dd301880.6c9968","type":"tcp in","z":"b884fa68.1c7538","name":"","server":"server","host":"","port":"3100","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":100,"y":480,"wires":[["8472ec00.a4b33"]]},{"id":"37afa85c.5d4828","type":"inject","z":"b884fa68.1c7538","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":180,"wires":[["decda927.76b7c8"]]},{"id":"d35c9d0.46e2d6","type":"tcp request","z":"b884fa68.1c7538","server":"192.168.100.159","port":"3101","out":"time","splitc":"0","name":"","x":590,"y":140,"wires":[[]]},{"id":"decda927.76b7c8","type":"function","z":"b884fa68.1c7538","name":"1","func":"msg.payload = \"1\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":180,"wires":[["d35c9d0.46e2d6"]]},{"id":"49c9c7af.638038","type":"function","z":"b884fa68.1c7538","name":"0","func":"msg.payload = \"0\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":80,"wires":[["d35c9d0.46e2d6"]]},{"id":"8f09bc30.8c289","type":"inject","z":"b884fa68.1c7538","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":80,"wires":[["49c9c7af.638038"]]},{"id":"d286a428.baf338","type":"switch","z":"b884fa68.1c7538","name":"","property":"payload.1","propertyType":"msg","rules":[{"t":"eq","v":"28044F07D6013CD3","vt":"str"},{"t":"eq","v":"282F2E07D6013C41","vt":"str"},{"t":"eq","v":"28DEE207D6013C07","vt":"str"},{"t":"eq","v":"2892DD07D6013CE4","vt":"str"},{"t":"eq","v":"2828A607D6013C31","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":790,"y":540,"wires":[["f1787d59.fd1ee"],["47a25cc9.718694"],["c4e5e1eb.a106e"],["c996fd8.1416c"],["23eca5ad.b7a3ca"]]},{"id":"f1787d59.fd1ee","type":"change","z":"b884fa68.1c7538","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Set.SignalK.Path.Here","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":500,"wires":[["588a55dd.47d40c"]]},{"id":"47a25cc9.718694","type":"change","z":"b884fa68.1c7538","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Set.SignalK.Path.Here","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":560,"wires":[["6b0a12e8.d91edc"]]},{"id":"588a55dd.47d40c","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"K\"}","x":1210,"y":500,"wires":[]},{"id":"6b0a12e8.d91edc","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"K\"}","x":1210,"y":559,"wires":[]},{"id":"c9f1c7f.31e6038","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"K\"}","x":1210,"y":620,"wires":[]},{"id":"80ca5fcf.3dfac","type":"function","z":"b884fa68.1c7538","name":"","func":"if (msg.payload[0] == \"1w\")\n{\n msg.payload[2] = Number(msg.payload[2])\n msg.payload[2] = msg.payload[2] + 273,15\n msg.payload[1] = msg.payload[1].toUpperCase();\n msg1 = {topic:msg.payload[1], payload:msg.payload[2]}\n}\nif (isNaN(msg.payload[2]) == false)\n{\nreturn msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":640,"y":540,"wires":[["d286a428.baf338","ff49474a.1697b8"]]},{"id":"eb0280ce.c4086","type":"switch","z":"b884fa68.1c7538","name":"","property":"payload.1","propertyType":"msg","rules":[{"t":"eq","v":"Set.1st.SignalK.Path.Here","vt":"str"},{"t":"eq","v":"Set.2nd.SignalK.Path.Here","vt":"str"},{"t":"eq","v":"Set.3rd.SignalK.Path.Here","vt":"str"},{"t":"eq","v":"Set.4th.SignalK.Path.Here","vt":"str"},{"t":"eq","v":"Set.5th.SignalK.Path.Here","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":6,"x":490,"y":480,"wires":[["7e15c640.32a078"],["44eed0eb.b3955"],["6d0dd846.0bab88"],["50bc5e16.4b7f6"],["f894ab2f.84a378"],["80ca5fcf.3dfac"]]},{"id":"a21bcbfb.f79008","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"\"}","x":910,"y":260,"wires":[]},{"id":"a4da6f7b.f4156","type":"mqtt in","z":"b884fa68.1c7538","name":"","topic":"boat/lights","qos":"2","datatype":"auto","broker":"ae304772.442c58","x":100,"y":120,"wires":[["76ce1340.c155fc"]]},{"id":"76ce1340.c155fc","type":"switch","z":"b884fa68.1c7538","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":120,"wires":[["49c9c7af.638038"],["decda927.76b7c8"]]},{"id":"33f9a5.4fa5165c","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"K\"}","x":1210,"y":680,"wires":[]},{"id":"3164f690.00e92a","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"K\"}","x":1210,"y":740,"wires":[]},{"id":"c4e5e1eb.a106e","type":"change","z":"b884fa68.1c7538","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Set.SignalK.Path.Here","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":620,"wires":[["c9f1c7f.31e6038"]]},{"id":"23eca5ad.b7a3ca","type":"change","z":"b884fa68.1c7538","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Set.SignalK.Path.Here","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":740,"wires":[["3164f690.00e92a"]]},{"id":"c996fd8.1416c","type":"change","z":"b884fa68.1c7538","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Set.SignalK.Path.Here","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":680,"wires":[["33f9a5.4fa5165c"]]},{"id":"7e15c640.32a078","type":"function","z":"b884fa68.1c7538","name":"","func":"msg.topic = msg.payload[1]\nmsg.payload[2] = Number(msg.payload[2])\nmsg.payload = msg.payload[2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":260,"wires":[["a21bcbfb.f79008"]]},{"id":"44eed0eb.b3955","type":"function","z":"b884fa68.1c7538","name":"","func":"msg.topic = msg.payload[1]\nmsg.payload[2] = Number(msg.payload[2])\nmsg.payload = msg.payload[2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":300,"wires":[["1ba69e84.96f6d1"]]},{"id":"1ba69e84.96f6d1","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"\"}","x":910,"y":300,"wires":[]},{"id":"6d0dd846.0bab88","type":"function","z":"b884fa68.1c7538","name":"","func":"msg.topic = msg.payload[1]\nmsg.payload[2] = Number(msg.payload[2])\nmsg.payload = msg.payload[2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":340,"wires":[["377fb684.72165a"]]},{"id":"377fb684.72165a","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"\"}","x":910,"y":340,"wires":[]},{"id":"50bc5e16.4b7f6","type":"function","z":"b884fa68.1c7538","name":"","func":"msg.topic = msg.payload[1]\nmsg.payload[2] = Number(msg.payload[2])\nmsg.payload = msg.payload[2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":380,"wires":[["3f965eb1.6b7542"]]},{"id":"3f965eb1.6b7542","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"\"}","x":910,"y":380,"wires":[]},{"id":"f894ab2f.84a378","type":"function","z":"b884fa68.1c7538","name":"","func":"msg.topic = msg.payload[1]\nmsg.payload[2] = Number(msg.payload[2])\nmsg.payload = msg.payload[2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":420,"wires":[["935c52a9.2a2cc"]]},{"id":"935c52a9.2a2cc","type":"signalk-send-pathvalue","z":"b884fa68.1c7538","name":"","source":"","meta":"{\"units\":\"\"}","x":910,"y":420,"wires":[]},{"id":"4f6518cf.7bd748","type":"comment","z":"b884fa68.1c7538","name":"Set SignalK Paths for DI in Switch Node below","info":"","x":370,"y":420,"wires":[]},{"id":"e0b87898.4ac908","type":"comment","z":"b884fa68.1c7538","name":"Copy Adress from 1w sensors in Switch node above","info":"Default is 5 sensors. Add or remove Switch Node Outputs to match you amount of sensors.","x":670,"y":600,"wires":[]},{"id":"c86c00e7.d09d3","type":"comment","z":"b884fa68.1c7538","name":"Set IP for ESP device in TCP node below","info":"","x":640,"y":100,"wires":[]},{"id":"72369faa.92f4","type":"comment","z":"b884fa68.1c7538","name":"Digital Out is triggered Below. In this example from MQTT or Inject Nodes","info":"","x":300,"y":40,"wires":[]},{"id":"d72e42ec.5c1c1","type":"comment","z":"b884fa68.1c7538","name":"Digital In and 1w-sensors is collected below","info":"","x":210,"y":320,"wires":[]},{"id":"d19691b0.3f534","type":"comment","z":"b884fa68.1c7538","name":"Set SignalK Paths for 1W sensors in Change Nodes below","info":"","x":1130,"y":460,"wires":[]},{"id":"ff49474a.1697b8","type":"debug","z":"b884fa68.1c7538","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":780,"wires":[]},{"id":"ae304772.442c58","type":"mqtt-broker","name":"HA MQTT","broker":"10.242.214.114","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]