The stuff your looking for is in the account area, not in the doorbell area.
Here’s my rule for the ring doorbell, there is a 2 minute delay for OH to see the changes from the RING API. My rule integrates the IP Camera binding also to capture a image. This rule is actually tied to 2 different doorbells in two different locations.
rule "RingEventKind received update"
when
Item RingEventKind received update
then
if (systemStarted.state != ON && RingEventKind.state == 'cleared') { return; }
var MailBinding = getThingStatusInfo("mail:smtp:4228b22a33")
var vRingDoorBell = getThingStatusInfo("ring:account:7494353203")
var remoteURL = RingEventVideoURL.state.toString().replace("http://192.168.0.32:8080/ring/video/","http://www.myurl.org/OHRing/")
var localURL = RingEventVideoURL.state.toString().replace("http://192.168.0.32:8080/ring/video/","http://192.168.0.32:8080/static/ring/video/")
extract_date_time_formatted = now.format(java.time.format.DateTimeFormatter.ofPattern("MM_dd_yyyy_HH_mm"))
val string FrontDoorCam = "FrontDoor"+ extract_date_time_formatted +".jpg"
if (DVR.state == ON) {
executeCommandLine(Duration.ofSeconds(5), "wget", "-O", "/var/lib/openhab/pics/"+ FrontDoorCam, "http://user:pass@192.168.0.11:81/ISAPI/Streaming/channels/101/picture" )
}
// Front Door Ding
if ((systemStarted.state != ON && vRingDoorBell !== null) && (gInternet.state == ON && RingEventKind.state == 'ding' && gPort25.state == ON && RingEventDeviceDescription.state != 'Condo')) {
if (systemStarted.state != ON && Living_TV_Power.state == ON) {
NVidiaLR_OpenURL.sendCommand('http://192.168.0.32:8080/habpanel/index.html#/view/FrontDoorCam?kiosk=on')
logInfo("AndroidDebug","NVidiaLR_OpenURL starts Front Door.")
}
if (systemStarted.state != ON && Basement_TV_Power.state == ON) {
NVidiaMB_OpenURL.sendCommand('http://192.168.0.32:8080/habpanel/index.html#/view/FrontDoorCam?kiosk=on')
logInfo("AndroidDebug","NVidiaMB_OpenURL starts Front Door.")
}
if (systemStarted.state != ON && Bedroom_TV_Power.state == ON) {
NVidiaBasement_OpenURL.sendCommand('http://192.168.0.32:8080/habpanel/index.html#/view/FrontDoorCam?kiosk=on')
logInfo("AndroidDebug","NVidiaBasement_OpenURL starts Front Door.")
}
logInfo("RING","-----------------------------------------------------------------------------")
logInfo("RING","eMail and SMS triggered by RingEventKind being " + RingEventKind.state)
logInfo("RING","-----------------------------------------------------------------------------")
if ((MailBinding !== null) && (MailBinding.getStatus().toString() == 'ONLINE')) {
val mailActions = getActions("mail","mail:smtp:4228b22a33")
var String subjectemailRingDoorRang = "openHAB3 - IL Doorbell Rang"
var String bodyemailRingDoorRang = "There is a two minute delay from getting this email. Ring Event was a " + RingEventKind.state +". \n\n At Home Downloadable openHAB MP4 " + localURL +" \n\n Remote Downloadable openHAB MP4 " + remoteURL +" \n\n The system only keeps 100 videos back to reference."
val String attachment = "/var/lib/openhab/pics/" + FrontDoorCam
val String attachmentUrlListPushOver = attachment
val List<String> attachmentUrlList = newArrayList("file://" + attachment)
mailActions.sendMail(JaygMail, subjectemailRingDoorRang, bodyemailRingDoorRang, attachmentUrlList)
Thread::sleep(200)
var String subjectemailRingDoorRang2 = "IL Doorbell Rang"
var String bodyemailRingDoorRang2 = remoteURL
mailActions.sendMail(JaySMS, subjectemailRingDoorRang2, bodyemailRingDoorRang2)
Thread::sleep(200)
mailActions.sendMail(TriciaSMS, subjectemailRingDoorRang2, bodyemailRingDoorRang2)
logInfo("EMAIL",subjectemailRingDoorRang)
Thread::sleep(500)
if (systemStarted.state != ON && gInternet.state == ON) {
var String PushOverMessage = "IL Doorbell Rang"
var String PushOverTitle = "Ding Dong"
val pushOverActions = getActions("pushover","pushover:pushover-account:account")
pushOverActions.sendAttachmentMessage(PushOverMessage, PushOverTitle, attachmentUrlListPushOver, PushOverMIME)
logInfo("PUSHOVER",PushOverMessage)
}
}
RingEventKind.postUpdate('cleared') // prevent stail RingEventKind
}
// Florida Condo Ding
if ((systemStarted.state != ON && vRingDoorBell !== null) && (gInternet.state == ON && RingEventKind.state == 'ding' && gPort25.state == ON && RingEventDeviceDescription.state == 'Condo')) {
logInfo("RING","-----------------------------------------------------------------------------")
logInfo("RING","eMail and SMS triggered by RingEventKind being " + RingEventKind.state)
logInfo("RING","-----------------------------------------------------------------------------")
if ((MailBinding !== null) && (MailBinding.getStatus().toString() == 'ONLINE')) {
val mailActions = getActions("mail","mail:smtp:4228b22a33")
var String subjectemailRingDoorRang = "openHAB3 - FL Doorbell Rang"
var String bodyemailRingDoorRang = "There is a two minute delay from getting this email. Ring Event was a " + RingEventKind.state +". \n\n At Home Condo Downloadable openHAB MP4 " + localURL +" \n\n Remote Downloadable openHAB MP4 " + remoteURL +" \n\n The system only keeps 100 videos back to reference."
mailActions.sendMail(JaygMail, subjectemailRingDoorRang, bodyemailRingDoorRang)
Thread::sleep(200)
var String subjectemailRingDoorRang2 = "FL Doorbell Rang"
var String bodyemailRingDoorRang2 = remoteURL
mailActions.sendMail(JaySMS, subjectemailRingDoorRang2, bodyemailRingDoorRang2)
Thread::sleep(200)
mailActions.sendMail(TriciaSMS, subjectemailRingDoorRang2, bodyemailRingDoorRang2)
logInfo("EMAIL",subjectemailRingDoorRang)
}
var String Message = '<speak><prosody rate="fast">Excuse me, the doorbell rang, at the Florida Condo.</prosody></speak>'
if (systemStarted.state != ON && currHour.state >= 6 && currHour.state <= 21 && JsAndriodUnifi.state == ON) {
Echo_Jay_TTS.sendCommand(Message)
Thread::sleep(1500)
}
if (systemStarted.state != ON && Switch_Basement_Light.state == ON) {
Echo_Basement_TTS.sendCommand(Message)
Thread::sleep(1500)
}
var EchoThingGym = getThingStatusInfo("amazonechocontrol:echo:account1:echogym")
if ((EchoThingGym !== null) && (EchoThingGym.getStatus().toString() == 'ONLINE' && Alexa_Status.state == 'ONLINE')) {
if (systemStarted.state != ON && Switch_Gym_Light.state == ON) {
if (Gym_TV_Power.state == ON) { Echo_Gym_textToSpeechVolume.sendCommand('70') }
Thread::sleep(1500)
Echo_Gym_TTS.sendCommand(Message)
Thread::sleep(1500)
}
}
var EchoThingBackYard = getThingStatusInfo("amazonechocontrol:echo:account1:echobackyard")
if ((EchoThingBackYard !== null) && (EchoThingBackYard.getStatus().toString() == 'ONLINE' && Alexa_Status.state == 'ONLINE')) {
if (systemStarted.state != ON && Home_Away.state == ON && Alexa_Status.state == 'ONLINE' && gInternet.state == ON && (Wallplug_String_Lights.state == ON || PatioDoor_Status.state == OPEN || gPart1Zone3Fault.state == ON )) {
Echo_BackYard_TTS.sendCommand(Message)
}
Thread::sleep(1500)
}
RingEventKind.postUpdate('cleared') // prevent stail RingEventKind
}
// Front Door Motion
if ((systemStarted.state != ON && vRingDoorBell !== null) && (gInternet.state == ON && RingEventKind.state == 'motion' && RingEventDeviceDescription.state != 'Condo')) {
// Front Door Motion Speaking
if (systemStarted.state != ON && Home_Away.state == ON && Alexa_Status.state == 'ONLINE' && Outside_Motion_Speaking_Switch.state != ON && RingEventDeviceDescription.state != 'Condo') {
Outside_Motion_Speaking_Switch.postUpdate(ON) // delay 10 minutes for speaking again
logInfo("MOTION","zWave FrontDoor_Status is set to " + FrontDoor_Status.state)
var String Message = '<speak><prosody rate="fast">Excuse me, there was, movement at the front door.</prosody></speak>'
if (systemStarted.state != ON && FrontDoor_Status.state != OPEN && gPart1Zone1Fault.state != ON) {
Echo_LivingRoom_TTS.sendCommand(Message)
Thread::sleep(1500)
}
if (systemStarted.state != ON && currHour.state >= 6 && currHour.state <= 21 && JsAndriodUnifi.state == ON) {
Echo_Jay_TTS.sendCommand(Message)
Thread::sleep(1500)
}
if (systemStarted.state != ON && Switch_Basement_Light.state == ON) {
Echo_Basement_TTS.sendCommand(Message)
Thread::sleep(1500)
}
var EchoThingGym = getThingStatusInfo("amazonechocontrol:echo:account1:echogym")
if ((EchoThingGym !== null) && (EchoThingGym.getStatus().toString() == 'ONLINE' && Alexa_Status.state == 'ONLINE')) {
if (systemStarted.state != ON && Switch_Gym_Light.state == ON) {
if (Gym_TV_Power.state == ON) { Echo_Gym_textToSpeechVolume.sendCommand('70') }
Thread::sleep(1500)
Echo_Gym_TTS.sendCommand(Message)
Thread::sleep(1500)
}
}
var EchoThingBackYard = getThingStatusInfo("amazonechocontrol:echo:account1:echobackyard")
if ((EchoThingBackYard !== null) && (EchoThingBackYard.getStatus().toString() == 'ONLINE' && Alexa_Status.state == 'ONLINE')) {
if (systemStarted.state != ON && Home_Away.state == ON && Alexa_Status.state == 'ONLINE' && gInternet.state == ON && (Wallplug_String_Lights.state == ON || PatioDoor_Status.state == OPEN || gPart1Zone3Fault.state == ON )) {
Echo_BackYard_TTS.sendCommand(Message)
} else if (systemStarted.state != ON && Alexa_Status.state == 'ONLINE' && gInternet.state == ON && PatioDoor_Status.state != OPEN && gPart1Zone3Fault.state != ON && (Sonos_BackYard_State.state == 'PLAYING' || Sonos_OnWallOutside_State.state == 'PLAYING')) {
Echo_BackYard_TTS.sendCommand(Message)
}
Thread::sleep(1500)
}
}
logInfo("RING","-----------------------------------------------------------------------------")
logInfo("RING","eMail triggered by RingEventKind being " + RingEventKind.state)
logInfo("RING","-----------------------------------------------------------------------------")
if ((MailBinding !== null) && (MailBinding.getStatus().toString() == 'ONLINE' && RingEventDeviceDescription.state != 'Condo')) {
val mailActions = getActions("mail","mail:smtp:4228b22a33")
var String subjectemailRingDoormotion = "openHAB3 - IL Ring Motion"
var String bodyemailRingDoormotion = "There is a two minute delay from getting this email. Ring Event was a " + RingEventKind.state +". \n\n At Home Downloadable openHAB MP4 " + localURL +" \n\n Remote Downloadable openHAB MP4 " + remoteURL +" \n\n The system only keeps 100 videos back to reference."
val String attachment = "/var/lib/openhab/pics/" + FrontDoorCam
val String attachmentUrlListPushOver = attachment
val List<String> attachmentUrlList = newArrayList("file://" + attachment)
mailActions.sendMail(JaygMail, subjectemailRingDoormotion, bodyemailRingDoormotion, attachmentUrlList)
logInfo("EMAIL",subjectemailRingDoormotion)
Thread::sleep(500)
if (systemStarted.state != ON && gInternet.state == ON && UnifiPhones.state == OFF) {
var String PushOverMessage = "IL Motion at Front Door"
var String PushOverTitle = "IL Ring Motion"
val pushOverActions = getActions("pushover","pushover:pushover-account:account")
pushOverActions.sendAttachmentMessage(PushOverMessage, PushOverTitle, attachmentUrlListPushOver, PushOverMIME)
logInfo("PUSHOVER",PushOverMessage)
}
}
RingEventKind.postUpdate('cleared') // prevent stail RingEventKind
}
// Florida Condo Motion
if ((systemStarted.state != ON && vRingDoorBell !== null) && (gInternet.state == ON && RingEventKind.state == 'motion' && RingEventDeviceDescription.state == 'Condo')) {
// Front Door Motion Speaking
if (systemStarted.state != ON && Home_Away.state == ON && Alexa_Status.state == 'ONLINE' && Outside_Motion_Speaking_Switch.state != ON && RingEventDeviceDescription.state != 'Condo') {
var String Message = '<speak><prosody rate="fast">Excuse me, there was movement, at the Florida Condo Door.</prosody></speak>'
if (systemStarted.state != ON && currHour.state >= 6 && currHour.state <= 21 && JsAndriodUnifi.state == ON) {
Echo_Jay_TTS.sendCommand(Message)
Thread::sleep(1500)
}
if (systemStarted.state != ON && Switch_Basement_Light.state == ON) {
Echo_Basement_TTS.sendCommand(Message)
Thread::sleep(1500)
}
var EchoThingGym = getThingStatusInfo("amazonechocontrol:echo:account1:echogym")
if ((EchoThingGym !== null) && (EchoThingGym.getStatus().toString() == 'ONLINE' && Alexa_Status.state == 'ONLINE')) {
if (systemStarted.state != ON && Switch_Gym_Light.state == ON) {
if (Gym_TV_Power.state == ON) { Echo_Gym_textToSpeechVolume.sendCommand('70') }
Thread::sleep(1500)
Echo_Gym_TTS.sendCommand(Message)
Thread::sleep(1500)
}
}
var EchoThingBackYard = getThingStatusInfo("amazonechocontrol:echo:account1:echobackyard")
if ((EchoThingBackYard !== null) && (EchoThingBackYard.getStatus().toString() == 'ONLINE' && Alexa_Status.state == 'ONLINE')) {
if (systemStarted.state != ON && Home_Away.state == ON && Alexa_Status.state == 'ONLINE' && gInternet.state == ON && (Wallplug_String_Lights.state == ON || PatioDoor_Status.state == OPEN || gPart1Zone3Fault.state == ON )) {
Echo_BackYard_TTS.sendCommand(Message)
}
Thread::sleep(1500)
}
}
logInfo("RING","-----------------------------------------------------------------------------")
logInfo("RING","eMail triggered by RingEventKind being " + RingEventKind.state)
logInfo("RING","-----------------------------------------------------------------------------")
if ((MailBinding !== null) && (MailBinding.getStatus().toString() == 'ONLINE')) {
val mailActions = getActions("mail","mail:smtp:4228b22a33")
var String subjectemailRingDoormotion = "openHAB3 - FL Ring Motion"
var String bodyemailRingDoormotion = "There is a two minute delay from getting this email. Ring Event was a " + RingEventKind.state +". \n\n At Home Downloadable openHAB MP4 " + localURL +" \n\n Remote Downloadable openHAB MP4 " + remoteURL +" \n\n The system only keeps 100 videos back to reference."
mailActions.sendMail(JaygMail, subjectemailRingDoormotion, bodyemailRingDoormotion)
logInfo("EMAIL",subjectemailRingDoormotion)
}
RingEventKind.postUpdate('cleared') // prevent stail RingEventKind
}
end
Best, Jay