jmaferreira / homebridge-garage-door-shelly1

Homebridge plugin for a simple web-based garage
MIT License
9 stars 4 forks source link

Using 2 sensors? #8

Open uspino2 opened 3 years ago

uspino2 commented 3 years ago

I have 2 reed sensors in my gate, one for fully closed and one for fully open, each one wired to a different Shelly 1. One of them also controls the gate opening. Is there a way I can tweak this plugin to look at the status of both Shellys so that the OPEN status triggers when the reed in the second Shelly is activated? That way the transition from Opening to Open will reflect the real movement of the door. Thanks!

jmaferreira commented 3 years ago

I guess that's possible. You just need to add an new entry to the configuration and play around in the function https://github.com/easysdev/homebridge-garage-remote-http/blob/master/index.js#L73

You need somehow to determine which status endpoint you need to call to ensure the gate is on or off. I guess you can even call both and combine the information you receive into a single value of state: https://github.com/easysdev/homebridge-garage-remote-http#state-key

uspino2 commented 3 years ago

Thanks for your tips, but that's way out of my programming league! If you ever get your hands on it please let me know. I'm currently using this implementation with two sensors but I was trying to move away from mqtt .

hejsiri commented 1 year ago

The plug-in works perfectly. However, I am missing one important feature. I too need a solution with two sensors: an opening sensor and a closing sensor. This is very important when closing the gate with an ordinary remote control. The Shelly controller will receive information only when the gate is closed. It will not know that it is no longer open and will not know that it is just closing. In Shelly Plus 1 there is an option to add 2 opening sensors, wireless on Bluetooth. Information about their status can be easily extracted from the device with a query. Would it be possible to add such a function to this plug-in?