Ring Binding port from 2.5 to 3.x version

Hello OH 3 Team,

I’m in the process of migrating to OH 3.x and have NOT found the Ring binding migrated yet.

The Ring binding integrates into the Ring doorbell platform seamlessly. I tried to drop it in and it doesn’t activate, it just says installed.

org.openhab.binding.ring-2.5.2-SNAPSHOT.jar

Is there plans to do this? How can I request this formerly?

Best, Jay

Seems this has never been an official openHAB 2.5 binding, therefore you should ask the contributor/author.
If I remember correct, there is an open Pull Request for this binding.

Hi @zolakk,

Would you please consider compiling your Ring binding against the OH 3.x branch so a bunch of us can migrate our Ring doorbell integration from OH 2.5 to OH 3.x?

Best, Jay

This is an un-official Ring 3.x release and there is NO maintainer for this version, Siriram did me a BIG favor doing this for me.

I’m still testing it but it does come up for account and doorbell THING.

Best, Jay

2 Likes

@jwiseman just purchased a ring doorbell at prime day. any news in regards to your tests?

The version link posted above I’m still running. I have 2 ring doorbells in two physical different locations and it’s working for both of them fine. LMK if I an help in anyway?

Best, Jay

1 Like

Jay, thanks for offering help! Well, I’m a nerd but I’m completely unexperienced with Ring devices.
I managed to

  • install the binding
  • added a Ring account thing
  • added a Ring Video Doorbell thing

Latter provides just two channels, see screenshot.
What am I missing? Ideally I would see a trigger channel if something moves in front of the doorbell, another channel if someone rings the bell and maybe a picture/video stream URL?

PS: I noticed an error message in the log complaining about the path /etc/openhab2/html/ring/video
Once created with correct permissions, I could see a few video files

best regards, Stefan

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

Hey Jay!
Can you share how you got the image from the device?
Do you need the subscription to capture it as well?
Regards

The image capture is from another camera system (HIK Vision), not from the Ring device.

Best, Jay

Good morning everyone,

I got the binding running yesterday but have one issue:

The timestamp of the last event doesn’t get updated.

The Account thing has an polling update of 5 seconds and is shown as “online”.

I created a normal time point item over the openhab UI.

When relinking the item, it gets the latest timestamp, so that information seems to be in place…

Any idea what might cause that issue?

Thanks a lot,
Christian

I have confirmed mine is working.

Ring Event Created 10.22.2022 16:05

Here’s my item definition of it.

DateTime   RingEventCreated               "Ring Event Created [%1$tm.%1$td.%1$tY %1$tH:%1$tM]"              										{ channel="ring:account:7494353203:event#createdAt" } 

Best, Jay

Thanks Jay,

Unfortunately I don’t get it working.

I even tried rebooting openhab as well as reinstalling the binding completely.

Linking the channel always updates the item only once or if I change some item settings. Means, the channel successfully transfers the date point, but isn’t synchronized to the item.

Not sure whether this can be caused by the necessary json mini or some related settings? It’s my only binding with that behaviour.

So if anyone has an approach to try that works be much appreciated.

Thanks guys,
Best,

Christian

Are you running OH 3.3 or 3.4? If so, maybe that is the issue?

Im running OH 3.2.

Best, Jay

It’s also version 3.2 I am running. May be I’ll digg more into upcoming weekend. Alsoy Alexa routine triggered my ring movement detection isn’t working properly so I’m curious whether the issue might also come from ring’s side?!

If I find a solution I’ll let you know!

I got the “Ring Binding” working on my end as well. Appreciate all the work put in.

If I got @jwiseman correctly, there is option to capture a current picture via the ring, correct?

Another question would be, if there is an option to trigger the mode selection “Home”, “Away” or “Inactive”? I do not rely on the “Geofence” function of ring - hence I would like to pair it with my presence rules in OH3. Any ideas?

Final question: What exactly does the “account polling” channel tell me on account or respectively on doorbell level?

Hi,

I have the same issue. I was successfully able to install the Binding today. But my created Items from the Things are not updating except from the initial discovery, so when the Doorbell is rung, OpenHAB does not detect the state change, so I can’t get any Rules to fire.

Did you ever manage to resolve this?

Thanks,
Lee

Maybe some progress. The Logs were complaining about an OH2 directory not being present (I’m on OH3) so I manually created the following:

/etc/openhab2/html/ring/video

A “ding” is now detected, but as previously mentioned by others, there is an almost 2 minute delay before the Item is updated, which makes it too slow to use in real-time.

Any workaround to this?

hey guys, if you (just) want to get notified once the door is rung you can also try the ring-mqtt project offered on github. I’ve also created a thread on this forum about it. works like a charm with instant notification.

Best, Jay