Closed DiEVeXx closed 2 years ago
Are you willing to share the camera?
Yes, i can, can you explain me about this?
EDIT: Email sent
Thanks for be willing to share the camera, it makes testing so much easier. I added the camera to my development setup and everything works perfectly so that at least tells me that there's nothing really wrong with ring-mqtt itself, or at least nothing that should keep it from working, so it's more likely to be something specific to your environment.
It's a little difficult to troubleshoot because the logs above don't include all details and it looks like this wasn't the very first attempt. It looks a little like the first attempt failed for some reason and then it got into an unexpected state because it's never really trying to start a stream in those logs. Can you please run with DEBUG=ring-* and then try again and provide the full logs? You can zip them up and email them to me if that is easier for you.
I'm going to remove your camera from my account since we've been able to prove that it at least should work and I know it's a little weird to share a camera with a random person on the internet!
Logs sent. Thanks again.
Hi @DiEVeXx, thanks for the logs. There is something very strange about them that I also noticed in the logs above. Again, ignoring the streaming issue there appears to be a very unstable network connection between the host running ring-mqtt and the Ring API servers, there are tons of request failures and polling fails so often that the device goes online/offline over and over (polling must fail 3 times in 60 seconds for this to happen). Lots of requests fail randomly and work later.
Based on this, it seems like the device you are running ring-mqtt on has very poor network connectivity and of course live streaming will never work this way. In one of the log cases the stream did actually start, but it took more than 8 seconds. For example, with my own RPi4 starting a stream to your camera takes about 3 seconds.
I'm not really sure what might be causing this, are you using Wifi or Ethernet? Do you have other things running on the host? It could possibly be MTU related, I thought that because it seemed like bigger queries (requests for event list or for snapshots) seem to fail much more often than small queries.
In the end, until you can eliminate these errors, there's not much reason to attempt to troubleshoot the streaming issues because of course streaming won't work if connection to the Ring API is not stable.
The ring-mqtt service is running on a Raspberry 4 4GB connected by cable to a switch, it is running the services mentioned in the yml and some more.
Tomorrow I will try to connect it directly to the router and try to reduce the amount of services running (maybe the switch is overloaded), I will also take a look at the MTU issue. Thanks for your help
OK, well let me know what you find. The logs are full of disconnects and errors retrieving data from URLs. I have no idea why this would be the case. I suppose it could also be RAM or CPU resources, but that doesn't appear to be an overloaded system from that perspective.
Out of curiosity, what version of Docker are you running and, by any chance are you running a 32-bit host OS?
Docker version 20.10.5+dfsg1, build 55c4c88 Yes, i'm using 32bits OS version, is this a problem?
Docker version 20.10.5+dfsg1, build 55c4c88 Yes, i'm using 32bits OS version, is this a problem?
Technically, using 32-bit OS shouldn't be an issue, but it's not something I test at all. I've switched all my RPi's to 64-bit Ubuntu or 64-bit Home Assistant OS some time ago. In the past there was an issue with recent Alpine versions and the older Docker shipped with Raspbian 10 that would cause various issues, including network connectivity issues. I thought these issues were addressed with Raspberry OS 11, but I wonder if there's still some less obvious issues that are causing the network behavior.
Honestly that's just a shot in the dark because there's nothing obvious here. I've seen IPv6 cause some users a few issues as well, but I doubt that's it. I also notice you are creating an overlay network rather than using the default bridge network, I would also consider this uncommon vs other users, and I believe overlay networks do impact MTU since I believe they encapsulate traffic inside VXLAN, so you might try setting the MTU to 1400 and seeing what happens.
It might also be interesting to connect to a bash shell in the container and see if you can reproduce the network issues from the command line. For example, install speedtest-cli (apk add speedtest-cli) and run that a few times over the course of a minute or two and see what it reports.
Just ideas, as I'm not really sure what else I can do at this point.
One other possible issue, do you definitely have a caching DNS on your local network? Do you have any way to monitor DNS queries going out of your network? I remember an old bug that was never tracked down where sometimes ring-client-api would just start making 1000's of DNS queries/second and it could cause behavior similar to this. I was only able to reproduce the issue a handful of times, and only by forcing DNS to use an external DNS server directly. Perhaps a packet capture on the host running ring-mqtt would give some clue.
I have already found the problem. The problem really was in the network instability of the raspberry pi, apparently there is a bug if a static IP address is set which causes a lot of network packets to be lost, once a dynamic IP address is set and assigned in the DHCP server a static IP the problem has been solved.
Thank you very much for your support, I close the issue.
Great, glad you got it figure out and thank you for sharing the solution! I do think I remember seeing that issue come up in my searches at some point.
Hi, First, thanks for your service and for your time.
Describe the problem
I am not able to get the real time view with a wired ring doorbell, neither from VLC nor from Home Assistant, but I am able to get the last captured snapshot.
Describe your environment
I'm using Raspberry OS (Raspbian GNU/Linux 11 (bullseye))
I am running Home Assistant Core latest stable, with this service ring-mqtt (latest) and mosquitto (latest) inside a docker network with a reverse proxy to access from outside home to my home assistant.
These are the steps followed in the deployment:
docker network:
docker network create -d overlay --ip-range=172.16.0.0/16 proxy
compose file:
ring mqtt config.json:
mosquitto.conf:
After deployment get the Ring token from the :55123 and wait mosquitto to get information from ring-mqtt, Then i go to the Home assistant devices, search this doorbell from MQTT integration and click on Sensor Info to get the RTSP and Snapshot URLS.
But, here is where problems starts.
Describe any steps you've taken to attempt to resolve the problem
I have tried in the ring-mqtt configuration:
Options used in Camera integration config:
Debug Logs
Ring-Mqtt Logs (Starting service):
After Processing Ring Locations the service get my location, my device and start to publish data to mosquitto.
Logs when i try to connect to live view in Home Assistant (using hostname IP):
Logs from Ring-Mqtt service after try to get