Sonoff /eWeLink component for original firmware

I have updated to 0.92.2 and now this is my log
DEBUG (MainThread) [custom_components.sonoff] Create the main object
2019-05-03 15:07:29 INFO (MainThread) [custom_components.sonoff] Found websocket address: eu-pconnect1.coolkit.cc
2019-05-03 15:07:29 DEBUG (Thread-22) [custom_components.sonoff] (re)init websocket
2019-05-03 15:07:30 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“error”:0,“apikey”:“8dc99f7d-7786-453d-8117-f95a07c4b6a7”,“config”:{“hb”:1,“hbInterval”:145},“sequence”:“15568888502885945”}
2019-05-03 15:07:40 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10007089e1”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“165.30”,“voltage”:“232.95”,“current”:“1.00”,“switch”:“on”},“from”:“device”}
2019-05-03 15:07:40 ERROR (Thread-22) [websocket] error from callback <bound method Sonoff.on_message of <custom_components.sonoff.Sonoff object at 0x692f8c70>>: ‘NoneType’ object has no attribute ‘attributes’
2019-05-03 15:07:56 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10007089e1”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“162.82”,“voltage”:“232.91”,“current”:“0.99”,“switch”:“on”},“from”:“device”}
2019-05-03 15:07:59 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
    result = coro.throw(exc)
  File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 352, in async_update_config
    dev_id, device)
  File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
    yield self  # This tells Task to wait for completion.
  File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
    future.result()
  File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
    raise self._exception
  File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 742, in update_config
    with open(path, ‘a’) as out:
PermissionError: [Errno 13] Permission denied: ‘/home/homeassistant/.homeassistant/known_devices.yaml’
2019-05-03 15:07:59 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
    result = coro.throw(exc)
  File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 352, in async_update_config
    dev_id, device)
  File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
    yield self  # This tells Task to wait for completion.
  File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
    future.result()
  File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
    raise self._exception
  File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 742, in update_config
    with open(path, ‘a’) as out:
PermissionError: [Errno 13] Permission denied: ‘/home/homeassistant/.homeassistant/known_devices.yaml’
2019-05-03 15:08:27 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a502”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“229.31”,“switch”:“off”},“from”:“device”}
2019-05-03 15:08:36 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10007089e1”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“165.27”,“voltage”:“232.76”,“current”:“1.00”,“switch”:“on”},“from”:“device”}
2019-05-03 15:08:52 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“1000419f97”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“230.16”,“switch”:“on”},“from”:“device”}
2019-05-03 15:08:52 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a6bd”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“2.95”,“voltage”:“234.19”,“current”:“0.00”,“switch”:“on”},“from”:“device”}
2019-05-03 15:08:54 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10007089e1”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“162.53”,“voltage”:“233.06”,“current”:“0.99”,“switch”:“on”},“from”:“device”}
2019-05-03 15:08:54 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a6bd”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“3.66”,“voltage”:“233.67”,“switch”:“on”},“from”:“device”}
2019-05-03 15:09:04 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10004198ec”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“233.85”,“switch”:“on”},“from”:“device”}
2019-05-03 15:09:06 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a759”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“229.44”,“switch”:“off”},“from”:“device”}
2019-05-03 15:09:07 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a919”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“229.95”,“switch”:“on”},“from”:“device”}
2019-05-03 15:09:08 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10004197e4”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“230.24”,“switch”:“on”},“from”:“device”}
2019-05-03 15:09:11 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“1000419eab”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“68.22”,“voltage”:“230.14”,“switch”:“on”},“from”:“device”}
2019-05-03 15:09:12 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“1000419e09”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“230.33”,“switch”:“on”},“from”:“device”}
2019-05-03 15:09:13 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a801”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“229.40”,“switch”:“off”},“from”:“device”}
2019-05-03 15:09:18 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“10007089e1”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“power”:“162.20”,“voltage”:“232.65”,“switch”:“on”},“from”:“device”}
2019-05-03 15:10:27 DEBUG (Thread-22) [custom_components.sonoff] websocket msg: {“action”:“update”,“deviceid”:“100041a502”,“apikey”:“6ac1b22a-4f46-460c-a451-9e0276f4768d”,“userAgent”:“device”,“ts”:0,“params”:{“voltage”:“229.02”,“switch”:“off”},“from”:“device”}

I know it is very long the next time I will copy in paste.bin exscuse me, sorry

Thanks for this! Works perfectly, very easy! :sunglasses:

i have istalled home assistant from zero i have this message i think there is something wrong in init.py
custom_components.sonoff.Sonoff object at 0x7599ae10. Can you help me please??

Does your component work? Some people get those error messages but they don’t seem to interfere with the correct function of the component.

BTW, since I upgraded to 0.92 I think it is now convenient to have a manifest.json file in the Sonoff folder (/custom_components/sonoff/manifest.json).
I created mine like this:

{
        "domain": "sonoff",
        "name": "Sonoff sensor custom component",
        "documentation": "https://github.com/peterbuga/HASS-sonoff-ewelink",
        "requirements": [],
        "dependencies": [],
        "codeowners": ["@peterbuga"]
}

Maybe it’s useful for someoneelse.
And I still get the websocket warnings, so this was not the problem.

I included the manifest.json file in place, but I still get the warnings, and the Configuration checker still complains about the component. So this was not the solution. :frowning:

Peterbuga have you abandoned this component??? Help us please??? It is wonderful to have a custom component of this I hoped that It will be original component for home assistant/hassio.

For God’s sake, he has been here within the last 9 days. I imagine he has a life, and in any event he is NOT your bitch.

6 Likes

@nickrout be quiet with worlds.I asked him, i don’t want that he will do things as command i was only warried becasue some post ago @peterbuga wrote :" i think they might turn obsolete this component with a few firmware updates :sweat_smile: not sure if i’m happy or not yet :thinking:" only for thaht.

My comment was not directed at you @Antonio_Longo

Ok ok so excuse me so I must every 2/3 hours restart hassio/home assistant and clear log because this problem lock hassio/home assistant

looking at the log in this post Sonoff /eWeLink component for original firmware - #468 by Hdjweb there does not seem to be an error related to sonoff custom component.

This seems to mark the start of the error, as I said I can see nothing in the error about the sonoff component. The errors are about device tracking.

yes it is a websoket error related to api key of custom component, iti is mentioned in init.py some are only warning other are error

I assume you are referring to this line, I am not sure how I missed that.

Yes but it is not the unique line so I must check every 4/5 ours now because there is some error in API if I found i will send you message.,

Thanks for this! Apologies in advance from this newbie. I have inserted the code into configuration.yaml.

sonoff:
username: [email protected]
password: passwd
I havent put in anything optional

Is all I need to do is now put the python files into a sub directory?

Is this correct? I am using a docker container. Do I need to do something to trigger the python to run?

Hi Plonkis - was hoping for community support :slight_smile:

test7875 It was not a reply to your post!

but your config looks good (guess your code formatting is correct in your config file), have you done a restart of Home Assistant?
(i am using a raspberry)

/P

haha thanks @plonkis - Code looks correct (two lines (I didnt put in the optional code)) On a restart I get alot of errors, Validation of the code even times out. Hash out the two lines and the world is good again … im on 0.92 (QNAP Container)

1 Like