Initial Commit

This commit is contained in:
Patrick Niebeling
2019-10-17 13:23:53 +02:00
parent 81699fd4a4
commit b699c1545c
49 changed files with 659 additions and 3 deletions

26
rules/Camera.rules Normal file
View File

@ -0,0 +1,26 @@
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