Qrome / printer-monitor

OctoPrint 3D Printer Monitor using Wemos D1 Mini ESP8266
MIT License
479 stars 164 forks source link

no display updates (duration/est time/ % / Temps) without internet connection #149

Open Vossberger opened 3 years ago

Vossberger commented 3 years ago

Wemos+display working well in my home enviroment (with internet connection),

now I connected it to my office installation without internet connection. a PI-Zero ist running octoprint and working as an access point (with DHCP). I can permanently connect my laptop/Mobile and Octorprint-Monitor. I've tested updating the "API" data and I can see that each time I press the button I receive updated data from the Pi.

The Monitor does not upgrade printing information/est. time/ percentige reached/temperatures(tool/Bed) as far as I do not unplugg and plug in the usb connector. I'm aware that I can not see the actuall time and weather data but what do I have to change within the script to display the updated octoprint data on the display ? I think this "issue" is related to the missing time chnge information ?

Any solution ?

Vossberger commented 3 years ago

I've found a simple solution by adding a loop. Maybe it makers sense to include a check in the next version of the fantastic script (Internet yes/no) and then do this loop.

// **** // 1 Sec refresh to refresh display data // **** unsigned long time = millis(); while((millis() - time) <1000) { printerClient.getPrinterJobResults(); printerClient.getPrinterPsuState(); }