apollo-ng / picoReflow

Turns a Raspberry Pi into a universal, web enabled Reflow Oven Controller
201 stars 118 forks source link

picoreflowd doesn't handle MAX31855 read errors gracefully #2

Closed chron0 closed 6 years ago

chron0 commented 10 years ago

Reported by Kurt via:
https://apollo.open-resource.org/mission:resources:picoreflow#comment_146a0a60fe7cb141ca3eca11a8bb8eac

Have things pretty well set up, but for some reason I get random “MAX31855Error: Thermocouple short to ground” errors, with 2 different MAX31855 breakout boards. As far as I can tell, there's nothing shorting, all good connections, etc.

What I'd like to do is ignore that and continue running, however once that occurs, the program quits recording the temperature until I kill picoReflow and start it again.

Is there a way to tell it to just keep going, or even close just restart the max31855 part of the program when that happens?

Specific error:

Exception in thread Thread-2: Traceback (most recent call last):

File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  self.run()
File "/home/pi/picoReflow/lib/oven.py", line 185, in run
  self.temperature = self.thermocouple.get()
File "/home/pi/picoReflow/lib/max31855.py", line 41, in get
  self.checkErrors()
File "/home/pi/picoReflow/lib/max31855.py", line 78, in checkErrors
  raise MAX31855Error("Thermocouple short to ground")
MAX31855Error: 'Thermocouple short to ground'
chron0 commented 10 years ago

Please pull and checkout the MAX31855-EH branch (https://github.com/apollo-ng/picoReflow/tree/MAX31855-EH) and see if it continues to run. It should log the occurrences as errors but unfortunately I couldn't test it on real HW yet.