Philips TV (2016+) Binding

Hi,

how often do you see this message? Are you using UPnP and what is your refresh rate + tv model? Does everything else works? It seems that refreshing the current tv channel fails often in your case.

There’s no real fix for Read timed out as it happends occasionally with philips tv’s and was in my experience only for a short time. This was solved in my case with simply retrying. If the log shows the error, 3 retries failed.

If you mean by less verbose to remove the stacktrace: yes, that is more of a leftover for debugging problems which people encounter here. Will be removed in the next version, as it’s in a mature state now. As mentioned your error shouldn’t pop up that often and I would be interested in figuring out a solution.

I seem to have fixed it. After re-installing the binding I recreated the thing, using the credentials and code from the original thing.

I now once more removed it and got a new code from the TV. Now that seems to have stopped the issue

TV: Philips 70pus7304/12
OH: 2.4
Binding version from 1 post

Is it true that Philips API works for about 100 request and then stops working? It could be aswer to common problems when everything works and rapidly stops working.

I’ve tried so many configurations, and recreations, copying and pasting user and pass codes, new PINS, everything, but when in the end of a day integration works again, next day morning… not. Sometimes cuting of power from TV and restart helps, other time no and I have to reconfigure everything from beggining.

For now I have on running TV thing status “Online Standby” and Power switch in OH turned off, when my TV is working and I’m watching TV. When I will switch it on i OH I will get Online but nothing else changes. So I could generate different status codes, but without impact on TV. I logs I have many of these errors:

"2020-01-06 21:12:43.127 [WARN ] [hilipstv.internal.service.AppService] - Error occurred during handling of command for apps: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3110) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at org.openhab.binding.philipstv.internal.service.AppService.getAvailableAppListFromTv(AppService.java:171) ~[?:?]
        at org.openhab.binding.philipstv.internal.service.AppService.handleCommand(AppService.java:82) ~[?:?]
        at org.openhab.binding.philipstv.internal.handler.PhilipsTvHandler.refreshTvProperties(PhilipsTvHandler.java:378) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2020-01-06 21:12:43.138 [WARN ] [tv.internal.service.TvChannelService] - Error occurred during handling of command for TV Channels: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
 at [Source: ; line: 1, column: 1]
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3110) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161) ~[203:com.fasterxml.jackson.core.jackson-databind:2.4.5]
        at org.openhab.binding.philipstv.internal.service.TvChannelService.getAvailableTvChannelListFromTv(TvChannelService.java:108) ~[?:?]
        at org.openhab.binding.philipstv.internal.service.TvChannelService.handleCommand(TvChannelService.java:70) ~[?:?]
        at org.openhab.binding.philipstv.internal.handler.PhilipsTvHandler.refreshTvProperties(PhilipsTvHandler.java:382) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
"

It seems like non of channels are refreshed now.

PS If you could werify my registration proces on TV:

  1. Turn on TV, wait for thing doscovered and add discovered thing.
  2. After displaying PIN on TV add it to thing.
  3. After that in thing should appear proper user, pass, mac, port, etc.
    Q: Port should be to the end set to 1926…?
  4. Link all channels inside item string (I have defined them in files).
    End

When firs problem occurred, I’ve rewiten all config to files. I thought it will be more stable. Now my thing defined as:
Thing philipstv:tv:F00DBABE_AA5E_BABA_DADA_(MAC) “Living Room TV - Philips” [host=“192.168.1.80”, port=“1926”, pairingCode="(pin)", username="(user)", password="(pass)" ]

What is the propper “start procedure”?

Did I missed something? I wa sin situation when binding/thing stopped working (COMMUNICATION ERROR/tv not responding to commands, etc), and then I’ve changed port to 8443. Suddenly thing had back to live, but after that situation described on the beggining of post occured.

5’th day I fighting with binding and only partial succes I have.

I be gratefully for eny help.

Edit: Now I’ve changed port to 1926 and again everything works fine na dI have no errors. I have no clue why it’s so unstable here.

The port should not be changed, this is an experimental feature for people with specific tv models. It should always be 1926. That’s why you recieved the error in your logs.

As you said for now everything seems to be normal again. Next time you encounter issues, raise the log level to DEBUG and post the logs here. That might give some insights why you’re experiencing problems.

