MacWyznawca / homebridge-mqtt-switch-tasmota

Plugin to HomeBridge optimized to work with firmware Sonoff-Tasmota, MQTT.
MIT License
57 stars 18 forks source link

Switch status inconsistences on home app #44

Open iandronowicz opened 6 years ago

iandronowicz commented 6 years ago

Sometimes a switch would appear offline or online and its actually in the opposite state. I’m targeting this plugin because when I restart homebridge everything shows up in the correct state:

Example: turn on light with physical switch and when checking the home app it says OFF. I restart homebridge and now it says ON, correctly. Sometimes I just toggle the switch on in the home app to have it in the correct state.

I repeat: it happens sometimes, most of the time everything works as it should, by the times that it doesn’t it’s really annoying, away from home a think Everything it’s off and it isn’t .

Thanks!

iandronowicz commented 6 years ago

I’m using a raspberry pi 3 with mosquitto. Here is my config of one of the switches (the are all the same):

           "accessory": "mqtt-switch-tasmota",                "name": "Luz De Pasillo",
            "url": "mqtt://10.0.1.10",
            "username": "",
            "password": "",
            "topics": {
                    "statusGet": "stat/sonoffbasic10/RESULT",
                    "statusSet": "cmnd/sonoffbasic10/POWER",
                    "stateGet": "tele/sonoffbasic10/STATE"
            },
            "onValue": "ON",
            "offValue": "OFF",
            "activityTopic": "tele/sonoffbasic10/LWT",
            "activityParameter": "Online",
            "startCmd": "cmnd/sonoffbasic10/TelePeriod",
            "startParameter": "60",
            "manufacturer": "ITEAD",
            "model": "Sonoff",
            "serialNumberMAC": "sonoffbasic10"
    }
iandronowicz commented 6 years ago

I've just noticed something more: this is happening to me on 3 other sonoffs that the EVE app shows them as OFFLINE. I checked in the homekit app, in the details of each switch and it says STATUS ACTIVE NO.

The thing is that the physical switch works, the openhab2 web front end of each with works perfectly, and even when I use it in homekit it also works, just not showing the status when toggle from outside of homekit....

iandronowicz commented 6 years ago

I checked everything comparing the configuration between the working sonoffs (status active yes in homekit and eve app) and the not working ones (status active no). Everything is exactly the same: the config on each Sonoff and the config on Homebridge.

Again, restarting Homebridge makes everything work again, but there's definitely something wrong here, when a switch goes to status active no it doesn't goes back on until I restart Homebridge.

turbidWaters commented 6 years ago

I m having a similar issue, however, all switches in the home app are consistently in the OFF state on restarting homebridge. NOTE that while starting up, the tasmota-mqtt plug-in logs this for all the switches:

...[Balcony Socket LR] Initializing mqtt-switch-tasmota accessory... ...[Balcony Socket LR] Nazwa do RESULT POWER2

Everything else works fine! What am I doing wrong?