New Philips TV integration

Hello

I see the command line for this is now depreciated and it auto found the TV using the integrations. However it is asking for a PIN number. Where would I find this? I’ve never set one up on the TV?

Cheers
Mark

Is there a default pin (0000,1234) in the Tv‘s documentation?

yeah thanks I tried them all and 8888 etc. So I just setup a pin and I still get “invalid pin” Didn’t need one when using the older config

So I wander into the livingroom to restart the TV and put in a new code… and on the screen it had, enter this 4 digit code into Home Assistant… Bosh and we are in. Just FYI in case anyone else wonders what the PIN is.

after adding the IP address one needs to enter an Api number. Which one do we use?

If you use AndroidTv select number 6 as the documentation says. It works well for me on Philips 65OLED804 / 12.

Yeah same here. 6 in the magic number.

The documentation forgot to mention https://www.home-assistant.io/integrations/philips_js/#features is about selecting an api in the config flow… I now see it, and yes, simply by trying found out selecting 6 allowed me to continue the flow. The next popup was somewhat cryptic too, it didnt mention at all one has to check the TV and enter the displayed number. It was only by coincidence I noticed a small grey bar on the tv showing that number.

After that, it was quick and successful.
So all good in the end.
Thanks

2 Likes

Yes you are right, the documentation is not complete.
I also found the PIN by accident on TV. This is not described in the documentation.

1 Like

If I want to change the source (for example to HDMI 4), the documentation says it depends on the platform. There is some way to find how to use it. I can’t find it for Philips TV.

service: media_player.select_source
data:
  source: ?????
target:
  entity_id: media_player.home_tv_2

If I select HDMI source 2 to 4, switching works well. If I select HDMI 1, the TV switches to VCR.
Does anyone know how to switch to HDMI 1?

What do you mean restart the TV? Reset to factory defaults? I still don’t understand how to get that code. If you can describe it in more details it would be nice. Thanks

Turn on the TV and start configuring the component, and when you reach the PIN, go to the TV and it will be on the screen

Thanks! Now I noticed that small message on my TV with a pin :slight_smile:

Since updating core-2021.6.4 and supervisor-2021.06.0, a log error has started to appear:

Logger: homeassistant
Source: components/philips_js/__init__.py:134
First occurred: 9:39:45 (4 occurrences)
Last logged: 9:46:46

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/anyio/streams/tls.py", line 102, in _call_sslobject_method
    result = func(*args)
  File "/usr/local/lib/python3.8/ssl.py", line 888, in read
    v = self._sslobj.read(len)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2629)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/anyio.py", line 59, in read
    return await self.stream.receive(n)
  File "/usr/local/lib/python3.8/site-packages/anyio/streams/tls.py", line 152, in receive
    data = await self._call_sslobject_method(self._ssl_object.read, max_bytes)
  File "/usr/local/lib/python3.8/site-packages/anyio/streams/tls.py", line 121, in _call_sslobject_method
    raise BrokenResourceError from exc
anyio.BrokenResourceError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 277, in handle_async_request
    ) = await self._pool.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 148, in handle_async_request
    return await self.connection.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 128, in handle_async_request
    ) = await self._receive_response(timeout)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 189, in _receive_response
    event = await self._receive_event(timeout)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_async/http11.py", line 225, in _receive_event
    data = await self.socket.read(self.READ_NUM_BYTES, timeout)
  File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/anyio.py", line 63, in read
    raise ReadError from exc
httpcore.ReadError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/haphilipsjs/__init__.py", line 504, in postReq
    resp = await self.session.post(self._url(path), json=data, timeout=timeout)
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1747, in post
    return await self.request(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1426, in request
    response = await self.send(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1511, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1546, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1580, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1621, in _send_single_request
    ) = await transport.handle_async_request(
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 272, in handle_async_request
    (
  File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/philips_js/__init__.py", line 134, in _notify_task
    res = await self.api.notifyChange(130)
  File "/usr/local/lib/python3.8/site-packages/haphilipsjs/__init__.py", line 1197, in notifyChange
    result = await self.postReq("notifychange", data=data, timeout=timeout_ctx)
  File "/usr/local/lib/python3.8/site-packages/haphilipsjs/__init__.py", line 522, in postReq
    raise GeneralFailure(err) from err
haphilipsjs.GeneralFailure

Restarting the TV and HA did not help. Removing the integration and re-integration did not help.
I updated the TV to the latest fw.
Tv 65OLED804 / 12.

Same problem here.

Any update on this? My Philips integration is broken

I can find my tv with the integration if i “reinstall” the tv, but appx 1 min after i put in the wifi passord i can not connect to it anymore. It seems like a issue on the TV end. Anyone else with similar problems? Can it be something related to 5/2,4 mHz network?

I have a Philips TV connected with a LAN cable and everything works perfectly.

Hello, I also have a problem when I integrate Philips TV, everything works for about 4 days, then the TV is already in HA offline. It will only help to turn off the TV from 230. The problem will probably be with the API,
the original mobile application is still functional, only HA will lose communication.

does anyone have the same problem?