I am trying the use the LMS (Logitech Media Server) device in dzVents. I created the following script, which is activated using a switch named LMS.
It switches in the Squeezebox (Woonkamer) and receiver (device 76 and 74).
Squeebox and receiver switch on/off perfect depending on the LMS switch.
But I should also play playlist list1 and this fails.. (no errors in log) In Sqeezebox server the playlist is named list1
Any help .. Can't see what is wrong (looking at it for several days).
Running : V4.9697 (Beta)
Code: Select all
return {
on = {
devices = {
'LMS'
}
},
execute = function(domoticz, device)
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
local LMS_S = domoticz.devices('LMS')
local LMS_P = domoticz.devices('Woonkamer')
local LMS_R = domoticz.devices(76)
if LMS_S.state == 'On' then
LMS_R.dimTo(25)
-- LMS_P.play()
LMS_P.startPlaylist('list1')
domoticz.log('PLAY list', domoticz.LOG_INFO)
--LMS_P.play()
end
if LMS_S.state == 'Off' then
domoticz.devices(74).switchOff()
LMS_P.switchOff()
LMS_R.dimTo(17)
end
end
}