-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
stopped working from the last hassio update #154
Comments
hopefully i might take a fresh look on the problem this weekend, no promises though. |
that would be great. |
+1, would love to see this working again! |
+1 from me. This is the error getting logged by HASS 2019-10-04 22:17:36 ERROR (Thread-13) [websocket] error from callback <bound method Sonoff.on_message of <custom_components.sonoff.Sonoff object at 0x1050f0b50>>: string indices must be integers |
@primalnow i have no idea what's throwing these errors to you, maybe you have a particular different version of websocket-client that's messing things up for all the others, i push a little fix, it'll be cool if someone could give it a try :) |
@peterbuga Thank you very much for the amazing work you're doing. You're a life-saver for Sonoff. I have tried the new files. Seems to be working right now. Will test for the rest of the day, and post again, just to confirm. Thanks again. |
Problem persists. Everything becomes unavailable after a while. Restarted HASS - All items disappeared. Nothing came from sonoff. However. Every time a switch is operated, the following is showing up in the log. (I have altered the API key. ). Which means sonoff is sending updates. It's just the initial registry of the devices, that gets messed up. I'm just guessing here. You know best. 2019-10-05 13:04:35 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"action":"sysmsg","deviceid":"100074f74c","apikey":"a4f8-4446591a08fb","ts":0,"params":{"online":true}} 2019-10-05 13:09:13 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"action":"sysmsg","deviceid":"1000683294","apikey":"-8c85-4e87-9f90-aa9e5fcc4b2d","ts":0,"params":{"online":true}} |
I turned a switch on/off. The following error showed up in the logs. And all devices, immediately, became unavailable. The updates are still coming in the log (pasted at the bottom), but the interface has marked everything as unavailable. 2019-10-05 13:17:26 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"action":"update","deviceid":"10007797c8","apikey":"712-f9b557c6aa75","userAgent":"app","sequence":"1570263445519","ts":0,"params":{"switch":"on"},"tempRec":"10007797c8"} 2019-10-05 13:19:17 INFO (MainThread) [custom_components.sonoff] Grace period active |
@primalnow thanks for the debugs 👍 i'm also led to believe that this happens only on hassio installs, someone else reported it yesterday working just fine on a venv type of HA v0.99.3 ps: truth be told i really think this might require a basic fix but without being able to replicate it i'm dead in the water |
Another interesting thing happened. Came back after lunch, and all devices were showing again. But then they have become unavailable again. The error in the logs is: 2019-10-05 13:53:57 DEBUG (Thread-26) [custom_components.sonoff] websocket closed |
I'm running homeassistant on a mac. websocket │ 0.2.1 │ 0.2.1 │ https://pypi.python.org/pypi/websocket Python version: /usr/local/lib/python3.7/site-packages/homeassistant/components The devices keep coming and going. As for alternate solutions - I have already decided to switch over to Tuya devices. But my installation is too big, to just switch over. I have almost 75 devices in place. I can program, but I have almost zero python experience. I could start learning, but I doubt if I'd be any use to you. |
The problem is definitely here. This is what screws things up. This was triggered when I turned a switched on. First few operations worked fine, and then BOOM.: 2019-10-05 14:11:46 DEBUG (Thread-5) [custom_components.sonoff] websocket msg: {"action":"update","deviceid":"100060ceeb","apikey":"-dce8-46ad-b712-f9b557c6aa75","userAgent":"device","ts":0,"params":{"switch":"off","fwVersion":"3.3.0","rssi":-84,"staMac":"84:0D:8E:50:AE:C0","startup":"off","init":1,"pulse":"on","pulseWidth":1800000},"from":"device"} |
Things are working again for me - HASS on Ubuntu Server. Thanks! |
I've downgraded hass to 0.97.1, and it's the same problem. Which means, it's neither hass, nor your component. Something else has changed. I would suspect Sonoff has changed something on their end. Can you give me a hint on how to debug this? Is there anything I can do to show you what's going on? |
@primalnow just for the kinks i installed & ran Hassio VM version, copy-paste files and config and boom just works!!! until new information comes up to point me into some direction i'm dropping the possible fix on this problem ... |
Oh I don't mind the time. :-) Just that I can't reinstall my MacOS :) However I do have a spare Mac lying around. Will set things up on it. Watch this space for an update :) |
Or maybe I should stop being a stubborn git, and order a Raspberry Pi :) |
Good now its work on vm
בתאריך שבת, 5 באוק׳ 2019, 12:58, מאת Peter Buga <notifications@github.com>:
… @primalnow <https://github.com/primalnow> just for the kinks i installed
& ran Hassio VM version, copy-paste files and config and boom just works!!!
so it's clearly something *on your side*, most likely some other
component installed a particular package version and messed things up.
the only thing i could recommend is to start from scratch (fresh OS, fresh
HA install), activate sonoff component first and then re-add/re-activate
all the other components one by one. i know it's a lot of work but i myself
waste a lot of time trying to fix a (as of time of speaking)
non-reproducible bug.
until new information comes up to point me into some direction i'm
dropping the possible fix on this problem ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#154?email_source=notifications&email_token=ALD37BH3VWXJD5ZZIYXEKIDQNBQLNA5CNFSM4I5CD6Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANO3MI#issuecomment-538635697>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALD37BF5SPTZT3PXE4GG7E3QNBQLNANCNFSM4I5CD6QQ>
.
|
@primalnow you mean you have HA installed straight into MacOS 😱? no containment or anything else? if so, that’s a huuuuuuge big mistake! do yourself a favour and install HA in a virtual machine or run Hassio VM, it took me < 10 min to set it up Sent with GitHawk |
Yes its work ,ha on vm
בתאריך שבת, 5 באוק׳ 2019, 13:18, מאת Peter Buga <notifications@github.com>:
… @primalnow <https://github.com/primalnow> you mean you have HA installed
straight into MacOS 😱? no containment or anything else? if so, that’s a
huuuuuuge big mistake! do yourself a favour and install HA in a virtual
machine or run Hassio VM, it took me < 10 min to set it up
Sent with GitHawk <http://githawk.com>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#154?email_source=notifications&email_token=ALD37BCBSTXX6EVM2QYVFTDQNBSXXA5CNFSM4I5CD6Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANPGVY#issuecomment-538637143>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALD37BFJUO2EMPMC63ZHES3QNBSXXANCNFSM4I5CD6QQ>
.
|
I noticed who works with the Raspberry Pie after the repair to take out the
electricity for 10 minutes
בתאריך שבת, 5 באוק׳ 2019, 13:19, מאת Shemtov Malka <shemtov16@gmail.com>:
… Yes its work ,ha on vm
בתאריך שבת, 5 באוק׳ 2019, 13:18, מאת Peter Buga ***@***.***
>:
> @primalnow <https://github.com/primalnow> you mean you have HA installed
> straight into MacOS 😱? no containment or anything else? if so, that’s a
> huuuuuuge big mistake! do yourself a favour and install HA in a virtual
> machine or run Hassio VM, it took me < 10 min to set it up
>
> Sent with GitHawk <http://githawk.com>
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#154?email_source=notifications&email_token=ALD37BCBSTXX6EVM2QYVFTDQNBSXXA5CNFSM4I5CD6Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANPGVY#issuecomment-538637143>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ALD37BFJUO2EMPMC63ZHES3QNBSXXANCNFSM4I5CD6QQ>
> .
>
|
@peterbuga yes. I've been living dangerously :) I guess it's time to fix that, and do a VM. Or just get a Pi4. I had an old installation running on another mac. Ver .92.2 I am getting the following error. BUT IT IS WORKING. The error is there, but sonoff devices seem to be stable so far. 46ad-b712-f9b557c6aa75","userAgent":"device","ts":0,"params":{"switches":[{"outlet":0,"switch":"off"},{"outlet":1,"switch":"on"},{"outlet":2,"switch":"off"},{"outlet":3,"switch":"off"}]},"from":"device","seq":"956"} |
@primalnow are you 100% sure you have the latest |
@peterbuga What do you mean by "master code"? |
@peterbuga Installed hassio.vmk. Sonoff not working. I have no errors, but no devices either. Since I can't figure out where the logs, etc. are, I can't see what's going on. Will set up a Virtual Ubuntu box, and then try to runn hassio from there. Tomorrow. :-) Thanks for "wasting" your time with me. -Faisal Qureshi |
i am using a pai. |
@peterbuga Double checked. Definitely using the master branch. Interestingly, in the logs - Sonoff is sending continuous updates on devices (see log below), but there are no sonoff devices in the interface. Since I restarted HASS, they never got registered, so they're not "unavailable". They just did not register. -- 2019-10-06 14:23:32 DEBUG (Thread-2) [custom_components.sonoff] websocket msg: {"action":"sysmsg","deviceid":"1000760502","apikey":"9436de0a-16a9-43ab-8ed4-46328b026347","ts":0,"params":{"online":true}} |
yes i know, it's related to this 8b2955f#r35375118 |
@primalnow ( and @ everyone-else) can you please give a try to fresh-out-of-the-oven latest push i've done on |
@peterbuga And we have touchdown. The Eagle has landed. You're a star. Thank you so much for struggling with us. One little thing in the logs though :-) 2019-10-06 16:57:55 DEBUG (MainThread) [custom_components.sonoff] Create the main object |
finally some good news 🙌! the imei/iphone/etc are all fake and randomized every time the HA component boots in a struggle to make this component's login possible harder to track soo no need to worry about that (also i never had an android - and hopefully never will - to add the request information of that os... and i'm too lazy to put out a virtual machine just for that) let's wait & hope more people report the same positive output as you did 🤞 |
Running stable. No errors. No warnings. Thank you for your hard work. Any way of buying you coffee? :) -Faisal Qureshi |
+1 on the coffee. |
Friends, anyone who works with Raspberry Pie has to put the new Sonoff file
on the folder turn , off and on after 10 minutes, for me it works
continuously without fail, for the other devices I do not know
בתאריך יום א׳, 6 באוק׳ 2019, 17:04, מאת daboshman <notifications@github.com
…:
+1 on the coffee.
Where do i donate?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#154?email_source=notifications&email_token=ALD37BCBMNUV72PEHEQT6NDQNHV5RA5CNFSM4I5CD6Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOK2XY#issuecomment-538750303>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALD37BHFWUAHLHWUWQOBQQ3QNHV5RANCNFSM4I5CD6QQ>
.
|
@primalnow @daboshman there's a paypal button at the bottom of the project's page if you feel generous to express gratitude in any way 😊! all donations go towards buying new sonoff devices so that i can integrate/debug them easier without constant pinging people over the world if it works or not 😒 |
done! |
Thanks peterbuga |
@peterbuga sent some love via paypal. Thanks once again for your amazing work. It wasn't for this script, I'd have thrown away my Sonoff investment :). Godspeed. |
follow this link |
@daboshman @primalnow love has been received ❤️ thank you! with your permission i'd like to add you to the credits section of this project 😊 (i know it's not much but it's the best i can do so far) from the fact there are no more complains i assume the latest fix it's stable-ish, i'm going to wait a bit more (and might sound a bit odd) but i'm really eager to close this issue and focus on implementing new stuff rather than fixing bugs |
@peterbuga I'd be honored. I wish I could help you with the maintenance. I'm afraid, my python skills are quite slim. The latest fix is actually more stable than it was, before the problem started. Curiosity demands that I ask. What new stuff do you have planned? -Faisal Qureshi |
but next thing to add (now that donations pilled up a bit, thanks again 👐 ) Sonoff RF Bridge - it's a common request and quite tricky do debug in remote mode |
1 - New devices -> Yaayyyy 2 - RF Bridge -> waste of time. The 4 device limit, makes it almost useless. 3 - Bulbs -> If you could get them to turn on/off, that would be enough too. 4 - Switching multiple entities -> This is SUPER CRUCIAL. Without this, HASS groups, and scenes, are practically useless. This is the biggest limitation of your API. I need to keep figuring out work-arounds, which are not so nice. So my vote is to attack this problem ASAP. I promise you even more coffee, if you can get this going :) And thanks for the latest update. Installed it. -Faisal Qureshi |
I have to agree on point 4.... this is really anoying have to add 3-4-5 shedules to get things to turn on/off instead of just 1 which should be enough. |
Sonoff B1 are fully supported (in branch Switching multiple entities in the same is kinda harder than it sounds (because the API doesn't support this) and truth be told I wasn't sure this was a big problem => never a top priority for me. 1 thing at a time... |
i have 5 sonoffs connected to one button and one shedule... but this newer works... i'm lucky if 2 are turned on/off by it.... so each time i have to do 5 clicks or 5 shedules to make stuff turn on/off all of them |
1- Bulb - Yep would be great if you can merge 2- Multiple switches in a burst - Oh this is a major problem. Like I said, it renders groups, scenes, and even automations, useless. The only work around is to put a 5s delay between every switch. Groups/Scenes not doable. I would do a 100+ for this feature. How about you queue, and insert a 4s delay between bulk on/off calls? I have no idea how the API works, so it may be a useless suggestion. I am just suggesting to replicate what I am doing in my scripts. |
we'll continue this discussion here #92 it holds more details regarding this problem for now, i'm gonna close this issue... finally 🤝 |
@peterbuga Please do. Well done. Moving to #92 |
tried a lot of ways to still try and work with it.
tried changing the api_region (the log said i need to move to "as")
tried changing the grace_period to 9999999
tried log-off from ewelink
i can get it to work after an ha reset but a few minutes after that its stopes working and all my entities are unavilable.
there are at least 4 people i know with the same issue (i live in israel and this componnet is popular here)
can you please help?
The text was updated successfully, but these errors were encountered: