Giter Club home page Giter Club logo

Comments (2)

foosel avatar foosel commented on May 27, 2024 1

I just realized that I read this wrong and you are actually talking about the printer connection here, not the MQTT connection. Well, 0.7 will have LWT support anyhow ;)

However what you are asking for here should actually already work and in my test also does, see the highlighted message here:

image

The events aren't retained though (that wouldn't make a lot of sense considering that events are not a status), so you must be connected to the broker and subscribed to those messages to actually receive them. Also note that the list of events in the README isn't exhaustive, for a full list of all available events consult OctoPrint's docs.

I honestly don't want to mirror each and every status available on the REST API, if you need that kind of control I suggest to use that API instead, or alternatively implement another plugin utilizing the helper functions provided by this one.

from octoprint-mqtt.

hovissimo avatar hovissimo commented on May 27, 2024

The MQTT way of doing this is to set a "last will and testament" (LWT) message with the broker. The broker then publishes the message as specified when the broker detects the client is no longer connected.

Random google link: https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament

This is actually mentioned in the readme as a TODO.

from octoprint-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.