Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin not reporting Offline/Disconnect #11

Closed
tibmeister opened this issue Jun 5, 2020 · 1 comment
Closed

Plugin not reporting Offline/Disconnect #11

tibmeister opened this issue Jun 5, 2020 · 1 comment

Comments

@tibmeister
Copy link

I'm trying to display the current status of the printer on my Grafana dashboard and in the InfluxDB dataset I'm not seeing where it's being logged that the printer is offline or disconnected.
It looks like in the code that if the printer is not online you are just exiting the function. Is it possible to instead have it write into the state table that the printer is offline?
I've never dealt with Python or even plugins for Octoprint, but I could try and see what I can do and go from there. It could be interesting, but possibly make the change on my system (after I figure out where the files are at) then submit a PR for the changes.

@agrif
Copy link
Owner

agrif commented Jun 21, 2020

This has been available through the PrinterStateChange event, but using it was awkward because of how events were stored. This has been changed, and also now the state measurement is updated even if the printer is offline. These changes are part of 1.3.0, which should be available for automatic upgrades.

I'll close this for now, but if this doesn't help feel free to re-open. (And PRs are, of course, always welcome!)

@agrif agrif closed this as completed Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants