Sonoff /eWeLink component for original firmware

is there a way to reduce delay, for me its working after 3 seconds.

someone has an idea how to reduce the delay?

Thank you all

Try the websocket code. It’s insanely fast!

Like as instant as a dumb switch.

1 Like

i have no idea what you mean, would you mind help me ?
can you provide me the code and location where to put it?
thank you!

When you go to download the code on Github, you’ll see a drop down for branch on the left. It will show master. Choose Websocket. That will take you to that version of the code.

I wanted to create additional account in eWeLink app and share all the devices and then add to hassio the second account to avoid the trouble with logging on. But I says that it will share the devices, but I can never get any notifications to my second account and I can not even see any devices there…

@monaco

it is working for me.
to do this first STOP Hassio make your second account , share each device to that account until you see all your devices in the new account . now you can start hassio with your second account.

but sonoff websoket component doesn’t work with home assistant 0.90.1???
in custom component folder i have --init.py sensor.py and switch.py
why now i cannot see sonoff??

for me too even with home assistant 0.90.0 .
I revert to master again

I’ll try to take a look at it and patch it enough to make it work. Sorry for the delays…

edit: I created a new (temporary) branch, just like master, to have a working copy for websocket and new HA version https://github.com/peterbuga/HASS-sonoff-ewelink/tree/websocket-HA0.88+
@Hdjweb @Ze_Pico I just renamed the files, no other changes were done. I also quickly tested it in my test environment.

one of these days I really need to do some proper releases (to keep a working version for older HA users) and also merge everything into one. :tired_face:

1 Like

@peterbuga
sonoff websoket component is working now with home assistant 0.90.1, but after a Restart all switches went out (not available). Sensors are working OK

  • error in the log

2019-03-26 09:26:37 ERROR (Thread-3) [websocket] error from callback <bound method Sonoff.on_message of <custom_components.sonoff.Sonoff object at 0x6fb07a90>>: 'NoneType' object has no attribute 'attributes'

1 Like
  • Back to master HA 0.88+

@peterbuga thank you for great work! With websocket-HA0.88+ it is fast! No problem on HA 0.90.1

@Ze_Pico please send me a sonoff_debug output, i don’t understand what’s happening on your side :confused:

will it be possible to add support for custom_updater?

@banolka yes, but i won’t

For web socket I must copy also folder sonoff-debug in custom component or only replace in sonoff init.py switch.py and sensor.py???

On 0.90.2 websocket doesn’t work

Works for me.

Raspberry Pi 3b+
HA 0.90.2
HA OS: 2.11
Websocket 0.88+ (25/3)

Yes work I have seen that you change the name of entity but senor are low

  1. On Master it works for you or not ?

  2. What type of error you get in the log? is it like mine

     ## Log Details (ERROR)
    
     Thu Mar 28 2019 17:17:37 GMT+0200 (Eastern European Standard Time)
    
     error from callback <bound method Sonoff.on_message of <custom_components.sonoff.Sonoff object at 0x6fb0e2d0>>: 'NoneType' object has no attribute 'attributes'
    

Work for me on Master and Sensors only on websocket.

  • Raspberry Pi 3b
  • HA 0.90.2
  • HA OS: 2.11
  • Websocket 0.88+ (25/3)