26 lines
1.7 KiB
Plaintext
26 lines
1.7 KiB
Plaintext
rule "Play Cam Sound"
|
|
when
|
|
Item CamPlaySound received update ON
|
|
then
|
|
logInfo("Play Cam Sound", "RULE GETRIGGERT: " + CamSoundLocSelection.state.toString)
|
|
switch(CamSoundLocSelection.state.toString) {
|
|
case "0": {
|
|
logInfo("CamSoundLocSelection", "Nur vorne: " + CamSoundLocSelection.state.toString)
|
|
sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"")
|
|
}
|
|
case "1": {
|
|
logInfo("CamSoundLocSelection", "Nur hinten: " + CamSoundLocSelection.state.toString)
|
|
sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"")
|
|
}
|
|
case "2": {
|
|
logInfo("CamSoundLocSelection", "Vorne und hinten: " + CamSoundLocSelection.state.toString)
|
|
sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"")
|
|
sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile="+CamSoundTone.state.toString+"&speakerlevel="+CamSoundVolume.state.toString+"")
|
|
}
|
|
}
|
|
// if (CamSoundLocSelection.state.toString == "3" )
|
|
// sendHttpGetRequest("http://admin:rt8qff8ppkma82bzxq2vcy3m3@10.112.30.31/control/rcontrol?action=sound&soundfile=Cuckooclock")
|
|
// sendHttpGetRequest("http://admin:pdgqa62v4f4bd9trmvp7z7t88@10.112.30.32/control/rcontrol?action=sound&soundfile=Cuckooclock&speakerlevel=30")
|
|
// }
|
|
|
|
end |