Philips Android TV Ambilights (Light) component

mine was working well but all of a sudden it is now unavailable all the time, tv on or off? any idea please?

1 Like

That is a known issue with this component, I think it was mentioned above somewhere in this thread, it is due to the way the jointspace API handles brightness commands - as of yet, the brightness will only be set if it is set to FOLLOW_COLOR, and you cannot set both brightness and colour in the same POST request - im sure this could be improved upon, but it would require rewriting the component (If anyone else has the time to do this, I would be happy to change it on the github repo :smiley: )

1 Like

To anyone having problems with availiability - this wont completely solve your problem (TV can still enter deep sleep at times) but try enabbling the wake on LAN setting in the TV’s settings app, that is the only difference I can think of, the ambilight component works for a long period of time after the TV switches off for me currently

Great work! I’m just curious about something… Any chance this component lets us use Xiaomi Yeelight/led stripes?

Something like this:

I have a full Xiaomi lights setup and don’t want to buy a new Philips Hue setup.

Thanks!

1 Like

Hey everyone!
I have created (my first!) a pull request on github to update this component to make it compatible with Home Assistant after the ‘Great Migration’. In the meantime, while the PR isn’t through yet (or if the author has objections to some other changes, which is fair) you can find the working version on my repo (you should see it in “forks”)

I also changed it up a bit to make it reflect the philips naming convention a bit more, so you need to pay attention to that and update your config accordingly!

@jomwells seems like we will get issues with 0.92

See

and (different component that was fixed fast)

@h4nc already created a PR on github to fix this, in the meantime you could use the component from my fork until it’s merged (but remember to change the platform name in your config). Although I haven’t added the init.py, the component works perfectly fine for me on 0.92. I changed the folder structure and added the needed manifest that defines the domain.

Like I said, if you don’t want to wait for the merge you can look at the current PRs on github, there you should find my PR. :slight_smile:

Could you post a link to your PR?

Sure, here’s the PR: https://github.com/jomwells/ambilights/pull/1
and here’s the fork itself: https://github.com/hutchinsane/ambilight
which is probably easier to download. Just remember to read the doc again, since I did change the platform name to better reflect the naming convention. :slight_smile:

1 Like

Would be really nice to have this component in custom updater.
@hutchinsane maybe you are able to do this in your fork?

1 Like

That’s a good idea actually, I’ll see what I can do!

Already tried your fork. Works again with 0.92. Thanks you!

Would really be nice to have those kind of updates automated with custom updater.

Is manifest.json really required? I’ve added empty _init_.py in the folder and it was sufficient.
Does anyone noticed that it is almost never possible to turn on the ambilight from frontend page if it is off, however, it works well when it is called as a light on service in automaton?

For it’s also only possible to control the ambilight when the tv is on.
I have a sensor that pings my tv. Some minutes after turning the tv to standby the ping fails. So after that ambilight is offline to.

Don’t know if turning it on with an automation would work. Never tried it, but I doubt it.

According to the documentation, manifest files are required as of 0.92 https://developers.home-assistant.io/docs/en/creating_integration_manifest.html

And yes, the component losing connection is expected behaviour as the joined space api stops responding after a while. I’m not sure if there’s a way around it as I haven’t tested if the official Philips remote app behaves the same. You could have a Wake on LAN switch to turn the TV on when the light component is unavailable, or alternatively, do the same with an IR blaster

this did not work reliable for me.

My TV is not able to turn on so I use my apple to turn it on.

Apple Tv is not able to turn it off, so the Philips Component does that.

Integrated in a template switch this works fine.

Home Assistant 0.92 introduces a new manifest.json for integrations. This file, which is optional for custom components,

So it works without manifest.json in 0.92 in my case.

The issue that I’ve described with turning on the ambilight via front-end is taking place after the TV is on enough time to restore the connection, i.e. 15-20 minutes. If the turn on called as service, there is no such lag and it turns on after a few seconds.

1 Like

Huh, where are you seeing that? The page I linked states

Since 0.92.0, every integration has a manifest file to specify basic information about an integration. This file is stored as manifest.json in your integration directory. It is required to add such a file, including for custom components.

Seems like inconsistend documentation to me hmm.

Ah, I understand what you mean now. I’ve observed the same behaviour, I always wrote it off as JointSpace closing the connection, but if it is, as you say, working perfectly fine when calling the service then it has to be something else. Maybe raise an issue on github?