File Sharing From Hassio/HassOS on Pi: Is It Possible? (For Getting Ring Cameras Into HomeKit)

Hi everyone,

I’m completely stuck on the last step of finalizing a solution for getting video from my Ring Doorbell Pro and Ring Floodlight into HomeKit using:

Home Assistant [Hassio / Pi 3b+] :arrow_right: HomeBridge [different Pi 3b+ w/ Raspian Stretch] :arrow_right: HomeKit

For those who are familiar with Ring cameras, there’s no RTSP feed.

However, with Hassio’s Ring: and Camera: components, I’m retrieving the most recent motion-activated video from each camera in HA.

I’m also using the Downloader: component to store those videos on my Pi running Hassio (e.g. file path: /config/downloads/entrance/latest.mpg).

Now all I need to do is to be able to serve those latest.mpg video files to my other Pi running HomeBridge (also on the same local network) to get everything to show in HomeKit.

Does anyone have any suggestions for how to do this with a Hassio on HassOS on Pi setup?

Can I NFS mount the directory on my Hassio Pi with the folders containing my latest.mpg video files directly onto my other HomeBridge Pi? How would that be done in HassOS?

If not, is there any other method for being able to reference those latest.mpg video files (living on my Hassio Pi) on my other Pi running HomeBridge (on Raspian Stretch)?

Thanks SO MUCH for any help you can provide!

Automate SFTP/SCP from the other pi

@flamingm0e, thanks for taking a look at this one.

Which Pi is the “other pi”—the Pi with HomeBridge running Raspian Stretch?

If so, are you suggesting I set up an SFTP/SCP server on the HomeBridge/Raspian Pi and then point the download directory of the Download: component on the Hassio Pi to there?

Yes. That’s probably what I’d do

If you install the Samba add-on, then you have file sharing built in…

@dap35, I’ve never played with Samba, but will that work for Pi 2 Pi sharing?

Always thought Samba was a file server for Windows clients only. (But again, I barely know anything about it.)

Is that not the case?

Linux, MacOS, and Windows clients can all access Samba shares.

Well then… that seems like it might be my solution!

Gonna go play with that now.

Thanks, @dap35!!

The Samba add-on exposes the config folder (along with several other folders) as shares.

@dap35, what path should I use for /config/downloads/ on my Hassio Pi (w/ Samba running) in order to mount it as a shared folder on my HomeBridge / Raspian Pi?

On the HomeBridge / Raspian Pi, would this work to mount it: sudo mount.cifs //http://hassio.local:8123/config/downloads/ /home/pi/.homebridge/cameras/ -o user=<name>

(And if so, do I also need my Samba password in there too?)

Am I way off here?

Could I just point directly to my my Hassio Pi’s /config/downloads/entrance/latest.mpg file (with the right host/IP and path) from within my config.json file in the HomeBridge Pi?

Actually, think I’m close to having the Hassio Samba Add-On working to:

  1. Grab the most recent motion-activated videos from my Ring cameras

  2. Download them in HA to my Pi

  3. Use Samba to expose that download folder to my whole local network, allowing those video files to be accessed by my separate HomeBridge Pi running Raspian Stretch.

  4. Finally get video from my Ring cams into Hassio!

Added a /www/ folder to my /config/ folder for the Samba share. Also, I’m now pointing HA’s Download: component to that new /www/ folder that I added to the /config/ folder.

I’m so close that I think I can taste it… and it’s tasting sweet.

EDIT: After an HA restart, Samba is serving up what’s in that /www/ folder locally via http://hassio.local:8123/local/. Using this, I’m able to now access the Ring vids stored on my Hassio Pi from my other HomeBridge/Raspian Pi. Andddddd I’m finally getting dynamic videos for my Ring cams in HomeKit! Thanks so much for the help!!