Possible Solution to get current state (on/off) of Panasonic TV
Expected Behavior
Some kind of Switch to see the actual state
Current Behavior
You can‘t see if the TV is running or not
Possible Solution (works with my TX-55ASW654 )
If the TV is running, there is an XML Structure at Port 55000 of your TV IP Adress. If it‘s not running the structure is missing. And so you can check if a part of the xml File, for example 1 is available.
http://192.xxx.xxx.xx:55000/dmr/ddd.xml (IP of your TV)
XML File:
<?xml version="1.0" encoding="UTF-8"?> 1 0 and so on...What to do:
-
Install the HTTP Binding
-
At Configuration/Services create a file http.cfg which contains:
timeout=1000
granularity=1000
format=true
panazustand.url=http://192.xxx.xxx.xx:55000/dmr/ddd.xml
panazustand.updateInterval=1000
-
In your Item File add:
-
Add to your Sitemap:
Text item=tvistanaus label=“TV [%s]” icon=“cinema” -
Create a rule file. I named it Panasonicrefresh.rules with:
rule “Panasonicrefresh”
when
Item tvzustand changed
then
if (tvzustand.state.toString === null) {
logInfo(“FILE”,“TV is off R:Panasonicrefresh” )
postUpdate(tvistanaus, OFF)
}
else if (tvzustand.state.toString == "1") {
logInfo("FILE","TV is on R:Panasonicrefresh" )
postUpdate(tvistanaus, ON)
}
end
- What you have to know: It takes a few seconds (about 30) for the condition to change
And now?
It‘s working for me and my TV. Maybe someone can test it on his/her TV and I hope someone can complete the binding with this or a compatible solution.
My Environment
OH 2.2. on Raspberry Pi 3