Ring 2
Moderator: leecollings
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Ring 2
I own a Ring 2. However, I am not willing to pay for a subscription every month to see the call history. Now there is a plugin available for Domoticz to add the Ring 2. With a link to github to load the plugin on the Raspberry. I did that. I also changed the scripts and placed them in the scripts-library. Still I only get error messages.
Is there someone who got the Ring 2 up and running and is willing to explain step by step how to get it working?
I would like to know who rang the doorbell during the day and let me send an email. I am often just too late to open the Ring app on the phone to see who has been at the door during my absence. And also to automatically turn on a light when it's dark.
There is already a topic about Ring 2 that has stopped and I would like to breathe new life into it. I myself have been just a simple Cobol programmer in the past.
https://github.com/tchellomello/python-ring-doorbell and nigels0
Is there someone who got the Ring 2 up and running and is willing to explain step by step how to get it working?
I would like to know who rang the doorbell during the day and let me send an email. I am often just too late to open the Ring app on the phone to see who has been at the door during my absence. And also to automatically turn on a light when it's dark.
There is already a topic about Ring 2 that has stopped and I would like to breathe new life into it. I myself have been just a simple Cobol programmer in the past.
https://github.com/tchellomello/python-ring-doorbell and nigels0
- felix63
- Posts: 244
- Joined: Monday 07 December 2015 9:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: Gouda
- Contact:
Re: Ring 2
Hi Kouwe,
I have a Ring 2. I have some integration with my Domoticz setup but its not great. I only managed to trigger events based on someone ringing the doorbell. I don't use a plug-in but I followed these instructions: link.
I have a Ring 2. I have some integration with my Domoticz setup but its not great. I only managed to trigger events based on someone ringing the doorbell. I don't use a plug-in but I followed these instructions: link.
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Re: Ring 2
That’s the same one I used. But how did you make it work after downloading the plug-ins from github and changing the script for personal use (User and password).
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Ring 2
You just need to run the python script - such as
I suggested running it as a service so it would automatically start on boot.
*don’t forget to change the idx value for the switch in the code for the one you set up in your domoticz. In my script, I had an odd value of 109 for example
Code: Select all
python ~/domoticz/scrips/myscript.py &
*don’t forget to change the idx value for the switch in the code for the one you set up in your domoticz. In my script, I had an odd value of 109 for example
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Re: Ring 2
This is what I've done:
I downloaded the plugin from https://github.com/tchellomello/python-ring-doorbell. No errors. Left it where it was installed.
As user pi and just to be on the safe side as root. The latter was not necessary because the plugin was already there.
Then I changed the script of nigels0.
That means that I added my own credentials and adjusted the index number for my own switch.
I had to change my password because it contained a character that was not recognized by the system. That explained one error-message.
I then tested the script with..: /usr/bin/python2.7 /home/pi/domoticz/scripts/Ring2_doorbell.py.
This resulted in the following messages:
Traceback (most recent call last):
File “/home/pi/domticz/scripts/Ring2_doorbell.py, line 8, in <module>
myring = Ring(ringUsername,ringPassword)
File “/home/pi/.local/lib/python2.7/site-package/ring_doorbell/_init_.py”,
line 54, in _init_
self._process_cached_session()
File “/home/pi/.local/lib/python2.7/site-package/ring_doorbell/_init_.py”,
line 87, in -Process_cached_session
self.-authenticate()
File “/home/pi/.local/lib/python2.7/site-package/ring_doorbell/_init_.py”,
line 155, in _authenticate
rep.raise_for_status()
File “/home/pi/.local/lib/python2.7/site-package/requests/models.py”,
line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unautorized for url: https://api.ring.com/clients_api/session
And now I'm stuck. What goes wrong here?
I downloaded the plugin from https://github.com/tchellomello/python-ring-doorbell. No errors. Left it where it was installed.
As user pi and just to be on the safe side as root. The latter was not necessary because the plugin was already there.
Then I changed the script of nigels0.
That means that I added my own credentials and adjusted the index number for my own switch.
I had to change my password because it contained a character that was not recognized by the system. That explained one error-message.
I then tested the script with..: /usr/bin/python2.7 /home/pi/domoticz/scripts/Ring2_doorbell.py.
This resulted in the following messages:
Traceback (most recent call last):
File “/home/pi/domticz/scripts/Ring2_doorbell.py, line 8, in <module>
myring = Ring(ringUsername,ringPassword)
File “/home/pi/.local/lib/python2.7/site-package/ring_doorbell/_init_.py”,
line 54, in _init_
self._process_cached_session()
File “/home/pi/.local/lib/python2.7/site-package/ring_doorbell/_init_.py”,
line 87, in -Process_cached_session
self.-authenticate()
File “/home/pi/.local/lib/python2.7/site-package/ring_doorbell/_init_.py”,
line 155, in _authenticate
rep.raise_for_status()
File “/home/pi/.local/lib/python2.7/site-package/requests/models.py”,
line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unautorized for url: https://api.ring.com/clients_api/session
And now I'm stuck. What goes wrong here?
Re: Ring 2
I am also interested
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Re: Ring 2
I think I solved the last problem. I changed my password due to a character that was not recognized but I forgot to push the 'Done'-button. Now the script seems to be running endlessly but when I push the button on the Ring 2 nothing seems to happen. But no more errors!
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Ring 2
Check your log in domoticz - see if the script is attempting to change a switch
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Re: Ring 2
It works! I get an email with an image of the person who is pushing the Ring doorbell. The only thing that is left to do is making the script run as a service or as a part of PM2. Which I haven't been able to install yet.
When I managed to do so I will describe how or sent the link. The link in the message of Nigels0 ens up in an 401-Error.
But thanks Nigel0 for the script. It works just fine. And no need to do complicated things. Just take care of a good password without strange characters.
When I managed to do so I will describe how or sent the link. The link in the message of Nigels0 ens up in an 401-Error.
But thanks Nigel0 for the script. It works just fine. And no need to do complicated things. Just take care of a good password without strange characters.
Re: Ring 2
to Kouwe
Hello,
Could you explain me how do working "Python Ring DoorBell"?
I can not do it!
My installation seems correct.
But after ?
In https://github.com/tchellomello/python-ring-doorbell I see
Initializing your Ring object
Listing devices linked to your account
Playing with the attributes and functions
But how does it work / start?
Thank you for your help
Hello,
Could you explain me how do working "Python Ring DoorBell"?
I can not do it!
My installation seems correct.
But after ?
In https://github.com/tchellomello/python-ring-doorbell I see
Initializing your Ring object
Listing devices linked to your account
Playing with the attributes and functions
But how does it work / start?
Thank you for your help
RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Re: Ring 2
The Ring 2 service works in principle but I never know in advance for how long. Sometimes it's only half a day, sometimes it's 3 days, but in the end, despite a built-in restart, the service stops at an abort. This way I can't rely on the actions that have to be carried out when pressing the Ring buzzer.
I get the following error message:
Active: failed (Result: exit code) since Thu 2019-07-11 20:32:45 CEST; 10s ago
Process: 7904 ExecStart=/usr/bin/python /home/pi/domoticz/scripts/Ring2_doorbell.py (code=exited, status=1/FAILURE)
Main PID: 7904 (code=exited, status=1/FAILURE)
This is the service I use and is placed in /lib/systemd/system.
Description=Ring 2 E-mail
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/domoticz/scripts/Ring2_doorbell.py
Restart=on-abortion
[Install]
WantedBy=multi-user.target
I get the following error message:
Active: failed (Result: exit code) since Thu 2019-07-11 20:32:45 CEST; 10s ago
Process: 7904 ExecStart=/usr/bin/python /home/pi/domoticz/scripts/Ring2_doorbell.py (code=exited, status=1/FAILURE)
Main PID: 7904 (code=exited, status=1/FAILURE)
This is the service I use and is placed in /lib/systemd/system.
Description=Ring 2 E-mail
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/domoticz/scripts/Ring2_doorbell.py
Restart=on-abortion
[Install]
WantedBy=multi-user.target
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Ring 2
Restart=on-abortion ???
Could that be your problem?
Should be
restart=on-abort
Anyhow, here is mine;
Having said that, I don’t get failures in the code. Maybe an idea to check the logs to see why it is terminating.
Could that be your problem?
Should be
restart=on-abort
Anyhow, here is mine;
Code: Select all
[Unit]
Description=Doorbell Service
After=multi-user.target
[Service]
Type=idle
User=pi
ExecStart=/usr/bin/python /home/pi/domoticz/progs/ring2.py
Restart=always
RestartSec=0
[Install]
WantedBy=multi-user.target
-
- Posts: 14
- Joined: Friday 31 May 2019 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11352
- Contact:
Re: Ring 2
Abortion! That was the problem. It runs for days now. It's my mainframe mind that made me use abortion I think.
Who is online
Users browsing this forum: No registered users and 0 guests