So basically I have set up an arduino to fuction with SIO using the example sketch, which I pretty easily modified to work, then I set up PSU Control and SIO to have the PSU pin on IO9, which in my case is GPIO12 on the arduino.
When I type M80 in the terminal the PSU turns on, and turns off with M81, it also functions with the button that it places at the top of the web ui, leading me to think that I set up the controler corectly, however;
When I upload a G-Code, to the print server i get a "PSUControl: ok" response but the powersupply does not turn on and the icon for power does not change color.
Here is how I set everything up, where am I going wrong?
Thanks in advance for any respose!
If the button at the top, (the lighting bolt) turns on(green) and off(grey) and SIO [IO9] follows that. You have SIO setup and working correctly. It sounds like the Before print and After print use cases for the PSU Plugin are not working for some reason.
Although the sensing method looks off. It should also point to the SIOControl. So looking at your setup.. the PSU Control does not know the state of the IO Point.
Doing a little testing.. There does seem to be an issue in the SIO Control. Its permissions related. I have to look a little more.Looks like the user context is different when the command is coming from the GCode Script.
I think if you were to look at your log you would see something like this:
2023-05-12 18:25:09,342 - octoprint.plugins.psucontrol - INFO - Switching PSU On
2023-05-12 18:27:40,879 - octoprint.plugins.psucontrol - ERROR - Error while executing callback <bound method SiocontrolPlugin.turn_psu_on of <octoprint_siocontrol.SiocontrolPlugin object at 0x0000022FB2C84160>>
Can you confirm ?
I corrected the issue and created an update. v0.6.3
If you update you should not have this issue any longer.
I still suggest that you correct the sensing setup in the PSU Control settings. Otherwise I dont think the PSU control can tell the proper state of the IO Point.
Hello, sorry for the late reply,
After updating the plugin everything works flawlessly.