Ring Device integration via MQTT w/ Video Streaming

Thanks for the reply @tsightler , I don’t think I will run it through Frigate. I really just want to save the JPG snapshots that I generate every 30 seconds to a folder. So I will have to work out a way to make that into an automation…

Should be easy, a simple automation that triggers on changes of the snapshot timestamp attribute and calls the camera.snapshot service is all that’s really needed (crude example)

alias: Save Front Porch Snapshots
description: ''
trigger:
  - platform: state
    entity_id: camera.front_porch_snapshot
    attribute: timestamp
condition: []
action:
  - service: camera.snapshot
    target:
      entity_id: camera.front_porch_snapshot
    data:
      filename: /media/front_porch/{{ now().strftime( '%Y%m%dT%H%M%S.jpg' ) }}
mode: single

If you wanted to only capture during motion or during a specific timezone you can just add that as a condition. Good luck!

I really don’t know how to help you any more. You say you read the FAQ, but still asked the question, did you expect a different answer here? It makes no sense.

How would I be able to experience that, if I have the livestream piping data via ring-mqtt?
I would not want to use HA as a way to get the live stream, while switch to RingApp if I realise there is the postman at the door.

Experience what? HA doesn’t support two way audio, so you’d have to switch to the Ring app to do that anyway. You can still receive motion alerts as long as a stream is not active in HA, so just don’t setup HA to stream 24x7 and you can use it.

Thanks so much @tsightler , I will give it a go

@tsightler Thanks for your ring-mqtt app. It was working fine for a couple of weeks until I rebooted my docker today. After which I keep getting the following error so I can’t access my RTSP stream anymore. I has configured it to stream to my Synology Surveillance Station and it was working fine until today. I updated to your latest build and the issue is still happening and created a new docker image without avail.

The below keeps repeating

ring-rtsp I [0/0] [RTSP] [conn 192.168.1.68:42906] opened +101ms
ring-rtsp I [0/0] [RTSP] [conn 192.168.1.68:42906] ERR: invalid URL (/54e019c6f241_live) +1
ring-rtsp I [0/0] [RTSP] [conn 192.168.1.68:42906] closed +0ms
ring-rtsp I [0/0] [RTSP] [conn 192.168.1.68:42908] opened +185ms
ring-rtsp I [0/0] [RTSP] [conn 192.168.1.68:42908] ERR: no one is publishing to path ‘54e019c6f241_live’ +1ms

My settings are:

{
“cmd” : “”,
“cpu_priority” : 50,
“enable_publish_all_ports” : false,
“enable_restart_policy” : true,
“enabled” : false,
“entrypoint_default” : “/init”,
“env_variables” : [
{
“key” : “SNAPSHOTMODE”,
“value” : “all”
},
{
“key” : “ENABLECAMERAS”,
“value” : “true”
},
{
“key” : “MQTTHOST”,
“value” : “192.168.1.212”
},
{
“key” : “LIVESTREAMPASSWORD”,
“value” : “”
},
{
“key” : “LIVESTREAMUSER”,
“value” : “”
},
{
“key” : “RINGTOKEN”,
“value” : “REMOVED for this Post”
},
{
“key” : “PATH”,
“value” : “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”
},
{
“key” : “LANG”,
“value” : “C.UTF-8”
},
{
“key” : “PS1”,
“value” : "$(whoami)@$(hostname):$(pwd)$ "
},
{
“key” : “S6_BEHAVIOUR_IF_STAGE2_FAILS”,
“value” : “2”
},
{
“key” : “S6_CMD_WAIT_FOR_SERVICES”,
“value” : “1”
},
{
“key” : “TERM”,
“value” : “xterm-256color”
}
],
“exporting” : false,
“id” : “15104e570c3eaeb781b0aba6110591d609835b3b3074980d4531a31e69bd7780”,
“image” : “tsightler/ring-mqtt:latest”,
“is_ddsm” : false,
“is_package” : false,
“links” : [],
“memory_limit” : 0,
“name” : “tsightler-ring-mqtt1”,
“network” : [
{
“driver” : “bridge”,
“name” : “bridge”
}
],
“network_mode” : “bridge”,
“port_bindings” : [
{
“container_port” : 8554,
“host_port” : 8554,
“type” : “tcp”
}
],
“privileged” : false,
“shortcut” : {
“enable_shortcut” : false,
“enable_status_page” : false,
“enable_web_page” : false,
“web_page_url” : “”
},
“use_host_network” : false,
“volume_bindings” : []
}

Hope you can help me ping point what is going on thanks!

First off appreciate your contribution.
I would like to integrate this for my docker based home assistant and I saw this in the instructions:

If you are running Home Assistant Core via Docker or manual install into a Python virtual environment then there is no support for the addon store but you can still run the ring-mqtt project directly to get the same capabilities.

