Closed andrewjswan closed 4 months ago
@andrewjswan It is safe. "Kills" means I need to reboot TV to get the JointSpace server on the TV up and running again.
@elupus Its seems the httpx.Limits call has the parameters wrong. Documentations says param1: max connection, param2: max keepalive connections)
I have had the integration running 3 weeks now without any reboot on the TV only changing line 260 from limits = httpx.Limits(max_keepalive_connections=0, max_connections=3) to limits = httpx.Limits(max_connections=3, max_keepalive_connections=3)
Before: 1 TV worked 3 TV's lost connection after 5 minutes After: 4 TV's works
After HA release 2024.2 you need to have haphilipsjs folder in the /config/deps/ folder if you want to test with your own TV's
https://github.com/home-assistant/core/commit/523352c97e79d5a3c973541c89d0ec2295671206
@elupus Its seems the httpx.Limits call has the parameters wrong. Documentations says param1: max connection, param2: max keepalive connections)
I have had the integration running 3 weeks now without any reboot on the TV only changing line 260 from limits = httpx.Limits(max_keepalive_connections=0, max_connections=3) to limits = httpx.Limits(max_connections=3, max_keepalive_connections=3)
They are keyword parameters, so order does not matter.
The change you seem to have made is to allow keep alive. It could be beneficial in some cases IF the server supports it. Ie it would reduce connection load. My old (pre-android) TV's crashed hard with that enabled. I don't own that TV anymore sadly.
If you turn up debug logging on the httpx and httpcore i think you should get logs on reuses of connections. Please verify that you are actually getting re-uses.
I'm mostly fine with enabling keep alive, feel free to provide a patch for the lib to enable that. I think you could allow passing in a limits argument to the constructor. Then it's easier to tune this.
@elupus Thanks for the explanation of the parameters. I am not coding very much python.
I noticed some weird behavior with httpx. It does NOT respect the max_connections if max keepalive connections is 0 If I use max_connections=3 and max_keepalive connections=0 then the number of connections increases beyond 3. My TV crashes when I hit about 25 connections (5 minutes after the first connection every time) If i use the max keepalive connection=3 it will stay with max 2 connections and the TV keeps working.
I have no clue why I get more that 3 connections and I sadly does not have the time to debug more at the moment....
@Sdahl1234 That is a very interesting find! Maybe we expose a bug in httpx here.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still relevant
I still get this , unavailable when powered on , off when powered off
You are of 2024.5.5 release? If so please turn on debug for the integration and reproduce issue. Then turn off and post log here
It got a little better, but still not completely.
Core 2024.5.5 Supervisor 2024.05.1 Operating System 12.3 Frontend 20240501.1
Added file here if that works? home-assistant_philips_js_2024-05-27T20-23-23.125Z.log
The problem
I turn on the TV (connected via Lan, the address is static), the media player in HA turns on, and after a while it turns off. Turned on the debugging in the log, I do not see anything special. But in the previous log there were warnings.
What version of Home Assistant Core has the issue?
core-2023.2.5
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 TV
Link to integration documentation on our website
https://www.home-assistant.io/integrations/philips_js/
Diagnostics information
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information