OctoPrint-Enclosure
OctoPrint-Enclosure copied to clipboard
Issue noticed after upgrading to octoprint 1.7.0
I have been using this plug mainly to control a heater for my chamber. I don't print all that often but have been printing abs for the last 3 days this is what I noticed, and it seems like an issue with the upgrade to me.
PreUpgrade:
I printed a HeroMe gen 50 I set the temp to 60 and it worked it printed. I printed a second one still pre upgrade but noticed for some reason the heater was off and octoprint plug screen showed no temp set so I set a temp and it started back up and finished the print.
At the end of the print everything shutdown like expected, however the chamber temp probe showed 0.0c. I figured a reboot would solve it and if I was going to reboot I should upgrade. So I upgraded and rebooted.
PostUpgrade:
The chamber temp again read a temp 28c which I didn't personally measure with another device but that was also what the bed and hotend read so I assume it was accurate.
I then went to print another ABS part I set the temp to 60, and the enclosure plugin never even tried to turn on the gpio pin, the state stayed showing off in the ui and the heater never activated. I need the part so I tried to print without the chamber heater; I MADE A HUGE MISTAKE, I never went back into the ui and removed the tempature since the plugin was not activating the heater and i didn't unplug the heater. I watched the print for many hours noticed some warping because there was NO HEATER ACTIVATED, as it was around midnight I went to sleep again after many hours watchin the printer, I woke up to a failed print and the heater some time during the night simply activated and was uncontrolled. All metal parts inside the enclosure where at around 90c and the filament had jammed at the extruder.
Summery of my thoughts. One of two things has happened and had to take apart the printer so I can test today, but If get a reply asking I will test and confirm.
Either the temp sensor failed sometime during Pre upgrade between the two copied of the hero me; Which might make sense given the 0.0c it showed before reboot, but equally makes sense it was just an oddit as it came back reporting correctly post reboot, and upgrade.
Or the plugin is not fully functional after upgrading to 1.7.0 octoprint-systeminfo-20211012180659.zip
Here is the test I did of the temp probe https://www.youtube.com/watch?v=1QB8zxtZ9dU
It seems to be working but I did have to reboot, when I start it stayed at 28c then I rebooted and it started updating. I am including another system info bundle to be compared since I rebooted again. I am not sure if this says there is problem with the plugin that a reboot is fixing? or if this is proof its an issue with the sensor? octoprint-systeminfo-20211012180659 (1).zip
I have found some trouble in module getDHTTemp.py here are mine corrections. Now is working :-) import sys import Adafruit_DHT
Parse command line parameters.
sensor_args = {
'11': Adafruit_DHT.DHT11,
'22': Adafruit_DHT.DHT22,
'2302': Adafruit_DHT.DHT22
}
if len(sys.argv) == 3 and sys.argv[1] in sensor_args: sensor = sensor_args[sys.argv[1]] pin = sys.argv[2] else: sys.exit(1)
#dht_dev = sensor(pin) #humidity = dht_dev.humidity #temperature = dht_dev.temperature
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
if humidity is not None and temperature is not None: print('{0:0.1f} | {1:0.1f}'.format(temperature, humidity)) else: print('-1 | -1')
sys.exit(1)
The issue happened in 1.5.2 also when I did an upgrade to the OS. I also replaced the sensor with a brand new sensor just in case. This is the error I see.
So this is a fresh install of octopi 1.8 with 1.5.2 the plugin was working until I ran apt update and apt upgrade.
2021-10-28 08:42:50,324 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 67492} 2021-10-28 08:42:59,472 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments: ('list index out of range',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 986, in get_sensor_data temp = self.read_18b20_temp(sensor['ds18b20_serial']) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1203, in read_18b20_temp lines = self.read_raw_18b20_temp(serial_number) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1218, in read_raw_18b20_temp device_folder = glob.glob(base_dir + str(serial_number) + '*')[0] IndexError: list index out of range 2021-10-28 08:42:59,474 - octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments: ('cannot unpack non-iterable NoneType object',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 811, in check_enclosure_temp temp, hum = self.get_sensor_data(sensor) TypeError: cannot unpack non-iterable NoneType object