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

No more Manual control with the new Philips update #17

Open
Clooos opened this issue Sep 28, 2020 · 28 comments
Open

No more Manual control with the new Philips update #17

Clooos opened this issue Sep 28, 2020 · 28 comments

Comments

@Clooos
Copy link

Clooos commented Sep 28, 2020

Hello, first sorry for my english ^^ I had a fully working ambilight with color control but with the new Philips update (TPM191E_R.101.001.079.005) everything is working but not the Manual mode. They have added a new mode, the "Lounge Light" mode with color control but I'm not able to had it manualy... I'm thinking of downgrading but my previous version was TPM191E_R.001.004.100.000 and I read somewere that it's not a good idea if your version first numbers are not the same. What can I do for fixing that issue?

A huge thank you in advance for your help 😄

@chpego
Copy link

chpego commented Sep 28, 2020

I've the same problem with the new firmware update
I'm looking to check which command can be useful to use manual mode
Maybe :
ambilight/lounge {"color":{"hue":0,"saturation":0,"brightness":0},"colordelta":{"hue":0,"saturation":0,"brightness":0},"speed":0,"mode":"Default"}

@jomwells
Copy link
Owner

Okay, looks like I'll have to update my TV and see what the changes are asap! Thank you @chpego that looks really useful! :)

@Clooos
Copy link
Author

Clooos commented Sep 29, 2020

I have found the solution, you just have to replace every "FOLLOW_COLOR" with "Lounge Light" in the code, easy fix 👍

@chpego
Copy link

chpego commented Sep 29, 2020

I have found the solution, you just have to replace every "FOLLOW_COLOR" with "Lounge Light" in the code, easy fix 👍

I will try tonight :) Great news ! But it's only for new firmware

@chpego
Copy link

chpego commented Sep 30, 2020

Hi,
Yesterday, i replace with Lounge Light and it's works, but the Lounge Light effect are not yet implemented.
I made some modification on code to implement this. Maybe i can purpose my code @jomwells ?

@Rikkie80
Copy link

Hi,
Yesterday, i replace with Lounge Light and it's works, but the Lounge Light effect are not yet implemented.
I made some modification on code to implement this. Maybe i can purpose my code @jomwells ?

Can you maybe already share your updated code?

@chpego
Copy link

chpego commented Oct 12, 2020

Yes, sure available in the PR #19

@jomwells
Copy link
Owner

If it works, ill happily merge the request, but I'm just a bit concerned about backwards compatibility. Were these new effects added in the latest update?

@chpego
Copy link

chpego commented Oct 12, 2020

I don't know from which firmware version his effects appeared. Maybe I need to adjust the tests?
It's hard to find information about new features accessible from the JointSpace API.

@jomwells
Copy link
Owner

Yeah I think it will need a version check function to enable/disable features, or perhaps an optional config setting to enable newer ones. Could you (and anyone reading this) please let me know the OS version you are on, and what video/audio effects are available to you

@chpego
Copy link

chpego commented Oct 12, 2020

I don't know if it's enough :
"api_version": { "Major": 6, "Minor": 4, "Patch": 0 }, os_type: MSAF_2019_P

@Rikkie80
Copy link

Rikkie80 commented Oct 12, 2020

Yes, sure available in the PR #19

For some reason My lights are still not following my TV after I replaced my light.py with your version while they lights configured properly (it worked before).
At least the error messages are gone.

Found something... changed the effect and got an error message with the new effects, e.g. "Deep Water":

Logger: homeassistant.helpers.entity
Source: custom_components/philips_ambilight/light.py:197
First occurred: 20:41:37 (7 occurrences)
Last logged: 20:43:04

Update for light.woonkamer_ambilight fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
await self.hass.async_add_executor_job(self.update) # type: ignore
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/philips_ambilight/light.py", line 280, in update
self.getState()
File "/config/custom_components/philips_ambilight/light.py", line 197, in getState
effect = fullstate['menuSetting']
KeyError: 'menuSetting'

@Rikkie80
Copy link

Ok, had no luck with my Hue lights following my tv, so reached out to Philips. They confirm that there is a problem with Ambilight+Hue at their side with the latest TV SW release. They're working on a solution but no clear timeline...

@chpego
Copy link

chpego commented Oct 31, 2020

Hey there ! a new firmware is available since a few days (TPM191E_101.1.123.8)

@zackpollard
Copy link

What is the status with this? Manual control is still broken, is there an update planned to fix for the new firmware?

@chpego
Copy link

chpego commented Nov 30, 2020

What is the status with this? Manual control is still broken, is there an update planned to fix for the new firmware?

Which firmware do you have? Did you tested the version available in the PR of the file?

@MdeBoer3
Copy link

MdeBoer3 commented Dec 8, 2020

Hello,
I was also having trouble with the manual mode not working anymore. The new light.py file from the PR solved my issues! Many thanks!

@MdeBoer3
Copy link

MdeBoer3 commented Dec 14, 2020

