Closed ostojan closed 2 years ago
philips_js documentation philips_js source (message by IssueLinks)
Hey there @elupus, mind taking a look at this issue as it has been labeled with an integration (philips_js
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Does the entity turn on? Can you change effects?
No the entity doesn't change status. I discovered that I can turn it on, but I have to pass additional data in 'effects' field. It'd be nice to just turn on last effect on its own rather than passing effects manually.
I have the same issue. Unable to turn on ambilight. Turned on debug logging for haphilipsjs to provide some debug information.
Running HA 2022.3.8 Philips TV 55PUS7101. Jointspace 6
When I turn on ambilight with the remote on my TV I see the following in the log
2022-04-01 20:53:25 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/mode -> {"current":"internal"}
2022-04-01 20:53:25 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/power -> {"power":"On"}
2022-04-01 20:53:25 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/currentconfiguration -> {"styleName":"FOLLOW_VIDEO","isExpert":false,"menuSetting":"VIVID"}
However the effect is not selected, and none of the effects in the GUI seem to match the effects my TV provides.
Turning the ambilight off with HA works correctly.
When I turn it on again I see the following API calls:
2022-04-01 20:56:00 DEBUG (MainThread) [haphilipsjs] Post succeded: {'r': 255, 'g': 255, 'b': 255} ->
2022-04-01 20:56:00 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/cached -> {"layer1":{"left":{"0":{"r":255,"g":255,"b":255},"1":{"r":255,"g":255,"b":255},"2":{"r":255,"g":255,"b":255},"3":{"r":255,"g":255,"b":255}},"top":{"0":{"r":255,"g":255,"b":255},"1":{"r":255,"g":255,"b":255},"2":{"r":255,"g":255,"b":255},"3":{"r":255,"g":255,"b":255},"4":{"r":255,"g":255,"b":255},"5":{"r":255,"g":255,"b":255},"6":{"r":255,"g":255,"b":255},"7":{"r":255,"g":255,"b":255}},"right":{"0":{"r":255,"g":255,"b":255},"1":{"r":255,"g":255,"b":255},"2":{"r":255,"g":255,"b":255},"3":{"r":255,"g":255,"b":255}}}}
And then when retrieving the ambilight state:
2022-04-01 20:56:55 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/mode -> {"current":"internal"}
2022-04-01 20:56:55 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/power -> {"power":"Off"}
2022-04-01 20:56:55 DEBUG (MainThread) [haphilipsjs] Get succeded: ambilight/currentconfiguration -> {"styleName":"OFF","isExpert":false}
The problem seems to be somewhere in the styles/effects not being mapped correctly.
Hope this helps a bit. Let me know if I need to provide more information.
Well it tries to turn on manual mode, which it seems your tv is ignoring.
The problem is it tries to turn the ambilight on with mode AUTO
and style OFF
, this style is set in the attributes after the async_turnoff
function is run. It does not save the latest selected effect but overwrites with OFF.
I made some quick changes in the python code to make things work for me. I always want the ambilight in standard FOLLOW_VIDEO mode, see https://gist.github.com/bramstroker/243d8f245da2a9b984c06751d544ff44. And all sections between CUSTOM START
and CUSTOM END
.
Not sure how to resolve things for everyone, because these FOLLOW_VIDEO presets are not passed from the Jointspace API so they are probably different for other TV's
It should have set it to MODE manual, but i don't see that in your call log example. Only the cached color values.
Was the screen on when you tried this? Or was this turning on from screen off?
It should have set it to MODE manual, but i don't see that in your call log example. Only the cached color values.
You mean the ambilight mode from api call ambilight/mode
?
They are as follows when I switch using my remote control.
internal
when selecting a follow video option (currentConfig: {"styleName": "FOLLOW_VIDEO","isExpert": false,"menuSetting": "STANDARD"}
expert
when selecting a follow audio option (currentConfig: {"styleName": "FOLLOW_AUDIO","isExpert": false,"menuSetting": "ENERGY_ADAPTIVE_COLORS"}
lounge
when selecting a follow color option (currentConfig: {"styleName": "FOLLOW_COLOR","isExpert": false,"menuSetting": "FRESH_NATURE"}
)internal
when offWas the screen on when you tried this? Or was this turning on from screen off?
I always have the screen on.
Oh that is interesting. They don't follow along at all on my tv to styles. Okey so this was TV on.
Turning on with mode auto and style off is obviously invalid. Turning on with som follow video mode when screen is turned on makes absolute sense. Can you provide a pull request? Then we can look at details there?
Sure will have a look into that tomorrow
@elupus Did some refactoring this morning on the ambilight component. I've sent you a PM on discord to discuss something.
The problem
Using entity provided by phipils_js integration I can't turn on Ambilight in my TV. Turning off works fine and without any problems.
What version of Home Assistant Core has the issue?
core-2022.3.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
philips_js
Link to integration documentation on our website
https://www.home-assistant.io/integrations/philips_js/
Diagnostics information
File is too big to paste here
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response