Sorry, I couldn't find it in the docs.
Is there a way to get Kodi status in dzVents? I can see functions to send to commends (eg KodiPlay()), but no way to get the status or "attribute"
I'd like to create a simple script like "if Kodi is paused, increase room light level to 100%"
Read Kodi status
Moderator: leecollings
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Read Kodi status
the best for that is :Toyman wrote: ↑Friday 15 September 2017 11:09 Sorry, I couldn't find it in the docs.
Is there a way to get Kodi status in dzVents? I can see functions to send to commends (eg KodiPlay()), but no way to get the status or "attribute"
I'd like to create a simple script like "if Kodi is paused, increase room light level to 100%"
http://kodi.wiki/view/Add-on:Kodi_Callbacks
-
- Posts: 4
- Joined: Friday 19 February 2016 9:45
- Target OS: Linux
- Domoticz version:
- Location: Northern Holland
- Contact:
Re: Read Kodi status
I'm experimenting with this as well and came up with this test script:
So, device.state == 'Paused' is what you are looking for.
I am using the default Kodi device in Domoticz. I am not using a Kodi plugin for this.
These are the states if I'm correct:
On When the device is turned on (network connection established) or returns to an idle state.
Off When the device is turned off or network connectivity is lost.
Video When the device starts streaming Live TV, TV Shows or Movies.
Audio When the device starts streaming Music.
Photo When the device starts showing an image.
Paused When the device is streaming media and is paused.
Code: Select all
return {
active = true, -- set to false to disable this script
on = {
devices = {
-- scripts is executed if the device that was updated matches with one of these triggers
'Kodi Woonkamer' -- device name
},
},
execute = function(domoticz, device)
local lamp = domoticz.devices('Lamp Bank')
if (device.state == 'Paused') then
lamp.switchOff()
end
end
}
I am using the default Kodi device in Domoticz. I am not using a Kodi plugin for this.
These are the states if I'm correct:
On When the device is turned on (network connection established) or returns to an idle state.
Off When the device is turned off or network connectivity is lost.
Video When the device starts streaming Live TV, TV Shows or Movies.
Audio When the device starts streaming Music.
Photo When the device starts showing an image.
Paused When the device is streaming media and is paused.
-
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: Read Kodi status
I want same. When you add Kodi server you can see if Kodi is on, play, paused. Would be nice to use those status indicators.
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
Who is online
Users browsing this forum: Jeakes and 1 guest