In OH1 I had the following entry in the sitemap: Text item=kodi_player_type visibility=[kodi_player_state!="Stop"]
So the player type was only displayed if something was actually playing on Kodi.
In OH2, I now use Player. How can I access the Player states from the sitemap?
visibility=[kodi_player.state!=“Stop”]
doesn’t work, that’s the only thing I found out
I have a light dimming rule on kodi.play, a rule that triggers on kodi.pause for different light configuration and things go back to what they were on a kodi.stop
I do this via the 1.x binding - I dont think I can get the same thing with the 2 binding - I dont think you can get the stop channel state - the switch seems to be momentary rather than toggle
So sorry for getting your hopes up
I’m currently running two openhab installations in parallel and it seems I haven’t migrated this rule to OH2 yet, that’s the only reason it is still running.
You are right, we are really missing the “STOP” state to distinguish between playing, pause and stop.
I will still try to migrate the rule somehow. I hope there’s something I can do with type and title. Judging from the logs, type and title are still set when on PAUSE. When stopping a movie, these two revert to null.
If that assumption is true, it should be possible to rewrite the rules.
True, that’s good to know. But I still think this should be possible in OH2 somehow.
Not sure if this should be added to Player or if that’s something in the Kodi addon.