Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shutters closing randomly at reconnect #70

Closed
lollul opened this issue Sep 24, 2018 · 8 comments
Closed

shutters closing randomly at reconnect #70

lollul opened this issue Sep 24, 2018 · 8 comments

Comments

@lollul
Copy link

lollul commented Sep 24, 2018

I'm using 5 sonoff T1s for a couple of days now. I've noticed a few times shutters opening or closing "by themselves". Apparently it happens at the time it reconnects to mosquitto (with most basic config on openwrt).
Here is output from console:
16:10:55 MQT: tele/bawialnia/roleta/SENSOR = {"Time":"2018-09-24T16:10:55","SHUTTER-1":100}
16:15:55 MQT: tele/bawialnia/roleta/STATE = {"Time":"2018-09-24T16:15:55","Uptime":"2T01:48:39","Vcc":3.421,"POWER1":"OFF","POWER2":"OFF", "Wifi":{"AP":1, "SSId":"MYWIFI", "BSSId":"removed","Channel":6,"RSSI":60}, "DeepSleep":0, "Heap":24960}
16:15:55 MQT: tele/bawialnia/roleta/SENSOR = {"Time":"2018-09-24T16:15:55","SHUTTER-1":100}
16:20:22 MQT: Attempting connection...
16:20:22 MQT: Connected
16:20:22 MQT: tele/bawialnia/roleta/LWT = Online (retained)
16:20:22 MQT: cmnd/bawialnia/roleta/POWER =
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"shutterposition1":100}
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"ON"}
16:20:22 MQT: stat/bawialnia/roleta/POWER1 = ON
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"OFF"}
16:20:22 MQT: stat/bawialnia/roleta/POWER1 = OFF
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"ON"}
16:20:22 MQT: stat/bawialnia/roleta/POWER2 = ON
16:20:22 MQT: stat/bawialnia/roleta/SHUTTER1 = 100
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"ON"}
16:20:22 MQT: stat/bawialnia/roleta/POWER2 = ON
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"OFF"}
16:20:22 MQT: stat/bawialnia/roleta/POWER1 = OFF
16:20:22 MQT: stat/bawialnia/roleta/RESULT = {"shutterposition1":100}
16:20:55 MQT: tele/bawialnia/roleta/STATE = {"Time":"2018-09-24T16:20:55","Uptime":"2T01:53:39","Vcc":3.423,"POWER1":"OFF","POWER2":"ON", "Wifi":{"AP":1, "SSId":"MYWIFI", "BSSId":"removed","Channel":6,"RSSI":62}, "DeepSleep":0, "Heap":24960}
16:20:55 MQT: tele/bawialnia/roleta/SENSOR = {"Time":"2018-09-24T16:20:55","SHUTTER-1":100}
16:22:45 MQT: Attempting connection...
16:22:45 MQT: Connected
16:22:45 MQT: tele/bawialnia/roleta/LWT = Online (retained)
16:22:45 MQT: cmnd/bawialnia/roleta/POWER =
16:22:45 MQT: stat/bawialnia/roleta/RESULT = {"shutterposition1":100}
16:22:45 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"OFF"}
16:22:45 MQT: stat/bawialnia/roleta/POWER2 = OFF
16:22:45 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"ON"}
16:22:45 MQT: stat/bawialnia/roleta/POWER1 = ON
16:22:45 Shutter 0: Real Pos: 38000, Target 38000, source: Shutter, pos %: 100, direction: 1, rtcshutter: 0
16:22:46 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"OFF"}
16:22:46 MQT: stat/bawialnia/roleta/POWER1 = OFF
16:22:46 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"ON"}
16:22:46 MQT: stat/bawialnia/roleta/POWER2 = ON
16:22:46 MQT: stat/bawialnia/roleta/SHUTTER1 = 100
16:22:46 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"ON"}
16:22:46 MQT: stat/bawialnia/roleta/POWER2 = ON
16:22:46 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"OFF"}
16:22:46 MQT: stat/bawialnia/roleta/POWER1 = OFF
16:22:46 MQT: stat/bawialnia/roleta/RESULT = {"shutterposition1":100}
16:23:42 MQT: Attempting connection...
16:23:46 MQT: Connected
16:23:46 MQT: tele/bawialnia/roleta/LWT = Online (retained)
16:23:46 MQT: cmnd/bawialnia/roleta/POWER =
16:23:46 MQT: stat/bawialnia/roleta/RESULT = {"shutterposition1":100}
16:23:46 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"OFF"}
16:23:46 MQT: stat/bawialnia/roleta/POWER2 = OFF
16:23:47 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"ON"}
16:23:47 MQT: stat/bawialnia/roleta/POWER1 = ON
16:23:47 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"OFF"}
16:23:47 MQT: stat/bawialnia/roleta/POWER1 = OFF
16:23:47 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"ON"}
16:23:47 MQT: stat/bawialnia/roleta/POWER2 = ON
16:23:47 MQT: stat/bawialnia/roleta/SHUTTER1 = 100
16:23:47 MQT: stat/bawialnia/roleta/RESULT = {"POWER2":"ON"}
16:23:47 MQT: stat/bawialnia/roleta/POWER2 = ON
16:23:47 MQT: stat/bawialnia/roleta/RESULT = {"POWER1":"OFF"}
16:23:47 MQT: stat/bawialnia/roleta/POWER1 = OFF
16:23:47 MQT: stat/bawialnia/roleta/RESULT = {"shutterposition1":100}

