HASS-sonoff-ewelink icon indicating copy to clipboard operation
HASS-sonoff-ewelink copied to clipboard

sonoff-bulb not working with 0.100+

Open stephanerosi opened this issue 5 years ago • 26 comments

Hi, Is it planned to update sonoff-bulb branch to make it compatible with HA 0.100+ ? Or merge sonoff-bulb into master? Thanks!

stephanerosi avatar Oct 15 '19 05:10 stephanerosi

@stephanerosi yes & yes when? i don't know 😐

peterbuga avatar Oct 15 '19 07:10 peterbuga

Should have checked before updating... maybe it time to flash tasmota on my sonoffs XD

Gokalex avatar Oct 15 '19 14:10 Gokalex

@Gokalex if it's not the end of the world for you i might be able to bring everything up-to-date in about < 2 weeks, otherwise have fun with tasmota ;)

peterbuga avatar Oct 15 '19 14:10 peterbuga

Should have checked before updating... maybe it time to flash tasmota on my sonoffs XD

Same, but flashing tasmota on a wall switch is such a pain @peterbuga don't let us down

rickycraft avatar Oct 15 '19 21:10 rickycraft

+1

2019-10-17 09:22:38 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 346, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/sonoff/__init__.py", line 8, in <module>
    from homeassistant.util.async_ import run_coroutine_threadsafe
ImportError: cannot import name 'run_coroutine_threadsafe' from 'homeassistant.util.async_' (/usr/src/homeassistant/homeassistant/util/async_.py)

SergeyAnokhin avatar Oct 17 '19 07:10 SergeyAnokhin

this commit broke sonoff https://github.com/home-assistant/home-assistant/commit/c1851a2d94d724ceee0eab56249623fe2d92a606#diff-572606b9b77c96a18b4bf3eefabc6b25

SergeyAnokhin avatar Oct 17 '19 08:10 SergeyAnokhin

Im not an expert but it seems need to use "import asyncio" & "asyncio.run_coroutine_threadsafe"

SergeyAnokhin avatar Oct 17 '19 08:10 SergeyAnokhin

I will try to fix & test this localy

SergeyAnokhin avatar Oct 17 '19 08:10 SergeyAnokhin

it seems already fixed : https://github.com/peterbuga/HASS-sonoff-ewelink/commit/959cee38aaae71ea2c33feba731788cbbfe085af

SergeyAnokhin avatar Oct 17 '19 18:10 SergeyAnokhin

confirm. issue can be closed

SergeyAnokhin avatar Oct 17 '19 18:10 SergeyAnokhin

Sorry Sergey, but no ;-) Master has been solved, but not sonoff-bulb branch...

stephanerosi avatar Oct 17 '19 20:10 stephanerosi

@stephanerosi is right, issue not completely fixed yet it just needs a proper merge (done in the foreseeable feature)

peterbuga avatar Oct 18 '19 07:10 peterbuga

Waiting for B1 too! Thank you in advance :)

murlex avatar Oct 27 '19 20:10 murlex

wait is (finally) over 👍 i've merge a bunch of new things in a new dev branch https://github.com/peterbuga/HASS-sonoff-ewelink/tree/dev among the new stuff, there's also B1 support for latest HA versions, mini disclaimer i've done literally no testing on B1 because i can't :(

i'd appreciate if someone could test it out and let me know if it works / post log errors etc (theres' also initial support for iFan and RF Bridge)

peterbuga avatar Nov 02 '19 22:11 peterbuga

Good news - bulb working like charm with the /dev branch and new hassio update (ver. Home Assistant 0.101.2) Thank's a million!!! 👍

superjasiek avatar Nov 03 '19 15:11 superjasiek

hey guys - just checking if the ewelink led controller is working with this new update ... thanks a bunch!

andrebbruno avatar Nov 03 '19 15:11 andrebbruno

@superjasiek cool! glad to hear that 👍 can you also please mention the fw version you use? so that i can add it to compatibility list

@andrebbruno are you referring to this product? if so, not supported yet :( in theory it should work with the current code but i need to either:

  1. swap values around and make it compatible only with this and drop the sonoff B1 support or
  2. rethink everything around itead's sh*ttynes of working with APIs :|

peterbuga avatar Nov 03 '19 15:11 peterbuga

I think everything is alright my fw version is: PSF-BLB-GL 2.6.0, bulb model B1_R2.

superjasiek avatar Nov 03 '19 16:11 superjasiek

@superjasiek cool! glad to hear that 👍 can you also please mention the fw version you use? so that i can add it to compatibility list

@andrebbruno are you referring to this product? if so, not supported yet :( in theory it should work with the current code but i need to either:

  1. swap values around and make it compatible only with this and drop the sonoff B1 support or
  2. rethink everything around itead's sh*ttynes of working with APIs :|

hi @peterbuga - yes that´s the one I´m talking about. No worries, if it´s that complicated then nevermind, keep up the great work! I can always change those settings in Google Home anyways.

thanks!

andrebbruno avatar Nov 04 '19 12:11 andrebbruno

@andrebbruno it'll be added at some point ;) there's an issue already raised for it https://github.com/peterbuga/HASS-sonoff-ewelink/issues/143

peterbuga avatar Nov 04 '19 13:11 peterbuga

@peterbuga i confirm that it works with POW R2 switch on and off ,also sensor shows voltage ,amp and watt , on HA 101.2 and Sonoff R2 in Latest Firmware 3.3.1 ,thanks to you

aamhm avatar Nov 05 '19 19:11 aamhm

Same for me, it works like a charm! Thanks :-)

stephanerosi avatar Nov 05 '19 20:11 stephanerosi

@aamhm kinda wrong place to post this when there's already an issue about it already raised but whatever, glad you had it sorted out.

@stephanerosi awesome 👍

peterbuga avatar Nov 06 '19 08:11 peterbuga

@peterbuga thank you very much. Its all updated.

RicVinie avatar Nov 09 '19 17:11 RicVinie

Now i only have my rf bridge waiting to be included in your component.

Thanks again for your work

RicVinie avatar Nov 09 '19 17:11 RicVinie

@RicVinie already working-ish https://github.com/peterbuga/HASS-sonoff-ewelink/issues/38#issuecomment-549085625 please move the discussion/complains/requests related to rf bridge in that thread any input helps. thanks

peterbuga avatar Nov 09 '19 17:11 peterbuga