Kodi State

(Continuing from Low Cost (Amazon Dash Button) Washing Machine Timer)

@ThomDietrich What is the OH2 equivalent of

Switch KodiSystemState "Kodi State" <kodi> (gKodi) {xbmc="<[#livingRoom|System.State]"}

as used here. These in OH2 format would be nice too.

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 :slight_smile: Check out: http://OHip:8080/doc/index.html

This worked as a start,

Switch KodiSystemState
rule "Find out whether Kodi is alive"
                Thing "kodi:kodi:5e2bea71" changed
                var status = ThingAction.getThingStatusInfo("kodi:kodi:5e2bea71").getStatus()
                if (status.toString() == 'OFFLINE')
1 Like

I forgot that this PR is not merged yet: https://github.com/openhab/openhab-docs/pull/463/files
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? :smile: