tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
600 stars 106 forks source link

Not seeing location mode entity after turning on enable_mode #689

Closed lambros414 closed 1 year ago

lambros414 commented 1 year ago

Describe the Bug

After installing ring-matt and turning on enable_mode in its configuration, not seeing any entities regarding location or home mode with any cameras

Steps to Reproduce

I have installed ring-mqtt, and other entities are working. when I turn on enable_mode in the configuration tool, I am not seeing a location entity for any of my cameras

Expected Behavior

I would expect that you would see an entity for each camera called location mode that would allow you to pick a mode such as Home, Away, Off, etc, similar to the event_select or snapshot mode.

Log Output

When I try to include the output of ring-mqtt.log in this window, I get an error message the the comment is too long.  I have the compressed file (as in gz) but can't find a way to include in this box.  I could not find a way to upload the gz file.  Please let me know how to do so, and I will supply

Screenshots

I had turned on the enable modes option when configuring the add-on:

Screenshot 2023-07-27 at 12 41 20 PM

When going to mqtt entities and look at any of my ring cameras, the location mode isn't present:

Screenshot 2023-07-27 at 12 41 58 PM

Config File

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

http:

# two lines below are used when using duckdns
# ssl_certificate:  /ssl/fullchain.pem
#  ssl_key: /ssl/privkey.pem

homeassistant:
  name: Home
  latitude: xxxxx
  longitude: xxxxx
  elevation: xxx
\
  internal_url: http://xxx

#overwrite home zone - gives ability to change radius of home zone
zone:
  - name: Home
    latitude: xxx
    longitude: xxx
    radius: 100
    icon: mdi:home

api:
alexa:
  smart_home:

ssdp:

python_script:

# Alarm control panel entry
alarm_control_panel:
  - platform: manual
    name: Home Alarm
    code: 'xxxx'
    code_arm_required: true
    arming_time: 30 # The time of the 'arming' state before effecting a state change
    delay_time: 30 # The time of the 'pending' state before triggering the alarm
    trigger_time: 120 # The time of the 'trigger' state in which the alarm is firing
    disarm_after_trigger: false
    disarmed:
      trigger_time: 0
    armed_home:
      arming_time: 0
      delay_time: 0

image_upload:

# Text to speech
tts:
  - platform: google_translate
  - platform: amazon_polly
    aws_access_key_id: xxx
    aws_secret_access_key: xxx

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

frontend:
  themes: !include_dir_merge_named themes

Install Type

Home Asssistant Add-on

Version

v5.5.1

Operating System

Home Assistant OS

Architecture

rpi-4-64

Machine Details

Raspberry PI

tsightler commented 1 year ago

When going to mqtt entities and look at any of my ring cameras, the location mode isn't present:

As stated in the discussion thread, this is not where modes would appear. There will be a new device that appears as an alarm control panel where you can view and set modes.

You can either attach logs here, or you can send them to my email, same username as here at Gmail.

lambros414 commented 1 year ago

I have fount that alarm panel entity now, and when I switch it, it changes the mode in ring for me... so it works. The entity was created with a fairly odd name, and had missed it. I originally opened this up in the discussion group to see if I had done something wrong. I had searched other discussion groups, and had missed the comment about it showing up as a control panel entity. I apologize for any time spend on this, and thanks for your help

tsightler commented 1 year ago

Out of curiosity, can you describe what you mean by "fairly odd name"? I would expect it to be " Mode", where is the name of the location as configured in the Ring app.

lambros414 commented 1 year ago

It was fairy odd because I didn’t know what I was looking for. It created it just as you outline…. Mode. It worked as it was designed, just a user ignorance error on my side.

Thank you.

Since I got your attention here, possibly you can help clarify something else on your add-on. In the past, I went through hours trying to get live streaming to work, with no success. It was fairly early on in my home assistant tenure, so was still learning things, so that may have explained things.. I went through all of your recommendations in your Video Streaming document. I may try it again, but one thing that I may have missed before that I am seeing now…. Once adding your add-on, a “live stream” switch is created for each camera. I possibly missed it earlier, but if all is set up properly, does that switch need to be turned on for you to get live streaming with the Live Stream: rtsp:///_live to work?

If the above is too much to unravel don’t worry, I’ll be researching more again to see how to get it to work, but in a nutshell, I am not certain what that “Live Stream” switch is for.

Thanks again for the help on the location modes.

Cheers,

Chuck Lambros

On Jul 27, 2023, at 4:23 PM, tsightler @.***> wrote:

Out of curiosity, can you describe what you mean by "fairly odd name"? I would expect it to be " Mode", where is the name of the location as configured in the Ring app.

— Reply to this email directly, view it on GitHub https://github.com/tsightler/ring-mqtt/issues/689#issuecomment-1654518737, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVOMJ3P5EQZC6WHHX2WKXTXSLE5HANCNFSM6AAAAAA22Q4Z5E. You are receiving this because you modified the open/close state.

tsightler commented 1 year ago

The switch is primarily intended as an indicator as to whether a stream is active or not. It will automatically turn on whenever any client is viewing the stream via the local RTSP server and turn off when there are no active clients.

However, there is one use case for toggling the switch manually. Since any time a user views a stream on a Ring camera it automatically creates a recording, you can use this switch to trigger a recording from an automation. For example, maybe you have a non-Ring camera or motion sensor that you want to use to trigger a recording, you can use an automation to toggle the stream on, leave it on for however many seconds, and then turn it off, and you will get a recording of that event on the Ring servers that you can download (assuming a paid Ring subscription).

Basically, if you manually toggle the stream "on" but there are no active consumers of the stream, it will manually start a local ffmpeg process to act as a client and keep the stream alive until the switch is manually toggled off or ffmpeg exits due to timeout, etc.

It can also be really useful for troubleshooting since, if a user is having a problem streaming to an external client, I can just have them toggle this switch and it will start that local ffmpeg client which still triggers the same streaming process on the backend, but doesn't require any ports or anything else to be properly configured.

The two most common issues for streaming not working are firewalls blocking dynamic UDP ports, an, probably more commonly, poor connections causing startup times to be too high. The Ring clients use WebRTC which is pretty tolerant of startup delays, but RTSP requires a stream to start within 5 seconds or it will timeout and disconnect and a lot of people with battery cameras on 2.4Ghz Wifi that isn't super strong really struggle to meet that requirement.

But streaming has become pretty relaible at this point, most issues seem to be environmental as, over the last year, ever user that had a problem and was willing to share their camera with me did work for my case, but not on their network. Various issues from replacing a network switch, to changing DNS or firewall settings eventually resolved the issue, not code changes.

lambros414 commented 1 year ago

Hi. I appreciate your help earlier, and please tell me if I am taking advantage of you by reaching out directly vs putting something on the chat…. I am revisiting adding live view as your add-on will allow. I am trying to find the device ID to be used for Live Stream: Live Stream: rtsp:///_live In your Video streaming documentation you state..

Once you have the correct stream source and still image URLs then configuration is just a matter of adding a Generic Camera device and providing the required information to the configuration wizard. General steps are as follows: • From the Home Assistant Devices list select the Camera to be added • Select the Info sensor and, on the pop-up window click the Control icon in the upper right corner • Click Attributes to expand the available attribute properties • Copy the Stream Source and Still Image URL values to a temporary location I don’t think I am understanding how to get the Stream Source properly. Specifically in step 2, I am having difficulties actually finding the attributes.

I have been trying to find what I need to select and show the proper pop-up to get the id, but to no avail.

When I perform Step 1, I get this….

I possibly am misunderstanding the next step, but I click on the first item under the Sensor box (Back Yard Ring Camera).

The pop-up I get is:

I then click on the gear on the top…. Assuming it is what you mean by control icon. (I think I am wrong here though, as I would think it would be the configuration icon) and get….

I don’t see an Attributes option here to click as outlined in step 3.

I am sure I am going down a wrong path, and haven’t successfully found anything online or in your document that can clear it out.

Is there a place I can go to see an example of how someone gets the camera ID?

Lastly, if I do get it, I am I correct in this case the my

rtsp:///_live id would be something like:

rtsp://homeassistant.local:8123/_live? rtsp://homeassistant.local:8123/%3Ccamera_id%3E_live?

Sorry again if I should have found this information elsewhere, but I have been excited to add live stream into my dashboards for some time.

Any help would be greatly appreciated.

Cheers,

Chuck Lambros

On Jul 27, 2023, at 5:52 PM, tsightler @.***> wrote:

The switch is primarily intended as an indicator as to whether a stream is active or not. It will automatically turn on whenever any client is viewing the stream via the local RTSP server and turn off when there are no active clients. However, there is one use case for toggling the switch manually. Since any time a user views a stream on a Ring camera it automatically creates a recording, you can use this switch to trigger a recording from an automation. For example, maybe you have a non-Ring camera or motion sensor that you want to use to trigger a recording, you can use an automation to toggle the stream on, leave it on for however many seconds, and then turn it off, and you will get a recording of that event on the Ring servers that you can download (assuming a paid Ring subscription). Basically, if you manually toggle the stream "on" but there are no active consumers of the stream, it will manually start a local ffmpeg process to act as a client and keep the stream alive until the switch is manually toggled off or ffmpeg exits due to timeout, etc. It can also be really useful for troubleshooting since, if a user is having a problem streaming to an external client, I can just have them toggle this switch and it will start that local ffmpeg client which still triggers the same streaming process on the backend, but doesn't require any ports or anything else to be properly configured. The two most common issues for streaming not working are firewalls blocking dynamic UDP ports, an, probably more commonly, poor connections causing startup times to be too high. The Ring clients use WebRTC which is pretty tolerant of startup delays, but RTSP requires a stream to start within 5 seconds or it will timeout and disconnect and a lot of people with battery cameras on 2.4Ghz Wifi that isn't super strong really struggle to meet that requirement. But streaming has become pretty relaible at this point, most issues seem to be environmental as, over the last year, ever user that had a problem and was willing to share their camera with me did work for my case, but not on their network. Various issues from replacing a network switch, to changing DNS or firewall settings eventually resolved the issue, not code changes. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

tsightler commented 1 year ago

The problem with creating detailed instructions is that details have a tendency to change over time. HA constantly changes UI elements here and there so the steps have probably changed slightly. I'll you need to do is open the Info sensor and expand the attributes, they should be right there.

The RTSP URL will not point to the HA instance web UI. RTSP is it's own protocol and will point to the RTSP running in the addon/container. When using the addon it will be something like:

rtsp://03cabcc9-ring-mqtt:8554/_live

The still image URL, which is also important, will point to the HA web UI,.

lambros414 commented 1 year ago

I agree that the UI is changing constantly…mostly for the better, but it does make finding things hard.

I’m so sorry, and again, maybe being dense on my side. I am not finding any entities in for my doorbells/cameras called “info sensor”. I have open every entity for the camera. The Motion sensor is the only thing in the list of entities that has attributes which I can expand…. Shown below:

It doesn’t have any pertinent information…

I don’t know where to find the info sensor you are speaking of so I can expand the attributes.

Again, sorry for any misunderstanding on my side

Best,,

Chuck Lambros

On Jul 29, 2023, at 10:57 AM, tsightler @.***> wrote:

The problem with creating detailed instructions is that details have a tendency to change over time. HA constantly changes UI elements here and there so the steps have probably changed slightly. I'll you need to do is open the Info sensor and expand the attributes, they should be right there.

The RTSP URL will not point to the HA instance web UI. RTSP is it's own protocol and will point to the RTSP running in the addon/container. When using the addon it will be something like:

rtsp://03cabcc9-ring-mqtt:8554/_live

The still image URL, which is also important, will point to the HA web UI,.

— Reply to this email directly, view it on GitHub https://github.com/tsightler/ring-mqtt/issues/689#issuecomment-1656748100, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVOMJZPTN3BMILYPY4BWWTXSUQFPANCNFSM6AAAAAA22Q4Z5E. You are receiving this because you modified the open/close state.

lambros414 commented 1 year ago

Please disregard my last email. I finally found the info sensor under the Sensors for MQTT devices for each camera. I have a different problem which I need to resolve. none of the entities are available. I think I have MQTT configured improperly and will have to address.

Thank you for putting up with my questions and thanks for your help

On Jul 29, 2023, at 12:30 PM, Chuck Lambros @.***> wrote:

I agree that the UI is changing constantly…mostly for the better, but it does make finding things hard.

I’m so sorry, and again, maybe being dense on my side. I am not finding any entities in for my doorbells/cameras called “info sensor”. I have open every entity for the camera. The Motion sensor is the only thing in the list of entities that has attributes which I can expand…. Shown below:

It doesn’t have any pertinent information…

<Screenshot 2023-07-29 at 12.26.11 PM.png>

I don’t know where to find the info sensor you are speaking of so I can expand the attributes.

Again, sorry for any misunderstanding on my side

Best,,

Chuck Lambros

On Jul 29, 2023, at 10:57 AM, tsightler @.***> wrote:

The problem with creating detailed instructions is that details have a tendency to change over time. HA constantly changes UI elements here and there so the steps have probably changed slightly. I'll you need to do is open the Info sensor and expand the attributes, they should be right there.

The RTSP URL will not point to the HA instance web UI. RTSP is it's own protocol and will point to the RTSP running in the addon/container. When using the addon it will be something like:

rtsp://03cabcc9-ring-mqtt:8554/_live

The still image URL, which is also important, will point to the HA web UI,.

— Reply to this email directly, view it on GitHub https://github.com/tsightler/ring-mqtt/issues/689#issuecomment-1656748100, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVOMJZPTN3BMILYPY4BWWTXSUQFPANCNFSM6AAAAAA22Q4Z5E. You are receiving this because you modified the open/close state.