I am running OpenHab 2 on a Raspi3.
Since days I am not able to sort out the following problem:
I installed the HTTP binding in PaperUI.
http.cfg:
timeout=1000
granularity=1000
format=true
panazustand.url=http://192.168.0.248:55000/dmr/ddd.xml
panazustand.updateInterval=1000
The IP refers to my Panasonic Smart TV. ddd.xml starts as follows, when I enter the url to my browser:
10
urn:schemas-upnp-org:device:MediaRenderer:1
49EX600_Series
Panasonic
Panasonic VIErA
TX-49EX600W
uuid:4D454930-0100-1000-8001-D8AFF1B13DD2
uuid:4D454930-0000-1000-8001-D8AFF1B13DD2
uuid:4D454930-0100-1000-8001-D8AFF1B13DD2
uuid:4D454930-0200-1000-8001-D8AFF1B13DD2
4726525383056154
… and so on…
I just want to check whether this file exists. If yes, the TV is on. If no, the TV is off.
Therefore I created the following code (based on the idea of another user found here: Get current state (on/off) of panasonic tv )
Items:
String Test { http="<[panazustand:1000:REGEX([0-9])]"}
Item “Test” should be Null if the file does not exist. It should be “1” (the first character of the ddd.xml) if it exists.
Then I have a rule created:
rule "Test"
when
Item Rainer_Tablet_Ping changed
then
logInfo("TV", Test.state.toString)
end
My expectation was that this writes either “null” or “1” (the first character of the ddd.xml) to the log-File.
Unfortunately it does not.