-
Notifications
You must be signed in to change notification settings - Fork 38
garageport
This example shows how to use the service Garage Door Opener
in node-red:
[{"id":"MQTT.Localhost","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"12aa7850.0cb9c8","type":"mqtt out","name":"","topic":"homebridge/to/add","qos":"","retain":"","broker":"MQTT.Localhost","x":546,"y":100,"z":"19af2d6a.74e9bb","wires":[]},{"id":"f0ee7d2a.106a38","type":"inject","name":"garage","topic":"","payload":"{\"name\":\"garage2\" }","payloadType":"string","repeat":"","crontab":"","once":false,"x":179,"y":207,"z":"19af2d6a.74e9bb","wires":[["906ea779.cc4cd"]]},{"id":"906ea779.cc4cd","type":"mqtt out","name":"","topic":"homebridge/to/remove","qos":"","retain":"","broker":"MQTT.Localhost","x":551,"y":181,"z":"19af2d6a.74e9bb","wires":[]},{"id":"8031a090.b05a4","type":"comment","name":"garage test","info":"","x":228,"y":67,"z":"19af2d6a.74e9bb","wires":[]},{"id":"aa578889.1bda6","type":"mqtt out","name":"","topic":"homebridge/to/set","qos":"","retain":"","broker":"MQTT.Localhost","x":592,"y":324,"z":"19af2d6a.74e9bb","wires":[]},{"id":"931355d7.bb2688","type":"template","name":"TargetDoorState","field":"payload","format":"handlebars","template":"{\"name\":\"garage2\",\"characteristic\":\"TargetDoorState\",\"value\": {{payload}}}","x":330,"y":307,"z":"19af2d6a.74e9bb","wires":[["aa578889.1bda6"]]},{"id":"a443fc1c.d22f1","type":"template","name":"CurrentDoorState","field":"payload","format":"handlebars","template":"{\"name\":\"garage2\",\"characteristic\":\"CurrentDoorState\",\"value\": {{payload}}}","x":333,"y":359,"z":"19af2d6a.74e9bb","wires":[["aa578889.1bda6"]]},{"id":"23cfbe0d.9a55b2","type":"inject","name":"garage","topic":"","payload":"{\"name\":\"garage2\",\"service\":\"GarageDoorOpener\"}","payloadType":"string","repeat":"","crontab":"","once":false,"x":148,"y":146,"z":"19af2d6a.74e9bb","wires":[["12aa7850.0cb9c8"]]},{"id":"b63cfa6c.fc7118","type":"inject","name":"0 = open","topic":"","payload":"0","payloadType":"string","repeat":"","crontab":"","once":false,"x":115,"y":449,"z":"19af2d6a.74e9bb","wires":[["a443fc1c.d22f1"]]},{"id":"cd6858e4.62eb78","type":"inject","name":"1 = closed","topic":"","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":114,"y":495,"z":"19af2d6a.74e9bb","wires":[["a443fc1c.d22f1"]]},{"id":"850ce9b1.89a468","type":"inject","name":"2 = opening","topic":"","payload":"2","payloadType":"string","repeat":"","crontab":"","once":false,"x":120,"y":558,"z":"19af2d6a.74e9bb","wires":[["a443fc1c.d22f1"]]},{"id":"2ba9731d.7cf0b4","type":"inject","name":"3 = closing","topic":"","payload":"3","payloadType":"string","repeat":"","crontab":"","once":false,"x":117,"y":599,"z":"19af2d6a.74e9bb","wires":[["a443fc1c.d22f1"]]},{"id":"13c3e3eb.b70464","type":"comment","name":"current door states","info":"// The value property of CurrentDoorState must be one of the following:\nCharacteristic.CurrentDoorState.OPEN = 0;\nCharacteristic.CurrentDoorState.CLOSED = 1;\nCharacteristic.CurrentDoorState.OPENING = 2;\nCharacteristic.CurrentDoorState.CLOSING = 3;\nCharacteristic.CurrentDoorState.STOPPED = 4;","x":105,"y":405,"z":"19af2d6a.74e9bb","wires":[]},{"id":"7ff1935.d324b6c","type":"inject","name":"4 = stopped","topic":"","payload":"4","payloadType":"string","repeat":"","crontab":"","once":false,"x":116,"y":652,"z":"19af2d6a.74e9bb","wires":[["a443fc1c.d22f1"]]},{"id":"dfe4461c.b25ec","type":"inject","name":"0 = open","topic":"","payload":"0","payloadType":"string","repeat":"","crontab":"","once":false,"x":108,"y":290,"z":"19af2d6a.74e9bb","wires":[["931355d7.bb2688"]]},{"id":"f7f1ff78.fa89d","type":"inject","name":"1 = closed","topic":"","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":114,"y":332,"z":"19af2d6a.74e9bb","wires":[["931355d7.bb2688"]]},{"id":"5a4e7ac.a7e6784","type":"template","name":"ObstructionDetected","field":"payload","format":"handlebars","template":"{\"name\":\"garage2\",\"characteristic\":\"ObstructionDetected\",\"value\": {{payload}}}","x":406,"y":538,"z":"19af2d6a.74e9bb","wires":[["aa578889.1bda6"]]},{"id":"c9d15045.2531f","type":"inject","name":"0 = open","topic":"","payload":"0","payloadType":"string","repeat":"","crontab":"","once":false,"x":298,"y":481,"z":"19af2d6a.74e9bb","wires":[["5a4e7ac.a7e6784"]]},{"id":"fd4169d5.79613","type":"inject","name":"1 = closed","topic":"","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":293,"y":443,"z":"19af2d6a.74e9bb","wires":[["5a4e7ac.a7e6784"]]}]