Wonder what I could have messed up in my configuration. Just have option80, 81, 14 turned on. Used to have option13 as well but gave up on it.
Thanks a lot!

@lollul
Copy link
Author

lollul commented Sep 25, 2018

I've tried restarting mosquitto and restarting WIFI on my routers but I can't reproduce it. Two out of 5 shutters did go a little crazy again this morning by since then they've been good.
I've set PowerOnState now to 0 and will observe further.

Also, wonder if this fix could help: arendst#3558

The one odd thing about my configuration is that I have two wifi routers giving the same SSID and the sonoffs are in good range with one of them but the barely connect with the other. So, what I've observed is that sometimes they connect to the weaker one and they keep this weak connection while I can't even ping them and they don't attempt to reconnect to the stronger router.

@stefanbode
Copy link
Owner

Hi, the SsID configuration could not be the issue. I have the same with FritzBox repeaters. Very strange is that after a restart r whatever reason the relay start in the ON modus. This is very strange. Can you Check on your mosquito if you have some retained messages to switch on the relay. This must also be visible directly after boot. Maybe also,the option wificonfig 5 May help. All guesses because I do not see this behavior at my shutters and it look like only some shutters are effected.

@stefanbode
Copy link
Owner

Maybe you can increase the loglevel to get an idea where the commands come from to switch on the relays. I see for sure some external reason. Maybe a switch that is not operating correctly.

@stefanbode
Copy link
Owner

I read the issue in aredst list an maybe you should compile it against the lastest 2.4 libary. Default is 2.2 as far as I remember. These reconnecects are issues very deep in the ESP libarary and not easy to fix

@lollul
Copy link
Author

lollul commented Sep 26, 2018

I have a sneaking suspicion it could be about the physical buttons on my T1s as some of them need to be pressed harder than the other.
I've set PowerOnState to 0 and so far no "phantom" shutter movements...but its been less than 24h.
I'll try to recompile as you've suggested by not sure I'll manage..

Thank you for looking into this!

@stefanbode
Copy link
Owner

A higher loglevel will definitely provide answers where the command came from. Than it straight forward to eliminate the issue. From what your’re writing I assume a bouncing switch not have a clear disconnect and then time or temperature is your enemy.

@lollul
Copy link
Author

lollul commented Sep 28, 2018

OK, I feel really stupid now and sorry I've wasted Stefan's time.
Turns out the root cause was "MQTT Linear" android app. When running on more than 1 device it is causing some havoc...
Now I'll need to find out better frontend. Home assistant is too big for my openwrt router and I didn't like domoticz but maybe I should give it another try.

@lollul lollul closed this as completed Sep 28, 2018
@stefanbode
Copy link
Owner

no worries. great to hear you are successful. The complete eco-system is still quite complicated and there are so many places to make mistakes.

stefanbode pushed a commit that referenced this issue Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants