Created
May 13, 2019 02:02
-
-
Save NorthernMan54/1d57c052a2c798a8e12129d9c9e7b889 to your computer and use it in GitHub Desktop.
Trailer Relay Board
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"6776417c.949518","type":"homekit-service","z":"9bbd1ab4.2c5028","bridge":"f2cd5776.567c58","name":"Trailer1","serviceName":"Switch","topic":"cmnd/sonoff-7360/POWER1","manufacturer":"NorthernMan54","model":"4 Channel Relay Board","serialNo":"Default Serial Number","characteristicProperties":"{\n \"On\": true\n}","x":300,"y":380,"wires":[["39fec1c7.c8de06","9f212ccf.647de"]]},{"id":"b8ea1091.076528","type":"homekit-service","z":"9bbd1ab4.2c5028","bridge":"f2cd5776.567c58","name":"Trailer2","serviceName":"Switch","topic":"cmnd/sonoff-7360/POWER2","manufacturer":"NorthernMan54","model":"4 Channel Relay Board","serialNo":"Default Serial Number","characteristicProperties":"{\n \"On\": true\n}","x":300,"y":440,"wires":[["39fec1c7.c8de06","9f212ccf.647de"]]},{"id":"8e43f7a0.a0bbf8","type":"homekit-service","z":"9bbd1ab4.2c5028","bridge":"f2cd5776.567c58","name":"Trailer3","serviceName":"Switch","topic":"cmnd/sonoff-7360/POWER3","manufacturer":"NorthernMan54","model":"4 Channel Relay Board","serialNo":"Default Serial Number","characteristicProperties":"{\n \"On\": true\n}","x":300,"y":500,"wires":[["39fec1c7.c8de06","9f212ccf.647de"]]},{"id":"95840134.b0b4b","type":"homekit-service","z":"9bbd1ab4.2c5028","bridge":"f2cd5776.567c58","name":"Trailer4","serviceName":"Switch","topic":"cmnd/sonoff-7360/POWER4","manufacturer":"NorthernMan54","model":"4 Channel Relay Board","serialNo":"Default Serial Number","characteristicProperties":"{\n \"On\": true\n}","x":300,"y":560,"wires":[["39fec1c7.c8de06","9f212ccf.647de"]]},{"id":"7c5c8d53.91ea3c","type":"mqtt out","z":"9bbd1ab4.2c5028","name":"Leonard","topic":"","qos":"","retain":"","broker":"923a4607.f50cf","x":680,"y":560,"wires":[]},{"id":"39fec1c7.c8de06","type":"function","z":"9bbd1ab4.2c5028","name":"HB to Tasmota","func":"msg.payload = ( msg.payload.On ? \"ON\" : \"OFF\" );\nreturn msg;","outputs":1,"noerr":0,"x":500,"y":560,"wires":[["7c5c8d53.91ea3c"]]},{"id":"9f212ccf.647de","type":"debug","z":"9bbd1ab4.2c5028","name":"Input","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","x":670,"y":380,"wires":[]},{"id":"f696e204.a2a26","type":"debug","z":"9bbd1ab4.2c5028","name":"Output","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","x":670,"y":280,"wires":[]},{"id":"6c51d2e8.73baec","type":"mqtt in","z":"9bbd1ab4.2c5028","name":"Trailer","topic":"stat/sonoff-7360/#","qos":"2","broker":"923a4607.f50cf","x":90,"y":280,"wires":[["975fbc4b.bf5d5"]]},{"id":"47c9ec50.38b174","type":"function","z":"9bbd1ab4.2c5028","name":"Tasmota to HB","func":"msg.payload = ( msg.payload === \"ON\" ? { \"On\": 1 } : { \"On\": 0 } );\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":280,"wires":[["f696e204.a2a26","be54381d.08efb8"]]},{"id":"975fbc4b.bf5d5","type":"function","z":"9bbd1ab4.2c5028","name":"Power Topic","func":"if (msg.topic.startsWith(\"stat/sonoff-7360/POWER\")) \n { msg.topic = msg.topic.replace(\"stat\",\"cmnd\");\n return msg;\n } else \nreturn null;","outputs":1,"noerr":0,"x":250,"y":280,"wires":[["47c9ec50.38b174"]]},{"id":"be54381d.08efb8","type":"switch","z":"9bbd1ab4.2c5028","name":"Router","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"cmnd/sonoff-7360/POWER1","vt":"str"},{"t":"eq","v":"cmnd/sonoff-7360/POWER2","vt":"str"},{"t":"eq","v":"cmnd/sonoff-7360/POWER3","vt":"str"},{"t":"eq","v":"cmnd/sonoff-7360/POWER4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":110,"y":400,"wires":[["6776417c.949518"],["b8ea1091.076528"],["8e43f7a0.a0bbf8"],["95840134.b0b4b"]]},{"id":"f2cd5776.567c58","type":"homekit-bridge","z":"","bridgeName":"Node-Red-Maggie","pinCode":"031-45-154","port":"51826","allowInsecureRequest":true,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number"},{"id":"923a4607.f50cf","type":"mqtt-broker","z":"","name":"","broker":"leonard","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had built this as custom setup for a friend, based on this 4 Channel Relay Board https://www.creatroninc.com/product/4-channel-5v-10a-dc-relay-module/?search_query=relay&results=40
I had flashed a stock nodemcu with son off-tasmota 6.5.0, and made these configuration changes.
1 - Under Configure MQTT, I set the full topic, to
%prefix%/%topic%-7360/
2 - Configure Module
3 - In the console
4 - On my mosquito server, created a file /etc/avahi/services/mosquitto.service