OK, so this is what I’ve done.
When either my partner or I are home (indicated by gPresenceSensors being ON) and the vTimeOfDay is Day, then this will disable Motion Recording on the inside and rear yard cameras. The rest of the cameras will still record (ones that monitor my gates, doors and rear lane)
Otherwise, all cameras are recording.
Here is some motion alerts which alert us at night time if the Carport or Garage are triggered:
rule "Blue Iris Motion Detection Alert - Garage"
when
Item Motion_Garage received command
then
if(Kris_MobileAP.state != "Garage" || Jodie_MobileAP.state != "Garage"){
logInfo("Blue Iris", "There is motion in the Garage")
Echo_Living_Room_TTS.sendCommand('There is motion in the Garage')
Echo_Garage_TTS.sendCommand('The police have been called')
sendBroadcastNotification("There is motion in the Garage")
}
end
rule "Blue Iris Motion Detection Alert - Carport"
when
Item Motion_Carport received command
then
if(Kris_MobileAP.state != "Garage" || Jodie_MobileAP.state != "Garage"){
logInfo("Blue Iris", "There is motion in the Carport")
Echo_Living_Room_TTS.sendCommand('There is motion in the Carport')
Echo_Garage_TTS.sendCommand('The police have been called')
sendBroadcastNotification("There is motion in the Carport")
}
end
And this is the one that enables/disables motion but its not working lol! The HTTP commands execute just find if I use a browser
rule "Turn off Blue Iris Motion Recording when we are Home"
when
Item gPresenceSensors changed
then
if(gPresenceSensors.state == ON && vTimeOfDay.state == "DAY"){ // If we are home and its day time, turn off Motion Recording
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=RearYard&motion=0&user=Kris&pw=XXXX") // Disable Motion Recording in Rear Yard
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=LivingRoom&motion=0&user=Kris&pw=XXXX") // Disable Motion Recording in Living Room
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=Alfresco&motion=0&user=Kris&pw=XXXX") // Disable Motion Recording in Alfresco
logInfo("Blue Iris", "Selective motion recording OFF because someone came home and its day")
}
if(gPresenceSensors.state == ON && vTimeOfDay.state == "NIGHT"){ // If we are home and its night time, turn on Motion Recording
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=RearYard&motion=1&user=Kris&pw=XXXX") // Enable Motion Recording in Rear Yard
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=LivingRoom&motion=1&user=Kris&pw=XXXX") // Enable Motion Recording in Living Room
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=Alfresco&motion=1&user=Kris&pw=XXXX") // Enable Motion Recording in Alfresco
logInfo("Blue Iris", "It's night time so all motion recording ON")
}
else (gPresenceSensors.state == OFF){
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=RearYard&motion=1&user=Kris&pw=XXXX") // Enable Motion Recording in Rear Yard
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=LivingRoom&motion=1&user=Kris&pw=XXXX") // Enable Motion Recording in Living Room
sendHttpGetRequest("http://192.168.0.4:82/admin?camera=Alfresco&motion=1&user=Kris&pw=XXXX") // Enable Motion Recording in Alfresco
logInfo("Blue Iris", "Motion recording ON as no one is home")
}
end