Sonoff /eWeLink component for original firmware

For me it happens even with a fress hassio install with no other components, I only add the sonoff component and the devices do not show up… Also with old snapshots that used to work fine now I have problems.

My setup is hassio on a Rpi 3. Let me know if I can help somehow from my side…

I will try to make some time to do another fresh install and record a video with the issue.

Thanks!!
Allan

I have this message before sonoff device become unavailable,

2019-10-05 19:27:00 INFO (MainThread) [custom_components.sonoff] Re-login component
2019-10-05 19:27:02 WARNING (MainThread) [custom_components.sonoff] Grace period activated!

Immediate restart won’t make it available again. I have to wait several minutes to restart and make the devices available. And, it will be unavailable later on again.

Running on linux with docker, latest HA, latest sonoff component

Im trying to run the debug script but i get this error:

Traceback (most recent call last):
  File "sonoff-debug.py", line 101, in <module>
    devices_json = get_devices()
  File "sonoff-debug.py", line 80, in get_devices
    headers.update({'Authorization' : 'Bearer ' + user_details['at']})

I have read in some posts it means wrong user name, but i´m sure it is right.

Im using an email to log in, im trying with 2 actually: the main email, and the shared account, none work…

hi
i am using rp
hassbian
HA 0.99.3
i used the sonoff folders file with the original firmware.
i succeded to defind 3 sonoff and i see them at the dash (the temp + humidity
The toglle buttons are not working. am i mising something ?
i have no error at the logs

probably. just make sure you use the latest code.

can you send a link .
is there a way to approve it ?

Thanks,
its working !!! :slightly_smiling_face:

Hello peterbuga.
Thank you for your component.

I know reason about connection error at maybe 3weeks ago.
yea. It’s true.
ITEAD service was changed.

Please note this 2 captures.

as region was pool connection. but, maybe there will not change.
us region is good condition now.

is same ewelink app.
login OK after 1~5minutes ago, I must login again.
reason is this.
“AS” region AWS server was changed. not repaired.
I request this to ewelinksupport. but, not came answer.

The way to solve this,
When a 503 error occurs, it would be nice to add a routine that repeats the last action(close websocket, and reopen websocket) until a normal response is received.

I hope this helps.
thank you.

@drapiece i’m sorry but i don’t understand anything from what you’re trying to explain :confused: please use google translate or ask a friend to help you write a proper description (also the screenshots make no sense as well)

@peterbuga

friend

The last update of HA version 100, broke the integration of your sonoff component, can you update it?

You need to update the component

3 Likes

I’m sorry.
Only fact is
“AS region instable at 3 weeks ago”

US region is good response.
AS region is bad response. (503 response 7 times at 10 pings)

understand?
not fault in your source and HA update.
just instable server.

thank you.

I just hope
When python sends a query, it would be nice to add a routine that closes and retries an existing query until it receives a 503 response until a 200 response is returned.

I updated the component to the latest version as @aidbish stated in his post. Fixed my issues with the sonoffs that I have.

Hey @peterbuga and everyone else,

Just need a small clarification.

I’ve been using the master branch and its been working fine with all my sonof basics and 4ch.
No i need to add a B1 bulb.

I just replace the files from the master (i already have) with the files from the bulb branch right?
And everything else should work ok?

Thanks in advance.
k.

also fixed my problem after update. thanks!

@drapiece i finally (i think) understand what’s your problem/request, and in the same time unfortunately this will overcomplicate the functionality of the component (not to mention that it’ll be even harder to detect a valid grace_period, which due to basic safety reasons i’m not willing to remove it … unless i force everyone to use a 2nd share devices eWeLink account).
it seems that you have a networking problem (as you mentioned above that you have the same problem in the app itself) and you should work towards fixing this instead. also, feel free to fork & change the component to do extra retries but personally i won’t do it

@krash read this (short version: for the time being sonoff-bulb might work with HA < 0.100 but also you might experience the past weeks pooling problems)

does anyone have an iFan02/03 and it’s willing to try the 1st implementation for it >>> sonoff-ifan and report back :blush:?