Giter Club home page Giter Club logo

Comments (5)

tsightler avatar tsightler commented on July 17, 2024

All of this is basically correct, it's the state for each sensor and that output is expected. What's not expected is exiting unless you canceled the script. Can you run the script with full debug and see if there are any obvious errors? Also, what version of nodeJS are you running on?

from ring-mqtt.

ostersc avatar ostersc commented on July 17, 2024

It looks like there's probably a syntax/scoping issue with the error handling code when the mqtt connection fails. I found an authentication error in my mqtt broker's logs, and noticed I had my password wrong. So that was the root cause of the error, and when I corrected that it started working. So I'm good now, but there's probably an issue in the code that is preventing the script from properly outputting the error as intended. Thanks for the great project!

from ring-mqtt.

tsightler avatar tsightler commented on July 17, 2024

Ok, I'll test this scenario more stringently and dig up the error. I definitely saw that the error was not getting reported but obviously that didn't cause the exit. I've actually tested failure scenarios a good bit but maybe missed the MQTT fails to connect on startup case.

Thanks for the report!

from ring-mqtt.

tsightler avatar tsightler commented on July 17, 2024

I found the error, it was silly! Just missing the "error" in the function parameter. I had tested with the MQTT broker not running/reachable, but I had not tested a scenario where the broker was connected, but not authorized to send data.

Once I added the error parameter to the function it now generates a nice "Not authorized" message (at least if you have debug enabled) and, instead of exiting, it just keeps trying to connect every second like it's supposed to. I'll push an update to the dev branch to fix this, so that when I push that to the master branch later next week it gets fixed. Thanks again for reporting it!

from ring-mqtt.

tsightler avatar tsightler commented on July 17, 2024

Commited the 0.8.0 version to the master branch which should close this issue.

from ring-mqtt.

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.