Not sure, but I think there are more issues with the new Philips tv update.
The new light.py from the PR works great but the state (on/off) is wrong a lot of the time and my logger is full of errors, maybe you know how to resolve these too;

Logger: homeassistant.helpers.entity
Source: custom_components/philips_ambilight/light.py:197
First occurred: 4:11:08 (574 occurrences)
Last logged: 8:57:39

Update for light.tv_ambilight fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
raise exc
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/philips_ambilight/light.py", line 280, in update
self.getState()
File "/config/custom_components/philips_ambilight/light.py", line 197, in getState
effect = fullstate['menuSetting']
KeyError: 'menuSetting'

Update: another error that is showing itself a lot when the state is incorrect or unavailable:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/philips_ambilight/light.py:320
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:37:58 (1 occurrences)
Last logged: 10:37:58

[2782876912] name 'false' is not defined
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 593, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 630, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 230, in async_handle_light_on_service
await light.async_turn_on(**params)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 690, in async_turn_on
await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/philips_ambilight/light.py", line 173, in turn_on
self.set_effect(effect)
File "/config/custom_components/philips_ambilight/light.py", line 320, in set_effect
self._postReq('ambilight/currentconfiguration', {"styleName":"Lounge light","isExpert":false,"menuSetting":"HOT_LAVA","stringValue":"Hot Lava"})
NameError: name 'false' is not defined

@shirou93
Copy link

My philips same issue. Manual not working and state sometimes not sync.

@chpego
Copy link

chpego commented Dec 30, 2020

@shirou93 did you update your tv firmware ?

@shirou93
Copy link

Yes. I updated when first turn on tv.

@chpego
Copy link

chpego commented Dec 30, 2020

Hi , my TV have this firmware (TPM191E_101.1.123.9) and it's works with my code (PR #19)
Did you try the PR #19 ?

@chpego
Copy link

chpego commented Feb 28, 2021

Something is coming : home-assistant/core#44867

@Clooos
Copy link
Author

Clooos commented Feb 28, 2021

Something is coming : home-assistant/core#44867

Is it a brand new and native component for our beloved Ambilight?! Can we test it already?

@aegjoyce
Copy link

aegjoyce commented Aug 5, 2021

The new native component causes many Philips TVs to lag and crash. ADB works much better for me.

I have rewritten light.py to fix the problems above by using the official way of calling lounge light modes, scraped from the app - please feel free to give it a go: https://github.com/aegjoyce/ambilights/

@Clooos
Copy link
Author

Clooos commented Aug 6, 2021

The new native component causes many Philips TVs to lag and crash. ADB works much better for me.

I have rewritten light.py to fix the problems above by using the official way of calling lounge light modes, scraped from the app - please feel free to give it a go: https://github.com/aegjoyce/ambilights/

Hi! Thank you for sharing your code! It's working like a charm 🎉 Any chance to add a switch for the Ambilight+Hue with ADB? I didn't even know that ADB could be used to control the Ambilight, but I remember that I have searched for it with no luck. Thanks again!

@aegjoyce
Copy link

aegjoyce commented Aug 6, 2021

Hi! Thank you for sharing your code! It's working like a charm 🎉

Hey, that's great! Glad it's working as I was worried the specific node values for some of the effects would vary from TV to TV. What model TV do you have?

Any chance to add a switch for the Ambilight+Hue with ADB?

This should be possible given there are Ambilight+Hue controls in the remote app, can't make promises but if I get some free time I'll dig out my old Hue Bridge and have a play.

I didn't even know that ADB could be used to control the Ambilight, but I remember that I have searched for it with no luck.

I should clarify - this component is only using the Jointspace API to control Ambilight, not ADB. The built-in Philips JS component is meant to control all TV and Ambilight controls, but makes some TVs crash. So I've replaced the TV controls with the Android TV component (which uses ADB) and the Ambilight controls with this component (which uses Jointspace).

@Clooos
Copy link
Author

Clooos commented Aug 7, 2021

Hey, that's great! Glad it's working as I was worried the specific node values for some of the effects would vary from TV to TV. What model TV do you have?

It's a 65OLED854

This should be possible given there are Ambilight+Hue controls in the remote app, can't make promises but if I get some free time I'll dig out my old Hue Bridge and have a play.

Thank you! I have did one myself with the Jointspace API, it work well but it's stateless (I wonder if the state detection is not spaming the TV too much, maybe not).

I should clarify - this component is only using the Jointspace API to control Ambilight, not ADB. The built-in Philips JS component is meant to control all TV and Ambilight controls, but makes some TVs crash. So I've replaced the TV controls with the Android TV component (which uses ADB) and the Ambilight controls with this component (which uses Jointspace).

Oh so it's a refresh of the code from jomwells with some fixes, that's the one I was using with some changes (before switching to your code), I have tried the beta of the new official component and I was not satisfied too. So you are using ADB only for anything that is not Ambilight related, right? If yes we probably have almost the same configuration 😛

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

8 participants