Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscribe_power_state breaks webOS2 #9

Closed
vide opened this issue Jan 22, 2020 · 2 comments
Closed

subscribe_power_state breaks webOS2 #9

vide opened this issue Jan 22, 2020 · 2 comments

Comments

@vide
Copy link

vide commented Jan 22, 2020

Hello, and first of all thanks for this library! I was trying to get my LG TVs work with Home Assistant and I discovered it uses this library. Trying the basic example it works out of the box with my newer LG TV with WebOS3 but to make it work with the other TV with WebOS2 I have to comment out https://github.com/bendavid/aiopylgtv/blob/master/aiopylgtv/webos_client.py#L233 otherwise I always get

Traceback (most recent call last):
  File "/home/vide/tmp/lg.py", line 14, in <module>
    asyncio.get_event_loop().run_until_complete(runloop(client))
  File "/usr/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "/home/vide/tmp/lg.py", line 7, in runloop
    await client.connect()
  File "/home/vide/.local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 137, in connect
    return await self.connect_result
  File "/home/vide/.local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 239, in connect_handler
    self.subscribe_sound_output(self.set_sound_output_state),
  File "/home/vide/.local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 694, in subscribe_power_state
    return await self.subscribe(callback, ep.GET_POWER_STATE)
  File "/home/vide/.local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 631, in subscribe
    uri, payload=payload, cmd_type="subscribe", uid=uid
  File "/home/vide/.local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 618, in request
    raise PyLGTVCmdException(f"Invalid request response {response}")
aiopylgtv.webos_client.PyLGTVCmdException: Invalid request response {'type': 'error', 'id': 3, 'error': '404 no such service or method', 'payload': {}}

btw Home Assistant doesn't work with WebOS3 either but that's another topic :)

@vide vide changed the title subscribe_power_state breaks WebOs2 subscribe_power_state breaks WebOS2 Jan 22, 2020
@vide vide changed the title subscribe_power_state breaks WebOS2 subscribe_power_state breaks webOS2 Jan 22, 2020
@bendavid
Copy link
Owner

Fixed by 9a20b9b (though this will need a related change in home assistant to make state tracking work properly for older webos versions)

@vide
Copy link
Author

vide commented Jan 23, 2020

Thanks! Yeah I see that in Home Assistant devel branch they are pinning to 0.3.0 right now.

On a side note, the problem I had with Home Assistant and the webOS pairing was due to a missing library libf77blas.so.3 which in turns comes from the numpy dependency which it's a reported issue. Leaving the comment here in case somebody in the future has a similar problem (I guess all the current new installations of Home Assistant via virtualenv will experience it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants