MQTT: Discrepancy between "job" & "jobstate" data and actual state
I have had MQTT running for some time but hadn't used it until now. Currently, however, I am integrating the server into FHEM to trigger specific actions based on the printer's current status.
In doing so, I noticed a discrepancy between actual conditions and two data points transmitted via MQTT:
- jobstate - :
"jobstate" always reads "running"—without exception—regardless of whether the printer has just been turned on, is currently printing, or has finished printing.
- job - :
In contrast, "job" reads "none" when the printer is idle.
This doesn't make much sense to me. Logically, "jobstate" should read "running" while the current job is printing and, for example, "done" once it has finished.
Correspondingly, when a job exists—regardless of whether it is currently printing or not—"job" should indicate the number of pending jobs, or show "0" or "none" if no jobs remain.
To summarize, here are the current states transmitted by the server via MQTT:
Printer real „job“ „jobstate“ „powerOn“ „Layer“
OFF → ON none running false off
Preheat manual none running false off
Start printing -jobname- running false x / y