Everything was working OK till today morning. It seems that some kind of long delay, when TV is in standby mode, results in “OFFLINE” status, from which WOL function (via WOL binding) isn’t able to wake it up again. I’ve to observe the situation a little longer and will give more info.

3 Likes

Hi.

Tested it with 65PUS7303/60 and it works ok.

Thanks for it!

1 Like

Same here… 55POS9002/12, works perfect. Both power on and off… only after a while i can’t power it on again… any fix for this?

Sounds like it can be related to tv energy saving settings. There’s nothing that can be done by the binding, if the tv network card won’t wake up by Wake-On-LAN

What doest that means? Is there a way to “probe” tv not to go to deep sleep and accept commands whole the time?

And another thing, because I might missed something. Is WOL function build in binding, or I have to make aditional logic based on rules with external WOL binding?

No, it is not possible. At least not with my tv model. But you can easily verify that for your tv model through switching over to constant polling.

I’ve implemented WOL in the last release, see the initial post for more information. Hard to tell if this works fine for every tv model, but at least for mine it’s working stable. It is being used for the power switch if turned on and for the ambilight lounge mode.

In my case I’m using rules that triggers WOL packet (external binding) and then try to turn on TV. So I assume that in fact I’m sending two WOL packets in my case. :wink: Anyway if TV is in
image
state, he doesn’t want to wake up. Any cloue why? This is strange because in my TV i have switched ON two options:

  • WoWLAN,
  • turn ON with Chromecast.

Yes i thought the same. But i double checked every energy/power related option. Everything seems to set-up correctly. I have enabled:

  • WoWLAN,
  • turn ON with Chromecast.

And disabled every energy saving feature that I could find. It has a static IP adres. I will do some more investigation :slight_smile:

I just turned off “uPNP discovery”, so switched to polling. Maybe this will help…

Shouldn’t harm to fire off WOL twice :wink: did you double check if the MAC address is set at the things config? Do you see the log entries for WOL with log level set to DEBUG, when turning the power switch to ON while the TV is off?

@defcon8 same applies for you, is the MAC set in the things config?

is it connected via WiFI? I have the same issue that TV is not reachable after some point of time. But it looks that it lost Wifi connection as Wifi router changes a channel, TV does not reconnect while it is in standby mode. I’m going to set static wifi channel to check.

I’m testing the same from yesterady, but TV was used quite often today, so didn’t finish testing.

Yes. Not from thins binding, but from WOL binding.

Yes, because I have defined all params in static config (and I see MAC i those logs entries too):

Thing philipstv:tv:F00DBABE_AA5E_BABA_DADA_(MAC_ADDR) "Living Room TV - Philips" [host="192.168.1.80", macAddress="(MAC_ADDR)", port="1926", pairingCode="(PIN)", username="(USER)", password="(PASS)", useUpnpDiscovery="false", refreshRate="5" ]

An interesting thesis. Could be the reason. I will check my AP config too.

Edit: You should not make several changes at once, but in my case problem is permanent enough, so I should try everything. :wink: - Done. Switched to one channel (in my AP config rather specific channel freqency). Waiting for results…

I’m not 100% sure that WoWLAN TV option is not specific for WIFI connection. In my TV (in translation to english) WoWLAN option is named: “Turn ON with WiFi (WoWLAN)”, desc: “Switch ON to enable turning ON TV from smartphone or tablet”.
In next step I will run all my tests for LAN connection. Just to be sure.

Yes the MAC adres matches, I double checked that. Btw my television is connection thru wired ethernet. I don’t know yet if the uPNP discovery setting has any impact. I’ll will log some more info soon :slight_smile:

Update:

Switching of uPNP detection fixed the problem for me, powering on does have a small delay now (probably because of the polling interval). :slight_smile:

1 Like

You mean setting: useUpnpDiscovery="false"? What is your refresh rate? Your TV is now on LAN or WiFi?

All my tests on WiFi have failed. Now I’ve switched to LAN and testing again.

Hi Karel, I used the paper GUI to disable the UPNP detection feature. My refresh rate is 10 sec. and TV is connected using wired ethernet.

So my config is similar to yours now (except that my config is in files). Hope this will help in my case too. :wink: