Code Monkey home page Code Monkey logo

Comments (8)

DeliriousMetro avatar DeliriousMetro commented on August 15, 2024

So, this will be a bit long winded, but it works - also hosting images or videos in the /config/www/ folder is open to the public - I'd suggest using a randomised name for the files to prevent data leaks of your video footage if you want to send notifications of images and/or videos to your phone. I think pen testing directories might be able to display that file name and for data protection purposes you could be liable if there is footage of the public online (I am not legally sure, and this depends in your country).

Most people do host their server publicly and a better way of protecting your instance would be to have a OpenVPN server on your network and the OpenVPN client on devices you use with HA externally.

Front Motion Trigger Automation

In your configuration.yaml, you'll need to setup the camera feed for the live camera. This can be done with ffmpeg which will restream the m3u8 file to the relevant format HA can stream in. You may change the HTTPS to HTTP if you are not running your Hass.io server with a SSL certificate.

sensor:
  # Ring Feed
  - platform: ffmpeg
    name: Ring LAN ffmpeg
    input: http(s)://<HA Local IP>:3000/public/stream.m3u8

You will also need a sensor to determine if the add-on is enabled or not. I used the provided 'rest' sensor which is on the readme.md of this repo - use those instructions to get your [Long_Lived_Access_Token].

sensor:
  - platform: rest
    resource: "http(s)://<HA Local IP>:port/api/hassio/addons/xxxxxxxx_ringlivestream/info"
    verify_ssl: false # Keep this if you are using invalid certificates (e.g. on local IP address), you may remove this line if using external host with a valid certificate
    headers:
      Authorization: "Bearer [Long_Lived_Access_Token]"
      Content-Type: application/json
    name: ring_addon_state
    value_template: "{{value_json['data']['state']}}" 

Lastly, I use this shell command to copy files from my media folder to the public /config/www folder, I randomised this string just to try and hide the temporary video location but obviously this is poor practice - I am working on using a random entity instead but that's a WIP for now and this workaround is usable.

# Copy Ring to online tmp
shell_command:
  copy_ring_wan_folder: 'cp /media/ring-footage/frontcam_motion.mp4 /config/www/tmp/frontcam_motion_5WTmPE4b8tJLBhKVY2uLdtT2Q69QrTLG6wnMnAyQVCMu2dKQ3qXjfxRFB2Vyf7hjupTsSnaeH54tgaQF72db7XeKLm3MzKu75Tsd.mp4'

# Copy ring to archive folder
  copy_ring_archive_folder: 'cp /media/ring-footage/frontcam_motion.mp4 /media/ring-footage/video/frontcam_motion_$(date +"%Y%m%d-%H%M%S").mp4'

Lastly, we will need to provide access so that the ffmpeg component can access the /media folder where the video will be stored and the public /config/www folder for storing these in the /local/ folder. In the configuration.yaml, include this:

homeassistant:
  # Whitelist required for camera.snapshot and camera.record service to /tmp directory
  allowlist_external_dirs:
    - /config/www
    - /config/www/tmp
    - /media/ring-footage

Now this is my automation.yaml for recording within 15 seconds of activated motion. I used the Ring_MQTT addon as I found that more reliable than the included Hass.io Ring Integration for triggering a motion binary sensor. I did use the automation UI editor to achieve this, but I have pasted it below in YAML format for ease of copying.

My addon is named: 44c60309_ringlivestream you will be able to find your add-on name by going to the Ring Livestream addon page and checking the url endpoint.

I have setup the folder folders for managing ring captures.

  • /media/ring-footage (for storing the recent motion capture event)
  • /media/ring-footage/video (for storing video archives timestamped)
  • /media/ring-footage/image (for storing image archives timestamped)
  • /config/www/tmp (for hosting the recent motion capture on the public /local/ directory for using the screenshot and video in lovelace and for notifications)

In my case my procedure for recording is the following after being triggered by a motion event:

  1. Start this Ring Live Stream addon
  2. Delay the automation by 9 seconds (this is the amount of time it took for my addon to start and display the video feed, adjust this depending on how long your addon takes to display the live feed)
  3. Take a snapshot of the camera feed in my media folder and the public /config/www/ folder (which maps to http(s)://<HA Local IP>:port/local) - this overwrites the previous file on each capture
  4. Take another snapshot of the camera feed in my archive folder timestamped
  5. Send a notification to a notification group of Android devices with Home Assistant Companion installed (this will be different for iOS)
  6. Start to record the live camera feed for 15 seconds to the media folder
  7. Stop the live stream addon
  8. Run a command which will copy the video from my /media/ring-footage folder to the public /config/www folder
  9. Run a command which will copy the motion event video from my /media/ring-footage folder to the archive folder at /media/ring-footage/video
alias: Front Motion Notifier/Recorder
description: Records on Ring motion
trigger:
  - platform: state
    entity_id: binary_sensor.<<Name of Ring Device entity from Ring_MQTT>>_motion_mqtt
    to: 'on'
condition: []
action:
  - service: hassio.addon_start
    data:
      addon: 44c60309_ringlivestream
  - delay: '00:00:09'
  - service: camera.snapshot
    data:
      filename: /config/www/tmp/frontcam_motion.png
    entity_id: camera.ring_lan_ffmpeg
  - service: camera.snapshot
    data:
      filename: /media/ring-footage/frontcam_motion.jpg
    entity_id: camera.ring_lan_ffmpeg
  - service: camera.snapshot
    data:
      filename: >-
        /media/ring-footage/image/frontcam_motion_{{
        now().strftime("%Y%m%d-%H%M%S") }}.jpg
    entity_id: camera.ring_lan_ffmpeg
  - service: notify.mobile_app_mobileNotifierGrp
    data:
      message: "\U0001F6B6‍♂️ \U0001F6AA There is motion at your Front Door"
      data:
        image: /local/tmp/frontcam_motion.png
  - service: camera.record
    data:
      filename: /media/ring-footage/frontcam_motion.mp4
      duration: 15
    entity_id: camera.ring_lan_ffmpeg
  - delay: '00:00:17'
  - service: hassio.addon_stop
    data:
      addon: 44c60309_ringlivestream
  - service: shell_command.copy_ring_wan_folder
    data: {}
  - service: shell_command.copy_ring_archive_folder
    data: {}
mode: single

To sort out the notification support, install Home Assistant Companion on your Android device and you should find an entity that corresponds to that device in HA. You can include all the relevant devices under a group entity in the notify component in your configuration.yaml.

notify:
  - name: mobileNotifierGrp
    platform: group
    services:
      - service: mobile_app_p30

Bug fix (add-on stays open even after recording automation ends)

I did notice sometimes my Ring doorbell would be dead, to fix this I simply made another automation to stop the add-on after x seconds. This would be the total time it took to start the addon and the time it took to record.

alias: Front Motion Ring Process Stopper
description: ''
mode: single
trigger:
  - platform: state
    entity_id: sensor.ring_addon_state
    from: stopped
    to: started
condition: []
action:
  - delay: '00:00:26'
  - service: hassio.addon_stop
    data:
      addon: 44c60309_ringlivestream

Bug fix (Ring_MQTT sometimes does not detect motion but Ring app does)

I fixed this be restarting the add-on peridocally every night.

alias: Ring Addon (Daily Restart)
description: ''
trigger:
  - platform: time
    at: '23:59:00'
condition: []
action:
  - service: hassio.addon_restart
    data:
      addon: 03cabcc9_ring_mqtt
mode: single

Lovelace display camera

In my case, I display the last recorded motion when the add-on is off and the live motion when the add-on is on.

You won't be able to use a camera component for this. The ffmpeg component will stream the last motion mp4 file for how long that is and then will not display anything. To combat this, you can use an iframe but lovelace seems to cache the mp4 file so we will use a parameter in the url of the current date/time to ensure a new request is to be made to the location of the mp4 file.

You can create a new card with this configuration. For the last motion, you will see that the mp4 file will be cached by the browser, so I used a custom configuration to solve this (I tried disabling cache on Cloudflare, but it did not make a difference).

Within a vertical stack, I have one card for the last motion and another for the live stream. These are displayed on a condition when the add-on is enabled or disabled. You will need the custom:config-template-card installed via HACS or a lovelace resource which prevents the mp4 from being cached as I use the current time in the url to provide a new request.

Current Date and Time

To get the current date/time I used this sensor:

sensor:
  - platform: time_date
    display_options:
      - 'date_time_iso'

Vertical Stack - Card 1 (Last Motion)

type: conditional
conditions:
  - entity: sensor.ring_addon_state
    state: stopped
card:
  type: 'custom:config-template-card'
  card:
    type: iframe
    url: >-
      ${'/local/tmp/frontcam_motion_5WTmPE4b8tJLBhKVY2uLdtT2Q69QrTLG6wnMnAyQVCMu2dKQ3qXjfxRFB2Vyf7hjupTsSnaeH54tgaQF72db7XeKLm3MzKu75Tsd.mp4?v='+states['sensor.date_time_iso'].state}
    aspect_ratio: 56%
  entities:
    - sensor.date_time_iso

Vertical Stack - Card 2 (Live Motion)

I used some optional entities on the picture glance which you can change to whatever suits your needs.

type: conditional
conditions:
  - entity: sensor.ring_addon_state
    state_not: stopped
card:
  type: picture-glance
  title: Front Door
  image: '/local/tmp/frontcam_motion.png'
  entities:
    - entity: binary_sensor.front_door_ding_mqtt
      icon: 'mdi:doorbell'
    - entity: binary_sensor.front_door_motion_mqtt
      icon: 'mdi:walk'
    - entity: binary_sensor.front_door
    - entity: sensor.front_door_battery
  camera_image: camera.ring_lan_ffmpeg
  camera_view: live

Conclusions

The good

  • It records and takes screenshots of motion events just like Ring protect and it is stored locally on your machine.
  • As these are stored in the /media folder, you can browse these files under the HA Media Browser integration.

The bad

  • The motion you've recorded is delayed by a certain number of seconds, if you have a long drive or footpath - it will do for you, but these are not instant, and you will miss quick actions such as a courier hurrying to deliver a parcel for instance. Most of the time, this automation has captured a person.
  • If you do not have 'People Only' notifications enabled on Ring (as you do not have a Ring Protect plan), you will find that the free version of Ring motion detection will detect the slightest object, even when they are not in your customised motion zone. In my case, I have caught builders with cranes, cars and other objects which emit heat. These could be prevented in my case by using a wedge kit provided by Ring or using a different motion sensor to trigger this automation instead.

The ugly

  • With my Ring 2nd gen (2020 release), the battery would deplete after a week of usage and would require constant charging after a week.
  • After hard wiring the Ring to my 8v low voltage supply, the battery would charge about 5-7% every night and I have not needed to charge the doorbell anymore.

Non Hass.io ideas etc.

Finally, if you are running Hass.io unsupervised under Docker. You can use a docker container to rsync the HA/media/ring-footage folder to an external drive for backup - I imagine not everyone is using Plex and HA but this is a really good solution. I also use an HTTP server to the HA/media/ring-footage folder and have the last motion video linked to Xteve add-on IPTV list so that I can see a live channel on my Android TV devices with Plex or Tivimate/IPTV app.

Ext. drive syncing

To sort out external drive syncs, you can use this Docker container to sync two directories. I have my Hass.io unsupervised install located on my home directory at /home/user/DockerData/Hassio and my external drive mounted at /media/wdHDD2 using fstab on boot.

Using rsync is a one-way sync from HA to the external drive. It does not reverse sync from the external drive to HA.

docker run \
  -d \
  -v /home/user/DockerData/Hassio/media/ring-footage:/ha \
  -v /media/wdHDD2/RingFootage:/wdHDD2  \
  --name syncHomeAssistantRing  \
  allthings/lsyncd \
  -rsync /ha /wdHDD2

IPTV Playlist

As for hosting the IPTV playlist, I created a playlist folder on my external drive and included a simple m3u in the /media/ring-footage/playlist folder with the following contents and I included a Ring doorbell image for the two entries in the same folder.

This would mean the last motion recording can be seen anytime through the Last Motion channel and the Live Motion channel would only be possible when the add-on is enabled through the motion automation. Alternatively, you can use HA to trigger an automation which calls the cast media service to a specified device.


#EXTM3U

#EXTINF:-1 tvg-logo="http://<<Docker Machine Local IP>>:9999/m3u/front_door_small.png" group-title="Ring", Last Motion
http://<<Docker Machine Local IP>>:9999/frontcam_motion.mp4

#EXTINF:-1 tvg-logo="http://<<Docker Machine Local IP>>:9999/m3u/front_door_small_motion.png" group-title="Ring", Live Motion
http://<<Docker Machine Local IP>>:3000/public/stream.m3u8

I then installed a httpd web server in Docker using port 9999 (hoping this is not used) with the app template to quickly set this up. I used the advanced options to mount a binded volume from the default httpd folder of /usr/local/apache2/htdocs/ to /media/wdHDD2/RingFootage directory. The files should be visible under the http://<>:9999 url.

Now with Xteve, you can insert this stream using the m3u playlist file location with the http server like http://<>:9999/m3u/playlist.m3u

If you host your Xteve server externally (I hope you don't), you can enable restreaming via Xteve/ffmpeg/cvlc and combined with Xteve authentication - this can be seen outside your local network. This will get your server brute forced.

Obviously, anyone on your internal local network will see this port and are able to access your Ring files at port 9999! You should isolate this with a proxy to only allow certain devices on your local network to access it.

Screenshots

HA

Lovelace
Notification
File
Video
Archive

Xteve

Playlist

from ring-hassio.

johanvh83 avatar johanvh83 commented on August 15, 2024

Hi, DeliriousMetro many thanks for your detailed information.
I run HA on a VM with Debian. Took me many hours to setup the Ring Livestream integration and it finally works.
Next step is to automate the add-on. For the sensor setup I don't know how to complete the recourse line:

resource: "http(s)://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info"

I have an addons folder as a subfolder of my config folder but this one is empty and I guess this isn't the superviser addons folder. I use a samba share but I'm not able to find the ringlivestream repository.

Thanks for your help!

from ring-hassio.

DeliriousMetro avatar DeliriousMetro commented on August 15, 2024

Hi, DeliriousMetro many thanks for your detailed information.
I run HA on a VM with Debian. Took me many hours to setup the Ring Livestream integration and it finally works.
Next step is to automate the add-on. For the sensor setup I don't know how to complete the recourse line:

resource: "http(s)://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info"

I have an addons folder as a subfolder of my config folder but this one is empty and I guess this isn't the superviser addons folder. I use a samba share but I'm not able to find the ringlivestream repository.

Thanks for your help!

I think you are referring to the readme section of Battery Conservation.

Uh to get your unique addon identifier 'xxxxxxxx_ringlivestream', you need to go to your HA instance, open Supervisor and then click on your Ring Livestream addon. Then you would see the url at the top:

url-img

In my case it is: https://<HA HOST>/hassio/addon/44c60309_ringlivestream/info

So, the '44c60309' is the unique identifier you should use for creating the sensor for detecting if the add-on is enabled.

Now you will also need a Long_Lived_Access_Token, which you are able to generate at the bottom of the page in your user profile, https://hassio.local:port/profile

Now you can use the sensor template from the readme.md, where:

  • You would replace with either your host/ip address and xxxxxxxx_ringlivestream with the unique identifier you have found. http://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info
  • [Long_Lived_Access_Token] is the Long_Lived_Access_Token you have generated.
sensor:
  - platform: rest
    resource: "http://<HA Host>:port/api/hassio/addons/xxxxxxxx_ringlivestream/info"
    headers:
      Authorization: "Bearer [Long_Lived_Access_Token]"
      Content-Type: application/json
    name: ring_addon_state
    value_template: "{{value_json['data']['state']}}" 

This sensor would go under the sensor configuration in your configuration.yaml file which is under the /config folder in your HA directory.

The readme.md mentions the use of a switch template to start and stop the add-on which you may use if you find helpful - I use the call service of starting and stopping an addon for automating this.

Btw, I have used this add-on for over a month and a half. It is definitely not stable in any way - currently my addon may display video 1/10 times there is motion (before it used to be more like 8/10), I suspect Ring has limited my account in some way for too many requests. It is not for the beginner and if this is so you can stop using Ring Protect - it is not a viable solution as it is really hacky.

I think you might have got it working by now anyway 👍

Lastly, anyone who has issues with large snapshots - perform partial ones with the media folder excluded if you are using my automation and are not clearing it.

from ring-hassio.

johanvh83 avatar johanvh83 commented on August 15, 2024

from ring-hassio.

DeliriousMetro avatar DeliriousMetro commented on August 15, 2024

Thanks for your answer! I'v put this in my configuration.yaml: sensor: - platform: rest resource: https://homeassistant.local:8123/hassio/addon/44c60309_ringlivestream/info headers: Authorization: "Bearer TestTestTestLCJhbGciOiXXXXXXXXXXXXXXXXiOiJmN2M2OWQ3YWIyYzI0MWQ0YmU1ODE3NjIwN2IzYjI2YyIsImlhdCI6MTYxMTI0MjQ5MywiZXhwIjoxOTI2NjAyNDkzfQ.czxX-WUNsI8eJtbs2bxOoyGe-N5DOt6Zvj3OiIsdws8" Content-Type: application/json name: ring_addon_state value_template: "{{value_json['data']['state']}}" The complete URL was taken as 'resource' url. I suppose the token (scrambled above) must be mentioned as above without the brackets... Checked configuration and was OK. Restarted but in Developer Tools - States - there is no sensor with name 'ring_addon_state' or sensor.ring_... or binay.sensor.ring.... I created sensor with platform: template and those are selectable to check their state. Should the 'rest' sensor also be available to check the state? Thanks! Op do 21 jan. 2021 om 15:06 schreef DeliriousMetro <[email protected]

: Hi, DeliriousMetro many thanks for your detailed information. I run HA on a VM with Debian. Took me many hours to setup the Ring Livestream integration and it finally works. Next step is to automate the add-on. For the sensor setup I don't know how to complete the recourse line: resource: "http(s)://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info" I have an addons folder as a subfolder of my config folder but this one is empty and I guess this isn't the superviser addons folder. I use a samba share but I'm not able to find the ringlivestream repository. Thanks for your help! I think you are referring to the readme section of Battery Conservation https://github.com/jeroenterheerdt/ring-hassio#battery-conservation. Uh to get your unique addon identifier 'xxxxxxxx_ringlivestream', you need to go to your HA instance, open Supervisor and then click on your Ring Livestream addon. Then you would see the url at the top: [image: url-img] https://camo.githubusercontent.com/4342228cb49bfc40fb66caaf174269837f057c4a34ce8127876b4770c70c163c/68747470733a2f2f692e696d6775722e636f6d2f755042713367372e706e67 In my case it is: https:///hassio/addon/44c60309_ringlivestream/info So, the '44c60309' is the unique identifier you should use for creating the sensor for detecting if the add-on is enabled. Now you will also need a Long_Lived_Access_Token, which you are able to generate at the bottom of the page in your user profile, https://hassio.local:port/profile Now you can use the sensor template from the readme.md, where: - You would replace with either your host/ip address and xxxxxxxx_ringlivestream with the unique identifier you have found. http:// :port/api/hassio/addons/xxxxxxxx_ringlivestream/info - [Long_Lived_Access_Token] is the Long_Lived_Access_Token you have generated. sensor: - platform: rest resource: "http://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info" headers: Authorization: "Bearer [Long_Lived_Access_Token]" Content-Type: application/json name: ring_addon_state value_template: "{{value_json['data']['state']}}" This sensor would go under the sensor configuration in your configuration.yaml file which is under the /config folder in your HA directory. The readme.md mentions the use of a switch template to start and stop the add-on which you may use if you find helpful - I use the call service of starting and stopping an addon for automating this. Btw, I have used this add-on for over a month and a half. It is definitely not stable in any way - currently my addon may display video 1/10 times there is motion (before it used to be more like 8/10), I suspect Ring has limited my account in some way for too many requests. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#26 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJYCBSYQ535HWNBBBZ5KZDS3AYGXANCNFSM4S6HOFKA .

I have just check out my configuration and the only difference I am seeing is that I am using my external host address.

platform: rest
resource: "https://hostname.uk/api/hassio/addons/XXXXX_ringlivestream/info"
headers:
Authorization: "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Content-Type: application/json
name: ring_addon_state
value_template: "{{value_json['data']['state']}}"

Developer Tools shows the state as expected for me.

state

I will try to use postman and send a rest request to the endpoint with the authorization header. Maybe the Rest component only works for external hosts?

A successful request should look like:

postman

I have tried to send it to my local host via local IP address like yours and postman reports the usual SSL error.

Therefore, I think the issue to fix it for you is to set the verify_ssl boolean flag to false as it is by default true and this might fail when requesting via local means.

So try it out like this then :)

sensor:
  - platform: rest
    resource: "https://<HA Host>:port/api/hassio/addons/xxxxxxxx_ringlivestream/info"
    verify_ssl: false # Keep this if you are using invalid certificates (e.g. on local IP address), you may remove this line if using external host with a valid certificate
    headers:
      Authorization: "Bearer [Long_Lived_Access_Token]"
      Content-Type: application/json
    name: ring_addon_state
    value_template: "{{value_json['data']['state']}}" 

I will change the automation above to include a comment regarding local/external hosts and the use of verify_ssl: false - I have changed my set-up to connect locally now. Maybe that is why I had issues before with that sensor.

from ring-hassio.

johanvh83 avatar johanvh83 commented on August 15, 2024

from ring-hassio.

DeliriousMetro avatar DeliriousMetro commented on August 15, 2024

Thanks to check your configuration! I changed my resource to the external host address and restarted HA. Wow, now the sensor appeared: [image: Schermafbeelding 2021-01-21 om 19.03.28.png] Unfortunately the state always remains 'unknown', I started the add-on, checked the log, received some streams, checked lovelace and could see the stream. Waited even some minutes more and requested the sensor state but always 'unknown'... Anyway, I don't know why I followed blindly the 'tutorial' or the solution to solve the problem to avoid a low battery. I simply made an automation, when someone rings, I start the add-on for 3 minutes: - id: '1611253431100' alias: Ring Liveview active when someone rings description: '' trigger: - type: occupied platform: device device_id: 688c208f29ea9dd1a4da460d53f8f2c1 entity_id: binary_sensor.frontdoor_ding domain: binary_sensor for: hours: 0 minutes: 0 seconds: 1 condition: [] action: - service: hassio.addon_start data: addon: 44XXXX09_ringlivestream - delay: 03:00 - service: hassio.addon_stop data: addon: 44XXXX09_ringlivestream mode: single What's the benefit of the sensors state and switch? By the way, the livestream has a delay for about 10 seconds. Do you have the same? Op do 21 jan. 2021 om 18:12 schreef DeliriousMetro <[email protected]

: Thanks for your answer! I'v put this in my configuration.yaml: sensor: - platform: rest resource: https://homeassistant.local:8123/hassio/addon/44c60309_ringlivestream/info headers: Authorization: "Bearer TestTestTestLCJhbGciOiXXXXXXXXXXXXXXXXiOiJmN2M2OWQ3YWIyYzI0MWQ0YmU1ODE3NjIwN2IzYjI2YyIsImlhdCI6MTYxMTI0MjQ5MywiZXhwIjoxOTI2NjAyNDkzfQ.czxX-WUNsI8eJtbs2bxOoyGe-N5DOt6Zvj3OiIsdws8" Content-Type: application/json name: ring_addon_state value_template: "{{value_json['data']['state']}}" The complete URL was taken as 'resource' url. I suppose the token (scrambled above) must be mentioned as above without the brackets... Checked configuration and was OK. Restarted but in Developer Tools - States - there is no sensor with name 'ring_addon_state' or sensor.ring_... or binay.sensor.ring.... I created sensor with platform: template and those are selectable to check their state. Should the 'rest' sensor also be available to check the state? Thanks! Op do 21 jan. 2021 om 15:06 schreef DeliriousMetro @.*** … <#m_-7174036580926193520_> : Hi, DeliriousMetro many thanks for your detailed information. I run HA on a VM with Debian. Took me many hours to setup the Ring Livestream integration and it finally works. Next step is to automate the add-on. For the sensor setup I don't know how to complete the recourse line: resource: "http(s)://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info" I have an addons folder as a subfolder of my config folder but this one is empty and I guess this isn't the superviser addons folder. I use a samba share but I'm not able to find the ringlivestream repository. Thanks for your help! I think you are referring to the readme section of Battery Conservation https://github.com/jeroenterheerdt/ring-hassio#battery-conservation. Uh to get your unique addon identifier 'xxxxxxxx_ringlivestream', you need to go to your HA instance, open Supervisor and then click on your Ring Livestream addon. Then you would see the url at the top: [image: url-img] https://camo.githubusercontent.com/4342228cb49bfc40fb66caaf174269837f057c4a34ce8127876b4770c70c163c/68747470733a2f2f692e696d6775722e636f6d2f755042713367372e706e67 In my case it is: https:///hassio/addon/44c60309_ringlivestream/info So, the '44c60309' is the unique identifier you should use for creating the sensor for detecting if the add-on is enabled. Now you will also need a Long_Lived_Access_Token, which you are able to generate at the bottom of the page in your user profile, https://hassio.local:port/profile Now you can use the sensor template from the readme.md, where: - You would replace with either your host/ip address and xxxxxxxx_ringlivestream with the unique identifier you have found. http:// :port/api/hassio/addons/xxxxxxxx_ringlivestream/info - [Long_Lived_Access_Token] is the Long_Lived_Access_Token you have generated. sensor: - platform: rest resource: "http://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info" headers: Authorization: "Bearer [Long_Lived_Access_Token]" Content-Type: application/json name: ring_addon_state value_template: "{{value_json['data']['state']}}" This sensor would go under the sensor configuration in your configuration.yaml file which is under the /config folder in your HA directory. The readme.md mentions the use of a switch template to start and stop the add-on which you may use if you find helpful - I use the call service of starting and stopping an addon for automating this. Btw, I have used this add-on for over a month and a half. It is definitely not stable in any way - currently my addon may display video 1/10 times there is motion (before it used to be more like 8/10), I suspect Ring has limited my account in some way for too many requests. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#26 (comment) <#26 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJYCBSYQ535HWNBBBZ5KZDS3AYGXANCNFSM4S6HOFKA . I have just check out my configuration and the only difference I am seeing is that I am using my external host address. platform: rest resource: "https://hostname.uk/api/hassio/addons/XXXXX_ringlivestream/info " headers: Authorization: "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Content-Type: application/json name: ring_addon_state value_template: "{{value_json['data']['state']}}" Developer Tools shows the state as expected for me. [image: state] https://camo.githubusercontent.com/9883478be4cfb5afce302ae4fb561adb170a9568f0956e0038cb2f0540ab4f01/68747470733a2f2f692e696d6775722e636f6d2f456e7245614d4b2e706e67 I will try to use postman and send a rest request to the endpoint with the authorization header. Maybe the Rest component only works for external hosts? A successful request should look like: [image: postman] https://camo.githubusercontent.com/6cfd38ec3f42ed98dbb284216390658cce88fef978d04e204555bf50f8181747/68747470733a2f2f692e696d6775722e636f6d2f544459614355522e706e67 I have tried to send it to my local host via local IP address like yours and postman reports the usual SSL error. Therefore, I think the issue to fix it for you is to set the verify_ssl boolean flag to false as it is by default true https://www.home-assistant.io/integrations/rest/#verify_ssl and this might fail when requesting via local means. So try it out like this then :) sensor: - platform: rest resource: "http://:port/api/hassio/addons/xxxxxxxx_ringlivestream/info" verify_ssl: false headers: Authorization: "Bearer [Long_Lived_Access_Token]" Content-Type: application/json name: ring_addon_state value_template: "{{value_json['data']['state']}}" — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#26 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJYCBQPQNWKUICN5G4DYADS3BN6RANCNFSM4S6HOFKA .

I am not sure why it is unknown. The only thing is to double check the add-on slug identifier is correct from the xxxxxxxx_ringlivestream.

If you can ssh to the Hass.io instance, you may try ha logs to determine if the addon identifier is the correct slug name for the xxxxxx part of xxxxxxxx_ringlivestream.

Lastly, maybe you can try to generate a different Long-Lived Access Token and see if it might work? I can't be sure tbh unless you run a HTTP request application like postman and send the authorisation bearer to the url endpoint and see the response you get.

You can try to use an internal host just use verify_ssl: false when doing so.

As for the live stream, yes it takes about 9 seconds on my machine to display as well - it is not instant. You can time the program on how long it takes to have the m3u8 stream open after starting the add-on and it is about 10 seconds. I did talk about it in my automation post above, you miss events that are quick (e.g. courier leaving parcels).

from ring-hassio.

Jens-Wymeersch avatar Jens-Wymeersch commented on August 15, 2024

@DeliriousMetro @johanvh83 before I embark into this journey. I have a few questions :

  • were you able to add more then 1 camera ?
  • I'm not looking to save the videos. Just want to get a pane of glass of my different cameras with snap shots triggered by motion.

from ring-hassio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.