Hi folks,
how do i get an http item counter with status return?
What I have managed to do is that I can switch my receiver on and off via Openhab. But when I switch the reseiver on or off externally, I don’t see the change in status in Openhab.
But there is the possibility to request the status.
What I have:
Item:
Switch DB_power "Dreambox [%s]" {http=">[ON:POST:http://192.168.178.6/web/powerstate?newstate=4] >[OFF:POST:http://192.168.178.6/web/powerstate?newstate=5] ]" }
I get the status from the receiver as follows:
http://192.168.178.6/web/powerstate:60000:REGEX(.*?<e2instandby>(.*?)</e2instandby>.*)
Output: and my dreambox.map
true=OFF
false=ON
Now come to my question is it possible to implement everything in one item?
What I have built myself where no error appears in the logs but does not work:
Switch DB_power "Dreambox [%s]" {http=">[ON:POST:http://192.168.178.6/web/powerstate?newstate=4] >[OFF:POST:http://192.168.178.6/web/powerstate?newstate=5] <[http://192.168.178.6/web/powerstate:60000:REGEX(.*?<e2instandby>(.*?)</e2instandby>.*:MAP(dreambox.map))]" }
As I know the community you can help me. THX