JeremyLaurenson / octoprint-emc2101

9 stars 2 forks source link

Error while processing temperatures in emc2101 #4

Open be221b opened 2 years ago

be221b commented 2 years ago

In 0.0.6. Reading temperature but no fan tach or control?

image

From log:

2022-05-25 00:23:52,082 - octoprint.plugins.emc2101 - INFO - EMC2101 plugin is alive!
2022-05-25 00:23:52,343 - octoprint.util.comm - ERROR - Error while processing temperatures in emc2101, skipping
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 2121, in _processTemperatures
    parsedTemps = hook(self, parsedTemps)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1688, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/__init__.py", line 536, in get_graph_data
    temps = self.temperatures[sensorNum]
IndexError: list index out of range

2022-05-25 00:23:53,022 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller number 0 is connected
JeremyLaurenson commented 2 years ago

Hey, I just posted an update. What hardware are you using in terms of sensors?

be221b commented 2 years ago

EM2101 QT and MCP9808 QT (MCP9808 QT is not connected yet. I need to print an enclosure for it). (Also have MCP9601 QT with an external type-K thermocouple in case you decide to support that too!) Will try the update asap.

be221b commented 2 years ago

Still bugging out:

2022-05-25 12:12:43,522 - octoprint.util.comm - ERROR - Error while processing temperatures in emc2101, skipping
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 2121, in _processTemperatures
    parsedTemps = hook(self, parsedTemps)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1688, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/__init__.py", line 544, in get_graph_data
    temps = self.temperatures[sensorNum]
IndexError: list index out of range
2022-05-25 12:12:44,206 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller channel start scan.
2022-05-25 12:12:44,211 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 0 | 2101
2022-05-25 12:12:44,211 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller number 0 is connected
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 1 | Not found
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 1 has no controller connected
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 2 | Not found
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 2 has no controller connected
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 3 | Not found
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 3 has no controller connected
2022-05-25 12:12:44,308 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 4 | Not found
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 4 has no controller connected
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 5 | Not found
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 5 has no controller connected
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 6 | Not found
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 6 has no controller connected
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 7 | Not found
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 7 has no controller connected
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 8 | Not found
2022-05-25 12:12:44,309 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 8 has no controller connected
2022-05-25 12:12:44,310 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 
2022-05-25 12:12:44,310 - octoprint.plugins.emc2101 - INFO - Did not find a | in this line...
be221b commented 2 years ago

So the fan and temperature sensor work now! But nothing shows on the graph:

2022-05-25 13:20:07,931 - octoprint.util.comm - ERROR - Error while processing temperatures in emc2101, skipping
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 2121, in _processTemperatures
    parsedTemps = hook(self, parsedTemps)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1688, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/__init__.py", line 544, in get_graph_data
    temps = self.temperatures[sensorNum]
IndexError: list index out of range

Any chance on the MCP9601?

Thanks!

poprhythm commented 2 years ago

I'm getting something similar, using an EM2101 QT, software version 0.0.8.

2022-07-27 21:56:34,469 - octoprint.util.comm - ERROR - Error while processing temperatures in emc2101, skipping Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 2121, in _processTemperatures parsedTemps = hook(self, parsedTemps) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1688, in wrapper return f(*args, **kwargs) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/__init__.py", line 544, in get_graph_data temps = self.temperatures[sensorNum] IndexError: list index out of range

I'm pretty sure I have it attached the same way as the instructions - is there anything I can try to help find what is causing the error?

poprhythm commented 2 years ago

This turned out to look like a faulty device, the power light was working but the data connections were not operating. Replaced it with another and it's all working now. Might be good to add an error display like "No devices detected" if this occurs.

The project readme includes an image of the temperature chart displaying temps from this plugin - I have been unable to determine how to accomplish this - is it another plugin to help with this?

vlycop commented 1 year ago

Hi I am encountering this error with a single emc2101 connected, no outside temperature sensor

2023-08-23 22:41:04,701 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller channel start scan.
2023-08-23 22:41:04,701 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 0 | 2101
2023-08-23 22:41:04,701 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller number 0 is connected
2023-08-23 22:41:04,836 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 1 | Not found
2023-08-23 22:41:04,836 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 1 has no controller connected
2023-08-23 22:41:04,836 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 2 | Not found
2023-08-23 22:41:04,837 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 2 has no controller connected
2023-08-23 22:41:04,837 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 3 | Not found
2023-08-23 22:41:04,837 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 3 has no controller connected
2023-08-23 22:41:04,837 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 4 | Not found
2023-08-23 22:41:04,837 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 4 has no controller connected
2023-08-23 22:41:04,838 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 5 | Not found
2023-08-23 22:41:04,838 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 5 has no controller connected
2023-08-23 22:41:04,838 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 6 | Not found
2023-08-23 22:41:04,838 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 6 has no controller connected
2023-08-23 22:41:04,838 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 7 | Not found
2023-08-23 22:41:04,838 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 7 has no controller connected
2023-08-23 22:41:04,839 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 8 | Not found
2023-08-23 22:41:04,844 - octoprint.plugins.emc2101 - INFO - EMC2101 controller number 8 has no controller connected
2023-08-23 22:41:04,844 - octoprint.plugins.emc2101 - INFO - EMC2101 is checking sensor channel 
2023-08-23 22:41:04,845 - octoprint.plugins.emc2101 - INFO - Did not find a | in this line...
2023-08-23 22:41:05,322 - octoprint.plugins.emc2101 - INFO - EMC2101 error: Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/EMC2101.py", line 50, in <module>
    print('{0:0.1f} | {1:0.1f}'.format(temperature, fanspeed))
NameError: name 'temperature' is not defined

2023-08-23 22:41:05,360 - octoprint.plugins.emc2101 - INFO - Failed to execute EMC2101 python subscript...

Is this known ? linked to this issue ? or should be a new one ? running 0.0.8