Octoprint-Filament-Reloaded
Octoprint-Filament-Reloaded copied to clipboard
Filament Status Indicator
I am testing the icon indicator in OctoPrint of this plugin. I can read from octoprint.log that the icon is refreshing in interval by changing the DEBUG lines to info in __init__
of updateIcon():
def updateIcon(self):
if self.wCurrentState==0:
self._logger.info("Thread: Update icon 0")
self.wPluginManager.send_plugin_message(self.wIdentifier, dict(filamentStatus="empty"))
elif self.wCurrentState==1:
self._logger.info("Thread: Update icon 1")
self.wPluginManager.send_plugin_message(self.wIdentifier, dict(filamentStatus="present"))
elif self.wCurrentState==-1:
self._logger.info("Thread: Update icon 2")
self.wPluginManager.send_plugin_message(self.wIdentifier, dict(filamentStatus="unknown"))
The switching is fully functional as indicated in octoprint.log. However, the icon in the navbar in the homepage is not refreshing despite the correct printout atop the send_plugin_message
lines are being executed. Can anyone help? I don't know how messages are passed around for a plugin.
Many thanks!