I’m not sure how I would get the same capabilities without the addon. Do I need to set up something manually under home assistant? I’m thinking that there must be something that the addon is doing that will need to be done manually when using home assistant core unless all the addon is doing is to run the script manually.
Second question: I have MQTT running with TLS enabled in insecure mode to have the data encrypted and I could not find anything in the instructions page on how to specify the keys and the option for insecure mode. Can you point me to the right place for those instructions?
BTW, I am trying to follow instructions from Githug page.
Thanks.

@Andrew_Mak & @xraken

I don’t offer technical support in this thread. Please feel free to open an issue on the Github project page and I will attempt to assist you there.

Is anyone using a battery camera that has been hardwired? Since running this addon my battery level has been sitting around 2-6%. I’ve turned off the constant snapshot automation that @tsightler helped with, but, so far no real change in battery…

Is anyone successfully running ring-mqtt with zwavejs2mqtt? I am running them as two docker containers, and no matter what i cannot get them to connect to each other. My docker-compose file is as follows:

# *****************************************************************************************
# ***                               ZWAVEJSMQTT                                         ***
# *****************************************************************************************
    
  zwavejs2mqtt:
    container_name: zwavejs2mqtt
    image: zwavejs/zwavejs2mqtt:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    environment:
      - SESSION_SECRET=mysupersecretkey
      # Uncomment if you want logs time and dates to match your timezone instead of UTC
      # Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      - TZ=America/Chicago
    networks:
      - zwave
    devices:
      # Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
      # Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
      - '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
    volumes:
      - zwave-config:/usr/src/app/store
    ports:
      - '8091:8091' # port for web interface
      - '3000:3000' # port for Z-Wave JS websocket server

    
# *****************************************************************************************
# ***                               RING2MQTT                                           ***
# *****************************************************************************************
  ring-mqtt:
    container_name: ring-mqtt
    restart: unless-stopped
    image: tsightler/ring-mqtt
    networks:
      - zwave
    ports:
      - 8554:8554                      # Enable RTSP port for external media player access
    volumes:
      - /home/jim/Docker_Config/ring-mqtt           # Mapping of local folder to provide persistant storage
    environment:                       
      - RINGTOKEN=<my token>
      - MQTTHOST=zwavejs2mqtt       # Hostname or IP of MQTT Broker
      - MQTTPORT=1883                    # TCP port for MQTT Broker
      # - MQTTUSER=                          # Username for MQTT Broker (remove for anonymous)
      # - MQTTPASSWORD=               # Password for MQTT Broker (remove for anonymous)
      - ENABLECAMERAS=true             # Enable camera support
      - SNAPSHOTMODE=all                # Snapshot options (see: https://github.com/tsightler/ring-mqtt#snapshot-options)
      #- LIVESTREAMUSER=stream_user     # CHANGE ME -- Highly recommended if RTSP server is exposed
      #- LIVESTREAMPASSWORD=stream_pass # CHANGE ME -- Highly recommended if RTSP server is exposed
    logging:                           #limit logs to 10m and 3 files
      options:
        max-size: 10m
        max-file: "3"

networks:
  zwave:
volumes:
  zwave-config:
    name: zwave-config
1 Like

Why would you want the 2 containers to connect? Both should connect to your mqtt server instead.

Yeah… I’m an idiot. Somehow I completely forgot that zwavejs2mqtt isn’t a broker, still needs something like mosquito. Anyways, ignore me. Thanks.

The livestream is working, but when I toogle it off, it turns itself back on again after about 1 min. When I set it up I did not experience that behaviour. All automations using the camera service is turned off. Setting longer snapshot interval did not help

Any ideas? I am not currently getting any motion detection since the camera is always live.

image

Edit: restarting HA seems to solve the issue. I think when opening the stream from a picture glance that the switch never gets turned off again.

EDIT EDIT: Yes, indeed. When opening stream from picture glance card the stream never stops even if I close the app. If I turn the live stream switch off myself it will just turn on again. Doing it from an automation seems to work.

UPDATE - THE BELOW ISSUE SEEMS TO BE RELATED TO SETTING A USER NAME AND PASSWORD. ONCE REMOVED, I CAN SEE THE STREAM. SO SEEMS TO BE ISOLATED THAT SETTING

Hi All,

Great add on. I’m new to HA and getting this integration up and running has greatly increased the functionality of my system. Thank you so much for all your efforts here.

I run HA on a Synology NAS in a container and this has been running flawlessly for me for weeks. SSL is enabled. I’ve recently tried to reconfigure to enable camera support. I’d like to have a live stream of the camera play on my TV on ring press.

I’ve added the camera successfully but when I attempt to access the live stream, I just get the loading circle spinning with no video ever appearing.

