A nodejs
application that acts as a bridge between ring-client-api
and the PiPup Android application in order to view Ring Doorbell camera events on Android TVs like the Nvidia SHIELD.
- I no longer have access to a Ring device, so this project will not receive updates in the future. If you wish to maintain this project, please open an issue. Thank you!
- BREAKING CHANGES: Use of
token.txt
and script variables are deprecated. These values are now stored in a .env file. See.env.example
for an example.
- Android TV
nodejs
Server (a Raspberry Pi works fine)- Ring API Token for 2FA Bypass (instructions below)
-
Install PiPup on your Android TV. Follow instructions on the PiPup page to gain access to the public beta.
-
Use ADB Shell to grant overlay permissions - see instructions below in ADB Shell over Network section.
adb shell appops set nl.rogro82.pipup SYSTEM_ALERT_WINDOW allow
Note: if using the Remote ADB Shell app, you must omit
adb shell
-
Install
node
andgit
on your server, if not already. -
Clone the
ring-to-android-tv
repo.git clone https://github.com/stevenflesch/ring-to-android-tv.git
-
Run
npm install
in thering-to-android-tv
folder.cd ring-to-android-tv
npm install
-
Copy the .env.example file to .env to configure your installation.
cp .env.example .env
-
Open
.env
in your editor and replace theR2ATV_IP_ADDRESS
variable with the IP of your AndroidTV. -
Generate an API token and save it to
.env
. Copy the key value only, no quotes. Note: keep this secret, as it allows complete access to your Ring account.npx -p ring-client-api ring-auth-cli
Save token to
.env
line like so:R2ATV_API_TOKEN=
MYAPITOKEN -
Test the script using
--test
flag.node app.js --test
Note: If you want to test a different camera, you can use a different camera by specifying a location,camera like
--test 0,0
. List your locations by typingnode app.js --list
. -
Run the application!
node app.js
-
Optional: Install the app as a service with instructions below.
If you'd like to execute the adb shell command with your Android phone, you can do so with a free app called Remote ADB Shell. Follow these instructions to do so:
- On your Android TV, open Settings.
- Open Device Preferences -> About.
- Scroll down to Build and click on it several times rapidly to enable Developer Mode.
- Press back button, scroll down to Developer options.
- Scroll down and enable Network debugging.
- Open Remote ADB Shell on your phone.
- Connect to your Android TV.
- Execute the following command:
appops set nl.rogro82.pipup SYSTEM_ALERT_WINDOW allow
- You can now disable Network debugging if you desire, for security purposes.
In order to run ring-to-android-tv
as a service, you'll need to install the forever
and forever-service
npm packages and edit your crontab to run the script at startup. Follow the directions below.
- Install forever.js and forever-service.js. In this example, we are installing it globally, which requires root priviledges.
sudo npm install forever forever-service -g
- Navigate to script directory.
cd ring-to-android-tv/
- Install service with provided JSON configuration.
sudo forever-service install ring-to-android-tv
- *Note: you can check that the script is running by entering:
sudo service ring-to-android-tv status
To update the script, simply cd
to the app directory and run git pull
.
cd ring-to-android-tv/ && git pull
Option | Explanation |
---|---|
R2ATV_IP_ADDRESS |
Address of the IP address of the Android TV running PiPup. Required. |
R2ATV_DISPLAY_TIME |
Time, in seconds, to display popup notifications. |
R2ATV_API_TOKEN |
API Token used from Ring |
This application is released under an MIT license.
Please submit contributions with a pull request, they are very welcome!
A huge thank you to both rogro82 for the PiPup application and dgreif for the ring-client-api
library.