kantlivelong / OctoPrint-PSUControl

Smart control of your power supply via GPIO, GCODE Command, System Command, or variety of sub-plugins.
GNU Affero General Public License v3.0
202 stars 112 forks source link

KeyError: 'switch' #246

Closed Ivosch closed 1 year ago

Ivosch commented 2 years ago

What were you doing?

Almost everytime when Im trying turn on the printer by toolbar PSU button (Toggle PSU), nothing happen. The printer remains off. Typically I dont switch printer off manually. The printer is swithing off automatically by PSU Control plugin. It works fine.

I found error in octoprint.log when trying turn on the printer:

2022-07-22 21:34:00,395 - octoprint.plugins.psucontrol - INFO - Switching PSU On 2022-07-22 21:34:00,395 - octoprint.plugins.psucontrol - ERROR - Exception while writing GPIO line Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_psucontrol/init.py", line 478, in turn_psu_on self._configuredGPIOPins['switch'].write(pin_output) KeyError: 'switch'

Version of OctoPrint-PSUControl

1.0.6

Operating System running OctoPrint

OctoPrint 1.8.1 Python 3.7.3 OctoPi 0.18.0

Printer model & used firmware incl. version

Voron 2.4, Klipper Git version: u'v0.10.0-42-g64e46498'

Link to octoprint.log with octoprnt.plugins.psucontrol set to DEBUG

https://pastebin.com/0x92UGHQ

kantlivelong commented 2 years ago

https://github.com/kantlivelong/OctoPrint-PSUControl/wiki/Troubleshooting#how-to-provide-logs