I’ve read this entire thread and am sure I missed something or misconfigured a setting. Below is my docker-compose settings. I also tried to play the rtsp stream via VLC and have pasted the error message further below. My local network starts with 192…so the URL starting with 172. seems odd, but I do recall you mentioning that the stream goes to Ring servers first then comes back, so maybe that is normal.

I really hate to disturb you with the question…I just can’t seem to figure it out on my own. Any clues of where to look are words of advice would be greatly appreciated.

Thanks,

John

DOCKER COMPOSE:
services:
ring-mqtt:
restart: unless-stopped
ports:
- 8554:8554
environment:
- MQTTHOST=192.168.4.50
- MQTTPORT=1883
- MQTTUSER=hass
- MQTTPASSWORD=[REMOVED]
- RINGTOKEN=[REMOVED]
- ENABLEMODES=true
- ENABLEVOLUME=true
- ENABLECAMERAS=true
- LIVESTREAMUSER=
- LIVESTREAMPASSWORD=
- RINGLOCATIONIDS=
- DEBUG=ring-mqtt
image: tsightler/ring-mqtt
volumes:
- /volume1/docker/ring-mqtt:/data

VLC ERROR

live555 debug: connection timeout

live555 error: Failed to connect with rtsp://172.18.0.2:8554/3ce1a15fc648_live

main debug: no access_demux modules matched

main debug: creating access: rtsp://172.18.0.2:8554/3ce1a15fc648_live

main debug: (path: \172.18.0.2:8554\3ce1a15fc648_live)

main debug: looking for access module matching “rtsp”: 27 candidates

satip debug: try to open ‘rtsp://172.18.0.2:8554/3ce1a15fc648_live’

satip debug: connect to host ‘172.18.0.2’

main debug: net: connecting to 172.18.0.2 port 8554

main warning: connection timed out

satip error: Failed to connect to RTSP server 172.18.0.2:8554

main debug: net: connecting to 172.18.0.2 port 8554

main warning: connection timed out

access_realrtsp error: cannot connect to 172.18.0.2:8554

access_realrtsp debug: could not connect to: 172.18.0.2:8554/3ce1a15fc648_live

main debug: no access modules matched

main debug: dead input

Hi experts, I am a brand new HA user who got into this just a few days back. Using HA OS in a VM. I have a ring doorbell and wanted to integrate it with HA as the first project. I first installed Moquitto MQTT and configured it. Then integrated ring through HA->configuration->Add Integration (thought that this is needed for MQTT w/Video Streaming). Gone through the 2FA. Then through Supervisor->Add-onStore installed Ring-MQTT with Video Streaming. Now when I click overview in Lovelace I see the ring bell attributes like last ding, last motion, Volume, Wifi signal strength showing up. Under Binary Sensor, I see Ring-MQTT with video streaming running. Under Sensor, I see Ring-MQTT with video streaming running. Well, I don’t know how to get the image or video on the UI. I think I need to create a video/image card to display it? Is it right? Also, where would I get the URL for the ring doorbell camera video/camera. Is there a step-by-step guide to integrate the ring doorbell I am missing? Again I am very ignorant as I am learning HA and very interested, so please bear with me if I’ve asked any stupid or obvious questions. Also, do I need both ring integration and ring-mqtt live stream add-on to have the live stream in the UI? Thank you

You have to make a camera entry in config.yaml

Thanks @PapaLanc PapaLanc, again an ignorant question, is the camera_id the MAC ID or IP address for camera. If not both then how to find out.

I do not know LOL. I thought I did as the first time I made a card it worked, but never again.
I “think” what you do is look at the ring log and find your camera(s)

2021-11-29T14:09:05.118Z ring-mqtt [Big Room] ring/9dxx4b25-139b-4511-8848-352dxxb0e84/camera/54e0xxx74e26/stream/state ON

put the last group of stuff before/camera before -ring and the stuff after camera last

Stream Source:   rtsp://352dxxb0e84-ring-mqtt:8554/54e0xxx74e26_live

If you search devices for cameras you should find it

all that said it is not working for me now

I cannot telnet to 8554 when live stream is on ??
at the bottom of the ring config page there is a place to enable 8554

Thank you @PapaLanc . I will try tonight and update here.

Hello,
I recently set up the integration and everything is working flawlessly except for one issue that I can’t figure out. When the alarm is triggered, if any other ring security device changes its state besides the device that triggered the alarm in the first place, the home assistant alarm state is set back to armed instead of continuing to be triggered. I looked at the logs for the integration and I see that when these other devices change their states, for some reason an all clear is sent and the alarm is told to go to armed. The ring alarm itself continues to be active and the siren also continues to go off.

Thanks finally got the Live stream to work. But it works only when I click the icon in the UI. The live stream opens in a separate window. How to get the live stream in the UI directly.