Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


[How-to] Add your Ring Doorbell to the Fibaro HomeCenter


Recommended Posts

Is it allowed to post an integration to Home Center with third party support tools? I hope so, because this is awesome!

 

My goal: Show the latest ringer at my front door in the Fibaro Home Center App when using my Ring Doorbell.

The Challenge: Ring.com has no official API and snapshots are not possible at the moment. Fibaro does not support Ring Doorbell and Home Center and LUA code is not able to download a video and extract a frame from it.

How I fixed it? I run a Node-RED box on (Debian) Linux. I installed Python with the 

Please login or register to see this link.

to download the latest ringer video and ffmpeg to create a snapshot image. I use Node-RED to serve this snapshot with HTTP to the Home Center. You can also use NGINX, Apache or whatever webserver you like!

 

This post is for experienced users, I skip a lot Linux stuff. A more detailed approach is on my website (see my signature).

 

1. Install Python, pip and ffmpeg (of not already present) on your Linux (Raspberry/NUC/etc..) box:

Please login or register to see this code.

2. Install the

Please login or register to see this link.

:

Please login or register to see this code.

3. Create a folder and download my

Please login or register to see this attachment.

 script to it:

Please login or register to see this code.

4. In the script you have to edit the following lines with your own (login) information:

Please login or register to see this code.

5. Now run the file. You can run it as a service, but that is out of the scope of this topic.

 

6. Serve the snapshot with Node-RED to the Home Center.
Add the following node to Node-RED and edit the path of the file node to the path of the last_ding.jpg snapshot. If you want to use another webserver configure it to serve the snapshot:

 

Please login or register to see this image.

/monthly_2019_04/ringdoorbellnode.jpg.d4367fa838b285b59b968c14721722e9.jpg" style="width:750px;height:auto;" />

 

Please login or register to see this code.

7. Add a new camera in Fibaro Home Center 2:

 

fibaroaddcamera.jpg.555e72c5be1a629d61a122c10563dc6b.jpg

 

8. Give the camera a useful name and change the advanced settings to the following settings:

 

fibarocamerasettings.jpg.d49ae76d80be6f45ff1c436f1e5e0100.jpg

 

  • IP address: node-red ip address:port
  • JPG path: last_ding.jpg
  • MJPG stream: last_ding.jpg

 

Note! The MJPG stream does not work, you have NO video! I’m still searching for a solution to play the last Ring video as camera stream.

 

The result in Home Center 2:

 

fibarocameraview1.jpg.719cec1de28d1d17f7d68b347ad897be.jpg

 

And in the Home Center App:

 

Please login or register to see this attachment.

 

What the Python script does?

It logs in at the Ring.com servers and checks every 15 seconds if there is a new ring. It saves a local file to know if the last ring is a new one. If the ring is new, it downloads the lastest video and feeds it to ffmpeg to extract 1 frame to create a snapshot.

Edited by Joep
  • Like 4
Link to post
Share on other sites

1st - it's work only if u have paid account otherwise downloading last ding disabled

2nd  - now I am working on hacking snapshot endpoint what was be changed at March by ring company 

3nd - I have a plan continue work with my native script for ring doorbell + native show snapshot as camera

 

Link to post
Share on other sites
  • 3 months later...

Thanks!

 

Few remarks:

- In the python script line 33 should be:

except IOError:

- In the python script there is an error at line 45:

filename='mypath + 'last_ding.mp4',

should be

filename=mypath + 'last_ding.mp4',

 

I had some strange thing creating the camera, I had to add a "/" before the filename and then the image was shown, after that I removed the "/" and it was still working...

 

Link to post
Share on other sites
  • Topic Author
  • Thank you for removing the bug @boerremk

    I update my GitHub soon, at home I also added HomeBridge/Kit support.

     

     

    Link to post
    Share on other sites
    • 1 month later...

    Can somebody send me wright proper file. In Github there were no changes since 5 months. 

    Thanks 

     

    I have such error:

     

    File "FibaroRingCam.py", line 51, in <module>

        subprocess.call(['ffmpeg', '-ss', '00:00:01', '-i',mypath + 'last_ding.mp4', '-vframes', '1', '-q:v', '2',mypath + 'last_ding.jpg', '-y'])

    NameError: global name 'mypath' is not defined

     

    Edited by Kamol_
    Link to post
    Share on other sites
  • Topic Author
  • @Kamol_ I uploaded my latest version to GitHub:

    Please login or register to see this link.

     

    You have to change:

    line 8, 21, 45, 50 and 51 with your own paths, as I have no time at the moment to make it nice.

     

    Enjoy.

     

    • Thanks 1
    Link to post
    Share on other sites

    Thank you so much for quick help.

     

    I tried do it myself yesterday - and it was nice (first) lesson of python. Now i can see solution so it is  even better then just sending solution .

    Thanks again

    Link to post
    Share on other sites
  • Topic Author
  • As I remember now, in the version uploaded is simple HomeKit support (via HomeBridge) with the Video-doorbell platform. So you get the camera image on your iPhone lockscreen (with a little delay).

    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...