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

Switch is not changing to "on" status #1

Open
Molodax opened this issue Jun 29, 2019 · 5 comments
Open

Switch is not changing to "on" status #1

Molodax opened this issue Jun 29, 2019 · 5 comments

Comments

@Molodax
Copy link

Molodax commented Jun 29, 2019

I've updated the switch and it looks like it does not change the status to "on" anymore when it is actually on.
I have this in the log:

Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
connection.context(msg))
File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in handle_service
required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 316, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/ambihue/switch.py", line 66, in turn_on
self._postReq('menuitems/settings/update', {"values":[{"value":{"Nodeid":2131230774,"Controllable":"true","Available":"true","data":{"value":"true"}}}]} )
File "/config/custom_components/ambihue/switch.py", line 109, in _postReq
return json.loads(resp.text)
File "/usr/local/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@SBRK
Copy link
Contributor

SBRK commented Oct 5, 2019

I have the same issue :(

@SBRK
Copy link
Contributor

SBRK commented Oct 8, 2019

@Molodax @jomwells I found the culprit. On my TV (OLED804, released really recently), the node id for ambilight_hue_off has changed. It is not 2131230774 anymore, it is instead 2131230778.
One quick fix would be to add an override in the config for the node id to use, and a more sustainable fix would be to query menuitems/settings/structure to get the right node id for ambilight_hue_off.
I would do it, but my python experience is pretty small, and I'm not too sure how to develop and debug a Home Assistant component.

@basziee
Copy link

basziee commented Feb 1, 2020

I have a 55pus830312 and the nodeid isn't 2131230774 or 2131230778

@PostSven
Copy link

I have a 55pus830312 and the nodeid isn't 2131230774 or 2131230778

You can figure out your nodeid using pylips or by browsing to: https://TVIP:1926/6/menuitems/settings/structure and look for ambilight_hue_off

@jimmyeao
Copy link

jimmyeao commented Aug 8, 2020

I have a 55pus830312 and the nodeid isn't 2131230774 or 2131230778

You can figure out your nodeid using pylips or by browsing to: https://TVIP:1926/6/menuitems/settings/structure and look for ambilight_hue_off

Mine prompts for a username and password? any ideas?

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

5 participants