Skip to content

Support for MQTT #246

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

Closed
notenoughtech opened this issue Feb 16, 2022 · 12 comments
Closed

Support for MQTT #246

notenoughtech opened this issue Feb 16, 2022 · 12 comments

Comments

@notenoughtech
Copy link

Hi,

I wonder if it would be possible to add the MQTT option to share the writes to the database? It would enable logging externally without reading the DB or hosting it on another server.

Thanks

@OllisGit
Copy link
Owner

Hi @notenoughtech,

in combination with this plugin MQTT and the checkbox "Unclassified events" , it should be easy to implement. I just need to fire an event.

These are the events that could be helpful:

  • updateSelectedSpoolWeight
  • selectedSpool
  • removeSelection
  • updatedSpoolData
  • addedSpool
  • deletedSpool

Did I miss something?

@notenoughtech
Copy link
Author

notenoughtech commented Feb 17, 2022 via email

@OllisGit OllisGit added the status: inNextRelease Will be implemented/fixed in next release label Feb 17, 2022
OllisGit added a commit that referenced this issue Feb 17, 2022
- E #246 EventBus-Events to support MQTT-Topics
- E #186 multiple templates (with field selection)
- E #191 Include PTFE tube length for remaining check
- E #221 Preview of QR-Code
- E #207 Define IP/URL for QR-Code generation
- E #220 Output of database id in QR-Code view
- E #236, B #228 Output of total spools in tab-view
- E Output of database id in QR-Code and in table

- B #245 Show last weight digit
- B #235 custom colorname not stored
- B #225 copy was disabled during printing
@OllisGit
Copy link
Owner

Hi @notenoughtech,

in the latest RC-Version 1.7.0rc1 I implemented the event-mechanism.
Please test and give feedback

If you update/create the database by your own, it could go wrong and the plugin stops working ;-)

Thx, in advance
Olli

@OllisGit OllisGit added status: waitingForTestFeedback channel:RC and removed status: inNextRelease Will be implemented/fixed in next release labels Feb 17, 2022
@notenoughtech
Copy link
Author

notenoughtech commented Feb 17, 2022 via email

OllisGit added a commit that referenced this issue Feb 17, 2022
- E #246 EventBus-Events to support MQTT-Topics
- E #186 multiple templates (with field selection)
- E #191 Include PTFE tube length for remaining check
- E #221 Preview of QR-Code
- E #207 Define IP/URL for QR-Code generation
- E #220 Output of database id in QR-Code view
- E #236, B #228 Output of total spools in tab-view
- E Output of database id in QR-Code and in table

- B #245 Show last weight digit
- B #235 custom colorname not stored
- B #225 copy was disabled during printing
@notenoughtech
Copy link
Author

notenoughtech commented Feb 18, 2022 via email

@OllisGit
Copy link
Owner

Hi @notenoughtech,
currently the selected spools were stored in the local octoprint plugin-settings (see <op>/config.yml
image
These information will be move into the database (feature "external db")...will take some time.

@OllisGit OllisGit added status: inNextRelease Will be implemented/fixed in next release and removed status: waitingForTestFeedback labels Mar 18, 2022
@OllisGit
Copy link
Owner

OllisGit commented Mar 18, 2022

Hi @notenoughtech,
new Version 1.7.0 is released and include the MQTT feature.

Please test and give feedback.

Thx, in advance
Olli

@OllisGit OllisGit added status: waitingForTestFeedback and removed status: inNextRelease Will be implemented/fixed in next release channel:RC labels Mar 18, 2022
@notenoughtech
Copy link
Author

notenoughtech commented Mar 18, 2022 via email

@notenoughtech
Copy link
Author

Hi,
My apologies for the late reply. Other projects got in the way before I could jump on this with the feedback.

It's nice to see the events share the details with MQTT, thank you. I have a couple of suggestions:

Spool deselected:
databaseId = null; - would be cleaner to retain the ID of the active spool otherwise, I have to keep track of the spoolId assigned to the toolId

spool object - any chance to expose all details from spool added event? (brand, cost comments all shebang)

edits to spools - no event is being fired. That would be ok, if either whole spool object is shared via MQTT on load, or perhaps drop the array of spools with manual refresh in the plugin page?

Thank you for the changes made so far.

@notenoughtech
Copy link
Author

I came up with a workaround for now (cloning the db file). Not the prettiest way but it works. If you want to see what I made with that - check out this: https://notenoughtech.com/3dprint/smart-filament-storage/

@github-actions
Copy link

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

@github-actions github-actions bot added the status: markedForAutoClose Issue will be closed automatically label May 19, 2022
@github-actions
Copy link

This issue was closed, because it has been already marked for 10 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants