Giter Club home page Giter Club logo

Comments (12)

tsightler avatar tsightler commented on September 24, 2024

The plugin wouldn't have any way to know what the old token was, so, if it is reverting to a previous token, the only logical conclusion is that the config is not actually saving to persistent storage. Sure, when you generate the token via the UI, it shows up in the config, but this is only the runtime, this file must also be persisted on the host.

As there are many ways to install Homebridge, it's very difficult to help, but you state that you are running Homebridge on Windows, my gut says this might be the cause. Can you provide a link to the install method you are using for this?

from ring.

H-a-m-i avatar H-a-m-i commented on September 24, 2024

OK. It's just weird because it worked fine for a year or two.
Here is the link to the install method:
https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Windows-10

from ring.

tsightler avatar tsightler commented on September 24, 2024

OK. It's just weird because it worked fine for a year or two.

Sure, but almost nothing has changed in the plugin in this regard as well, the code for updating the config dates back years with only very minor changes during that time, and there are no similar reports even though this project has 1000s of users. Certainly other parts of you infrastructure has changed.

Do you show any errors in the homebridge log?

There should be a config.json file at %HOMEPATH%\.homebridge\config.json do you see that file there and, after you generate a token via the web UI does it show the same token as shown the homebridge UI?

from ring.

H-a-m-i avatar H-a-m-i commented on September 24, 2024

Hmm ok.

I have now manually created a new token with npx -p ring-client-api ring-auth-cli and stored it in the Homebridge JSON. It is then also stored in %HOMEPATH%\.homebridge\config.json. But after a restart, the old token is stored everywhere again.

I can't find any errors.
homebridge_log.txt

from ring.

tsightler avatar tsightler commented on September 24, 2024

Are you 100% sure it is the old token? The token will not stay the same as the one that is generated, it is expected to change on first connection of the plugin to the API, so that part is normal. What is not clear is how it could possibly be reverting to an older/previous token as that doesn't even seem like it should be possible.

from ring.

H-a-m-i avatar H-a-m-i commented on September 24, 2024

Oh sorry, you're right! I only ever saw the last few characters and they were always the same. There are always others, but not the generated one

from ring.

tsightler avatar tsightler commented on September 24, 2024

OK, then please clarify what problem you are having as it's not expected that the token would stay the same as the one originally generated, the code automatically updates the token as it is refreshed, which happens on initial connection and every hour, and also encodes additional persistent data, such as the generated system ID and the firebase cloud messaging credentials, into the token, thus the token changing from the initial generated token is fully expected and actually required.

from ring.

H-a-m-i avatar H-a-m-i commented on September 24, 2024

I have now uninstalled everything again, this time really everything, including node from the pc. I also deleted all folders in windows, node, npm, homebridge, appdata, really everything. Then I reinstalled everything clean, but that didn't help either.
I am at my wits end and don't know what else to do. So I have to leave it as it is and will have to do without the recordings in the future.

Thank you very much anyway

from ring.

H-a-m-i avatar H-a-m-i commented on September 24, 2024

I tried again today. I uninstalled homebridge via cmd with npm uninstall -g --unsafe-perm homebridge-config-ui-x, deleted everything in $HOME\.homebridgeNode.js, uninstalled nodejs, deleted npm folder... Then did I reinstalled homebridge, but this time with Hyper V and using these instructions:
https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Windows-10-Using-Hyper-V

I then also created a new homebridge account (which probably wouldn't have mattered) and then installed the ring plugin and created a new Thoken. But it's the same problem again as it has been all along. That can't be, previously via node.js and now another method with Hyper-V virtual switch, but still the same problem.

Can you give me a hint? Is there a common folder or program in Windows that is used for both methods that I can delete/uninstall/reinstall?
After all, they are two different methods using two different virtual servers, but both have the same error

from ring.

tsightler avatar tsightler commented on September 24, 2024

What is the error? What problem are you having? You just keep explaining all the steps you are taking but never describe what problem you are actually having. You titled this post as "New auth token is not saved" but, as you noted just a few comments above, this was not the case and the token is being saved is not the same token as the one generated, but rather a new token, which is totally expected behavior. The token will never just stay the same as the one you originally generate, if it did, that would be the broken behavior.

Please describe the what problem you are having, without that, it is difficult to understand how to help you. For example, when you initially generate the token, does it work, but then not work after a reboot? Without a description of the actual symptoms you are having, there's not much path forward.

from ring.

H-a-m-i avatar H-a-m-i commented on September 24, 2024

Ohhh sorry, I misunderstood your previous answer. I thought that the token should remain stored at least in the plugin on the dashboard.
In that case, I'll have to look elsewhere to find out why my Ring System isn't working anymore.
sorry and thank you

from ring.

tsightler avatar tsightler commented on September 24, 2024

If you want to open a new issue and describe the problem you are having, as well as provide logs, I'm happy to try to help, but without this, it is just a blind guessing game.

from ring.

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.