tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
583 stars 104 forks source link

ring-mqtt keeps crashing in docker/can't refresh token #716

Closed image969 closed 1 year ago

image969 commented 1 year ago

Hello,

Everything has been running fine for a while now on my synology using docker.

One day recently, the token had expired. I used web interface to generate a new token, but when pasting it in it is not working I also noticed the new instructions say to add refreshToken in JASN file when it used to be ring-token

Not sure if that matters

Also, i can't remember what version I had, but it has been a while since I updated. Ever since I updated to latest build, after 60 seconds the Tsightler-Mqtt crashed. IT tried to restart and keeps crashing

Looking for any assistance. I've exhausted all of google, and no one has made a video on this yet Please help

Thank you

tsightler commented 1 year ago

As there are no logs provided there's not much to go on here, but I'll start with a few things:

You mentioned in the forums something about "changes in 5.x" which makes me think that you were previously still on 4.x versions. The 5.x release was over a year ago and >95% of all users upgraded within a few months. Current 5.x releases no longer contain the backwards compatibility code which would automatically convert previous 4.x configurations into 5.x, so you must start from scratch configuring things like the mqtt options, which changed significantly between the two versions.

Also, 5.x has some specific new requirements, such as requiring the mapping of a persistent volume. This is all covered in the Upgrading to 5,x documentation.

My suggestion is, if you are coming from a 4.x version at this point, that you start from scratch. Stop and delete the container, go to the Ring Control Panel and delete all previous ring-mqtt and unknown devices from Authorized Devices, the re-install the container, making sure to run it with a persistent volume, and my guess is it will work, just as it has for ~10,000 other users.

If you do this, and are unable to make it work, please provide the commands you are running, the configurations you are using, etc. Without this, there's not really any way to help since I will have no idea what exactly you are doing. You can of course remove any uses/password or other critical information.

image969 commented 1 year ago

Thanks for the quick reply. Just one more followup before I delete everything

I've already removed devices on ring.com just now.

I am only removing ring-mqtt right? What I mean is I first had to install MQTT - Eclipse Mosquito on the docker to have MQTT on synology machine. I don't need to remove that right?

And as far as the files I already have on machine. The config and the .JSN file with the ring info. DO I need to delete those files too? I dont want to delete the wrong stuff. Thats basically the reason for my question.

Then I will stat anew like you suggested,

thank you

tsightler commented 1 year ago

Yes, just delete ring-mqtt, no need to delete anything else. There should be two config files, one that is config.json and another ring-state.json, you don't need the ring-state.json file at all, but you might want to save the MQTT settings from config.json if you don't otherwise know them as you'll need to convert them to the MQTT URL based configuration option used in 5.x, but otherwise you don't need anything else.

image969 commented 1 year ago

OK I just got done going through every step. Everything is up and running my snap. Shots are working great. The only thing I have left to figure out is the time out. I’m getting when I try to view live. My configurations file is exactly the way it was when this worked a while ago. Here’s a screenshot of the error. And config file.

If there’s something better, I can upload please let me know. Forgive me if this isn’t enough. Thanks again for the help. IMG_3509 IMG_3508

tsightler commented 1 year ago

Streaming is unlikely to be impacted by the configuration file. There's no guarantee that the new ring-mqtt container was assigned the same IP address as the previous one, did you verify that it didn't change?

As always, the ring-mqtt logs are the most useful to troubleshoot such things.

image969 commented 1 year ago

Good morning. I haven’t had a chance to troubleshoot since the last question. I asked, but I have a snapshot of the latest logs. IMG_3511

tsightler commented 1 year ago

Well, I would need logs of an actual attempt to stream since that is what you are working on. Screenshots of logs are difficult to deal with, but might be sufficient if it were taken immediately after a streaming attempt. Any time you attempt to start a stream there will be a log entry about it, including details of the stream starting. If you don't see this, then the problem is not likely to be with ring-mqtt, but in the communications to ring-mqtt.

image969 commented 1 year ago

OK I think I’m getting closer to narrowing this down because I don’t see anything popping up in the logs but I wonder if the URL changed with all the messing IMG_3512 around I’ve done especially deleting and starting from scratch. Can you remind me where I find this URL? I completely forget

image969 commented 1 year ago

I fixed it. Thank you so much for the help. That 172 IP address ending in .3 in the screenshot it changed to point to .2

I learned a lot redoing everything. Thanks for all of the help.

tsightler commented 1 year ago

Good deal, I'm glad you got it working. I will close this issue now.