Beiträge von trbnrb

    Hallo alle zusammen,

    Ich habe mich in den letzten Tagen zum obenstehenden Thema belesen.

    Dank des folgenden Eintrages war schlussendlich die vollständige Integration als Garagentor mit Status in Homekit möglich. :thumbup:

    Das ganze wurde mithilfe von Node-Red, Mosquitto als MQTT-Broker und dem Node-Red Plugin

    node-red-contrib-homekit-preconfigured durchgeführt. Der Shelly wurde im wie im verlinkten Beitrag angeschlossen.

    Hier noch der erstellte Flow:

    Code
    [{"id":"a716b60b.24c5a","type":"tab","label":"Garage","disabled":false,"info":""},{"id":"a7d6e5d3.093688","type":"hk-garage-door","z":"a716b60b.24c5a","pincode":"918-93-191","username":"29:43:4B:92:38:AF","name":"Garage","port":"40232","interceptget":"No","originalId":"a7d6e5d3.093688","x":580,"y":300,"wires":[["670fdbc0.dee5f4"]]},{"id":"f8d84560.01283","type":"trigger","z":"a716b60b.24c5a","op1":"{\"TargetDoorState\": 0}","op2":"{\"CurrentDoorState\": false}","op1type":"json","op2type":"json","duration":"20","extend":false,"units":"s","reset":"","bytopic":"all","name":"Öffnen","x":370,"y":360,"wires":[["a7d6e5d3.093688"]]},{"id":"f0a1bc2c.640db8","type":"trigger","z":"a716b60b.24c5a","op1":"{\"CurrentDoorState\": true, \"TargetDoorState\": 1}","op2":"{\"CurrentDoorState\": true}","op1type":"json","op2type":"json","duration":"5","extend":false,"units":"s","reset":"","bytopic":"all","name":"Schließen","x":380,"y":280,"wires":[["a7d6e5d3.093688"]]},{"id":"aa3adf1d.eb4b","type":"http request","z":"a716b60b.24c5a","name":"Garage auf","method":"GET","ret":"txt","paytoqs":false,"url":"http://192.168.2.24/relay/0?turn=on","tls":"","persist":false,"proxy":"","authType":"","x":925.5,"y":195,"wires":[[]]},{"id":"cfa66f2c.9c2f98","type":"http request","z":"a716b60b.24c5a","name":"Garage zu","method":"GET","ret":"txt","paytoqs":false,"url":"http://192.168.2.24/relay/0?turn=on","tls":"","persist":false,"proxy":"","authType":"","x":925.5,"y":238,"wires":[[]]},{"id":"b66635b8.78f0b8","type":"inject","z":"a716b60b.24c5a","name":"ZU","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":148.5,"y":78,"wires":[["f0a1bc2c.640db8"]]},{"id":"84a28f7f.ac14d8","type":"inject","z":"a716b60b.24c5a","name":"OFFEN","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":148.5,"y":118,"wires":[["f8d84560.01283"]]},{"id":"e870b49f.34ac98","type":"switch","z":"a716b60b.24c5a","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":250,"y":320,"wires":[["f0a1bc2c.640db8"],["f8d84560.01283"]]},{"id":"a2c2b774.a3588","type":"mqtt in","z":"a716b60b.24c5a","name":"Sensor","topic":"shellies/shelly1-8CAAB505EA50/input/0","qos":"0","datatype":"auto","broker":"781d8278.6b2b84","x":130,"y":320,"wires":[["e870b49f.34ac98"]]},{"id":"670fdbc0.dee5f4","type":"switch","z":"a716b60b.24c5a","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":750,"y":220,"wires":[["aa3adf1d.eb4b"],["cfa66f2c.9c2f98"]]},{"id":"5edc4a62.51f934","type":"comment","z":"a716b60b.24c5a","name":"Status (CurrentDoorState)","info":"","x":130,"y":40,"wires":[]},{"id":"da249841.aaf68","type":"comment","z":"a716b60b.24c5a","name":"TargetDoorState","info":"","x":340,"y":40,"wires":[]},{"id":"cb25ee43.95b3","type":"inject","z":"a716b60b.24c5a","name":"Schließen","topic":"","payload":"{\"TargetDoorState\": 1}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":360,"y":80,"wires":[["cfa66f2c.9c2f98","a7d6e5d3.093688"]]},{"id":"509b11bc.427eb","type":"inject","z":"a716b60b.24c5a","name":"Öffnen","topic":"","payload":"{\"TargetDoorState\": 0}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":350,"y":120,"wires":[["aa3adf1d.eb4b","a7d6e5d3.093688"]]},{"id":"781d8278.6b2b84","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

    Was im nachhinein geändert werden muss sind zum einen das MQTT-Topic, sowie die IP-Adresse des MQTT-Brokers und die IP-Adresse des Shellys. Die Aufsplittung passiert, damit die Nutzung auch mit anderen Smartswitches möglich wäre.

    Die Einstellungen am Shelly 1:

    - Timer Auto OFF auf 1 Sekunde

    - Button Type auf Detached Switch

    - MQTT unter den Developer Settings aktivieren

    - Static IP ist dringend notwendig

    Ich hoffe es hilft ein paar von euch!;)