(Continuing from Low Cost (Amazon Dash Button) Washing Machine Timer - #11 by ThomDietrich)
@ThomDietrich What is the OH2 equivalent of
Switch KodiSystemState "Kodi State" <kodi> (gKodi) {xbmc="<[#livingRoom|System.State]"}
(Continuing from Low Cost (Amazon Dash Button) Washing Machine Timer - #11 by ThomDietrich)
@ThomDietrich What is the OH2 equivalent of
Switch KodiSystemState "Kodi State" <kodi> (gKodi) {xbmc="<[#livingRoom|System.State]"}
Did you check the thing status? (via Remote Console or REST API for example)
Something like this?
curl --header "Content-Type: text/plain" --request GET http://OHip:8080/rest/items/Kodi
One option but your URL is wrong. It’s probably simpler to use the web frontend
Check out: http://OHip:8080/doc/index.html
This worked as a start,
Switch KodiSystemState
rule "Find out whether Kodi is alive"
when
Thing "kodi:kodi:5e2bea71" changed
then
var status = ThingAction.getThingStatusInfo("kodi:kodi:5e2bea71").getStatus()
if (status.toString() == 'OFFLINE')
{
KodiSystemState.postUpdate(OFF)
}
else
{
KodiSystemState.postUpdate(ON)
}
end
I forgot that this PR is not merged yet: Add documentation for the rule and action to get thing status. by kceiw · Pull Request #463 · openhab/openhab-docs · GitHub
Glad you found the solution anyhow.
So now that this is settled, any chance you are going to update my rules for the new binding? ![]()