arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

Garage Door Opener - Stopped #590

Open dxoverdy opened 1 year ago

dxoverdy commented 1 year ago

Hi there,

Please let me start by heaping praise on this development. What a massive contribution to the community.

It probably isn't an issue with MQTTThing, but I thought it prudent to check. It's to do with 'Stopped.'

A little background, I've done an ESP8266 development for my garage door which shorts the up/down/stop pins on the garage door control box for a short duration (activating the full open / close sequences or stop), and together with a magnetic sensor screwed to the floor, the magnet screwed to the door and a limit switch at the top to be triggered when the door is fully open, I've got a solution which I'm really happy with. The door control box is essentially dumb, it's my ESP8266 which does all the communication with MQTTThing.

To give you an idea of what gets spat out:

This works really well with MQTTthing, however I have noticed if I manually stop the door mid way through an open or shut sequence, my phone falls back to showing 'Open', even though the logs correctly indicate an 'S' state received.

[10/7/2022, 9:17:00 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = C [10/7/2022, 9:17:00 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = C [10/7/2022, 9:17:00 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = C [10/7/2022, 9:17:03 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = C [10/7/2022, 9:17:03 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = C [10/7/2022, 9:17:04 AM] [Garage Door] Publishing MQTT: Gliderol2MQTT/set/target/door/state = O [10/7/2022, 9:17:04 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:06 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = o [10/7/2022, 9:17:06 AM] [Garage Door] Received o - currentDoorState state is now 2 [10/7/2022, 9:17:06 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:09 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = o [10/7/2022, 9:17:09 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:12 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = o [10/7/2022, 9:17:12 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:15 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = S [10/7/2022, 9:17:15 AM] [Garage Door] Received S - currentDoorState state is now 4 [10/7/2022, 9:17:15 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:18 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = S [10/7/2022, 9:17:18 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:21 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = S [10/7/2022, 9:17:21 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:24 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = S [10/7/2022, 9:17:25 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/target/door/state = O [10/7/2022, 9:17:27 AM] [Garage Door] Received MQTT: Gliderol2MQTT/get/current/door/state = S

At first I thought try sending S to the target door state, however that reports back an error from MQTTThing to the effect of 'S is not a valid option'

Would this be expected behaviour for a stop? Further, is there any functionality to stop the door via HomeKit?

Many thanks and apologies for the long read! Dan

image003 image004 image002