Just to be sure - you want me to copy the following EXACTLY AS IS into my UI7 Scene Step 3 “Also execute the following Luup code” section (my altid, on re-pair, is now 28):
–declare a function to play the MP3 7 times (@20 seconds play). This will make the rest easier to read
function play()
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘28’,Data=‘112 4 2 1 7’},1)
end
–we’ll use this to reset the volume
function vol_down()
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘28’,Data=‘112 4 6 1 2’},1)
end
–start routine
–set volume to max
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘28’,Data=‘112 4 8 1 10’},1)
–begin “the song that never ends”
luup.call_delay( ‘play’, 1) – Call the switch off function after a delay of 1 seconds
luup.call_delay( ‘play’, 21) – Call the switch off function after a delay of 21 seconds
luup.call_delay( ‘play’, 41) – Call the switch off function after a delay of 41 seconds
luup.call_delay( ‘play’, 61) – Call the switch off function after a delay of 61 seconds
luup.call_delay( ‘play’, 81) – Call the switch off function after a delay of 81 seconds
…
luup.call_delay( ‘play’, 141) – Call the switch off function after a delay of 141 seconds
–go back to quiet mode
luup.call_delay( ‘voldown’, 161) – Call the switch off function after a delay of 161 seconds
Including explanation text, dashes, spaces, everything that’s blue, as is, copy/paste. Sorry if I’m being repetitive, I just want to get this right.
You should know, last night the engineer helping me sent me the following code to use which he said would make it play my 2 second sound 21 times. It played it 21 times, with an eight second gap between each 7.
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘28’,Data=‘112 4 2 1 99’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘28’,Data=‘112 4 6 1 2’},1)
luup.call_delay( ‘delayON’, 29)
luup.call_delay( ‘delayON’, 58)
function delayON()
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘28’,Data=‘112 4 6 1 2’},1)
end