homebridge-sonoff-basic-espeasy
homebridge-sonoff-basic-espeasy copied to clipboard
On/Of state issue
The status On/Off in Homebridge is not changing when I switch on/off pressing physical button or change state through http request.
The state is only updated when you open the Home-App. It's not possible to receive state changes from a device without a platform plugin containing a server to push changes to. Correct me if I'm wrong.
Yes, you're right. Maybe the better way to do this will be using MQTT like in plugin for homebridge for Tasmota firmware?
I'm pretty sure it's impossible to changing when pressing physical button. If you know way, share with us.
It's possible with MQTT, because when state is changed switch sending notification to MQTT broker.
Could you explain what way sonoff with MQTT know that wall switch change status?
It's nothing related to this project. But… You need an additional device, a "MQTT broker" and you have to configure it to communicate with each MQTT device. You can do a search on Google on how to configure this things. Spoiler: It's a bag of hurts. The way it works? The same as with Homebridge Platforms. MQTT devices report their state to their broker. This state is then pushed to Homebridge and HomeKit. You can configure MQTT with ESPeasy, there's no Tasmota firmware necessary. But that's a completely different story…
I'm not sure you understand me. I have this scheme wiring: http://prntscr.com/i0qrfb
Test case: State OFF on HomeAPP.
- Turn on Lights with my HomeAPP on R1 relay, and Sonoff PRO swithc reley and Light ON. State ON on HomeAPP.
- When I pressing physical key "WALL SWITHC" Disconnect Electric Cricuit and turn off Light. State continue ON on HomeAPP.
How to change state, which device to purchase?
I do understand. You have two own Homebridge Repos so I assume that you do know how the basics of homebridge work and what the differences between accessories and platforms are. That difference is the reason why the state does not change when you press the physical button. If you want to change that behaviour you need either a homebridge platform or some server infrastructure for the Sonoff to report (push) state changes to which then needs to be integrated into HomeKit/-Bridge. One option is MQTT or something similar – how to configure this is something to ask the MQTT-people, ESPeasy offers support for it by default. But there's no way to change the behaviour of this plugin (as long as it's an accessory) to detect the changes. The state of an accessory is only updated when HomeKit polls for it's state and there's no way for an accessory to initiate the update by itself.