LazeMSS / OctoPrint-TopTemp

Topbar temperature plugin for OctoPrint
21 stars 2 forks source link

Run python script as custom command? #99

Closed beffjessen closed 1 year ago

beffjessen commented 1 year ago

I have a DHT22 sensor to monitor temperature and humidity in my printer enclosure. I had been using the Enclosure Plugin, but now that it's deprecated, there's no obvious alternative plugin... except maybe the custom command functionality in TopTemp?

I wrote a simple python script to grab the sensor temperature (based on this code) saved locally via nano, and it works when executed via SSH; however, I get a 'No such file or directory' error when I test python3 example.py as a custom command. Is it possible to execute python scripts as a custom command, and I'm just making a simple mistake? Or would this actually require a new feature be developed? I appreciate any help, thank you!

LazeMSS commented 1 year ago

You need to provide the full path etc.

beffjessen commented 1 year ago

Simple mistake it was! 😅

This is a great workaround for those of us who had been using the Enclosure plug-in for simple data output, hopefully others are aware of this as well. Thank you!