JeremyLaurenson / octoprint-emc2101

9 stars 2 forks source link

Basic Hardware doesn't work : octoprint.plugins.emc2101 - INFO - Failed to execute EMC2101 python subscript... #2

Closed etellier closed 2 years ago

etellier commented 2 years ago

2022-04-28 17_58_25-OctoPrint Hardware : Raspberry Pi 3 Model B Rev 1.2 one EMC2101 (GPIO 2 SDA and 3 SCL) tried 3v and 5v : both working one 12V fan + powersupply : Tach (white) - +12v" - Gnd - pwm(Blue) : Fan Nidec ta450dc, Gnd connected to Gnd GPIO RPi Octopi fresh install version 0.18.0 : tool raspberry Pi imager Octoprint : 1.7.3 Python 3.7.3 I2C enabled (sudo raspi-config) plugin EMC2101 installed from plugin manager

Wiring and EMC tested with Arduino : Working I2C tested with an SSD1306 Screen : Ok

EMC2101 initialized but no fan pwm and no Temp displayed on plugin screen "Fan Control (EMC2101)" everything is "Off" "Temperature" screen displays only Tool and Bed temps

Errors in octoprint.log :

Boot then :

2022-04-28 17:16:29,280 - octoprint.plugins.emc2101 - INFO - EMC2101 plugin is alive! 2022-04-28 17:16:29,827 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller number 0 is connected 2022-04-28 17:16:29,835 - octoprint.plugins.emc2101 - INFO - Failed to execute EMC2101 python subscript... and every 2 seconds error message : 2022-04-28 17:16:53,222 - 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 2110, in _processTemperatures parsedTemps = hook(self, parsedTemps) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/init.py", line 1737, in wrapper return f(*args, *kwargs) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/init.py", line 543, in get_graph_data temps = self.temperatures[sensorNum] IndexError: list index out of range 2022-04-28 17:16:55,226 - 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 2110, in _processTemperatures parsedTemps = hook(self, parsedTemps) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/init.py", line 1737, in wrapper return f(args, **kwargs) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/init.py", line 543, in get_graph_data temps = self.temperatures[sensorNum] IndexError: list index out of range

Enabled debugging in init plugin file line 25 : isDebugging = True

Reboot then :

2022-04-28 17:24:41,387 - octoprint.plugins.emc2101 - INFO - EMC2101 plugin is alive! 2022-04-28 17:24:41,388 - octoprint.plugins.emc2101 - INFO - Checking for EMC2101 sensors.... 2022-04-28 17:24:41,842 - octoprint.plugins.emc2101 - INFO - EMC2101 crontroller number 0 is connected 2022-04-28 17:24:41,862 - octoprint.plugins.emc2101 - INFO - Failed to execute EMC2101 python subscript... 2022-04-28 17:24:41,889 - octoprint.plugins.emc2101 - INFO - EMC2101 timer is starting 2022-04-28 17:24:41,902 - octoprint.plugins.emc2101 - INFO - EMC2101 loop 2022-04-28 17:24:41,903 - octoprint.plugins.emc2101 - INFO - Reading sensor at 0 2022-04-28 17:24:41,906 - octoprint.plugins.emc2101 - INFO - Temperature for low fan speed is 22.000000 and temperature for high fan speed is 30.000000 2022-04-28 17:24:41,906 - octoprint.plugins.emc2101 - INFO - Low fan speed is 20 and high fan speed is 50 2022-04-28 17:24:41,906 - octoprint.plugins.emc2101 - INFO - Reading current values from EMC2101 sensors.... 2022-04-28 17:24:42,197 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'base_url': 'http://192.168.0.25/', 'path': '/', 'query_string': 'l10n=en'} 2022-04-28 17:24:42,264 - octoprint.plugins.emc2101 - INFO - Temperature is 23.000000 and actual fan speed is 872.200000 2022-04-28 17:24:42,265 - octoprint.plugins.emc2101 - INFO - Calculated fan speed is 23 2022-04-28 17:24:42,265 - octoprint.plugins.emc2101 - INFO - Setting EMC2101 0 fan speed to 23.... 2022-04-28 17:24:42,964 - 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 2110, in _processTemperatures parsedTemps = hook(self, parsedTemps) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/init.py", line 1737, in wrapper return f(*args, **kwargs) File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emc2101/init.py", line 543, in get_graph_data temps = self.temperatures[sensorNum] IndexError: list index out of range

Tried to heat up to 30 degree but no effects....

Look like plugin initialize but can't run every 2s and can't update pwm EMC2101.... any ideas? I can do more tests but my python's skills are not really good... Thanks

etellier commented 2 years ago

I've downgradeed to 0.0.4 and it's working : 2022-04-28 22_09_16-OctoPrint 2022-04-28 22_10_41-OctoPrint

JeremyLaurenson commented 2 years ago

Let me take a look, sorry for the issue.

etellier commented 2 years ago

Hi Jeremy. I've tried another version : 0.0.6 and it is working. the bug is just with last release. Thanks for your time and work.

cybergurke commented 2 years ago

I can confirm the behavior with the last release.

be221b commented 2 years ago

Same issue. Any fixes?

JeremyLaurenson commented 2 years ago

Ok, I believe I just pushed a working fix in 0.0.8 - please confirm if you would.

cybergurke commented 2 years ago

Thank you, its working now. How can I get the temps to the Temperatures tab?

etellier commented 2 years ago

Thanks, it's working now with a single EMC2101.