py-smart-gardena / hass-gardena-smart-system

Home Assistant custom component integration for Gardena Smart System
Apache License 2.0
213 stars 53 forks source link

Websocket error. #59

Closed strutings closed 3 years ago

strutings commented 3 years ago

ERROR (Thread-4) [websocket] error from callback <bound method Client.on_message of <gardena.smart_system.Client object at 0x6fffb100>>: on_message() takes 2 positional arguments but 3 were given

All sensors updates on startup, after that i receive this error.

MarcusKapun commented 3 years ago

I have the same error:

At start / restart of HA (whereby all sensors update): ERROR (Thread-6) [websocket] error from callback <bound method Client.on_open of <gardena.smart_system.Client object at 0x6be53bf8>>: on_open() takes 1 positional argument but 2 were given

During normal ops (no update of sensors): ERROR (Thread-6) [websocket] error from callback <bound method Client.on_message of <gardena.smart_system.Client object at 0x6be53bf8>>: on_message() takes 2 positional arguments but 3 were given

Switches (water control in my case) are also not working any more

clews commented 3 years ago

Same problem here...

I managed to fix is (dirty, probably it depends on the websocker version?) using this patch:

https://github.com/clews/py-smart-gardena/commit/46b5e878a049ed9fc0281869257b23a68b1844c5#diff-49b7e62d618d4a4ccba5f0e39c1df910dc0b2d19b73157e308fc9ca62750b109

grm commented 3 years ago

Hello Clews,

@clews : Thx for the insight into the bug. Could you create a PR so we can merege the fix please ?

Thanks a lot !

gvdhoven commented 3 years ago

@grm i created the PR for you (it was just 2 clicks) đź‘Ť

clews commented 3 years ago

Sorry for the late answer, was quite busy in the last weeks. I've added the ws parameter to on_close also. Pushed it to my fork on master, so it'll be taken into account by the actual PR. With those fixes, the integration work perfectly stable for me on HA (I only use irrigation control).

jorgenbosman commented 3 years ago

Any idea when this will be in a new stable release together with version info in the manifest.json? Since the latest hass release, the integration is no longer loaded

grm commented 3 years ago

A new version has been released a few minutes ago. I had no time to test the PR but I wll try to test it this week end (hopefully).

Jérémie

MarcusKapun commented 3 years ago

Unfortunately I have still the same issue with version 0.2.3

Logger: websocket Source: /srv/homeassistant/lib/python3.8/site-packages/websocket/_logging.py:66 First occurred: 21:13:13 (22 occurrences) Last logged: 21:13:14

error from callback <bound method Client.on_open of <gardena.smart_system.Client object at 0x69550d90>>: on_open() takes 1 positional argument but 2 were given error from callback <bound method Client.on_message of <gardena.smart_system.Client object at 0x69550d90>>: on_message() takes 2 positional arguments but 3 were given

depthchargex commented 3 years ago

Have the same issue also. Almost everything seems to work except the switches, for example, they don't keep the correct state in sync with the API. It will turn the water on for example but in HA it shows as turned off.

2021-07-07 15:17:21 ERROR (Thread-4) [websocket] error from callback <bound method Client.on_message of <gardena.smart_system.Client object at 0xffff94ae92b0>>: on_message() takes 2 positional arguments but 3 were given

FransHalsjes commented 3 years ago

same error after upgrading to 2021.7.0

Logger: websocket Source: /usr/local/lib/python3.9/site-packages/websocket/_logging.py:67 First occurred: 10:54:56 (9 occurrences) Last logged: 10:54:57

error from callback <bound method Client.on_open of <gardena.smart_system.Client object at 0x7f823a05adf0>>: on_open() takes 1 positional argument but 2 were given error from callback <bound method Client.on_message of <gardena.smart_system.Client object at 0x7f823a05adf0>>: on_message() takes 2 positional arguments but 3 were given

grm commented 3 years ago

Hello,

A fix has been released in the version 0.8.* !

Do not hesitate to reopen the ticket if you still have the issue !

Jeremie

FransHalsjes commented 3 years ago

I don’t see that version on hacs.. ?

Verstuurd vanaf mijn iPhone

Op 8 jul. 2021 om 19:15 heeft Jérémie Klein @.***> het volgende geschreven:

 Hello,

A fix has been released in the version 0.8.0 !

Jeremie

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tamascp commented 3 years ago

I have the same problem:

Logger: websocket Source: /usr/local/lib/python3.9/site-packages/websocket/_logging.py:67 First occurred: 2021. jĂşlius 25. 21:21:14 (91 occurrences) Last logged: 0:00:44

error from callback <bound method Client.on_open of <gardena.smart_system.Client object at 0x7f90f6f4c0>>: on_open() takes 1 positional argument but 2 were given error from callback <bound method Client.on_message of <gardena.smart_system.Client object at 0x7f90f6f4c0>>: on_message() takes 2 positional arguments but 3 were given

After HA restart the sensors are updated, but only once. If the status of the sensor changes, it will no longer update automatically.

WW1983 commented 3 years ago

After HA restart the sensors are updated, but only once. If the status of the sensor changes, it will no longer update automatically.

Have the same Problem.

eikowagenknecht commented 3 years ago

I don’t see that version on hacs.. ?

I had the same problem. It seems you need to use Release 0.2.5b3 (or master) of the HASS addon: image

@grm Maybe this can be pushed to the stable branch as well?