I've had my setup working for a while now, but all of a sudden, I'm no longer able to control a relay using the 'PSU control' plugin. I've got a double-relay with one relay used to control LED lights, and the other relay (i.e., the one that is no longer working) controls the power supply to my Prusa i3 MK3S printer. I had previously wired everything correctly, similar to what was described on another thread (PSU Control relay won't switch). However, I have the relay VCC connected to 5V pin 4 on my RPi 4 Modle B rev 1.2, while GND is to pin 6. The input pin for the power supply relay is pin 18, which is GPIO24.
What I can't figure out is why this stopped working all of a sudden, and I can't figure out if this is a hardware issue (e.g., relay has failed) or software issue (e.g., PSU control plugin has changed). Does anyone have advice on what to test first? I can provide my Octoprint logs, which shows that the PSU control plugin is sending a signal to activate the relay, but nothing happens.
Any assistance here is appreciated, and thanks in advance for the help!
Thank you, @kantlivelong, but I'm hopeful you can provide a bit more context as I'm a novice here. From what I'm reading, it appears that sensing (or lack thereof) may be the issue I'm experiencing. I've always used internal sensing, so it looks like I need to try either GPIO or System Command sensing. Would you agree? I would need to run a new wire to allow for an additional GPIO connection on my RPi, and I'm not sure what that would connect to on the relay end. As for the System Command option, I read your description, but I'm not sure what needs to be entered for 'Sensing System Command' (0? 1?).
@kantlivelong, please ignore my request. I have figured out the root cause here and it wasn't sensing (I set that back to internal). Instead, I had originally configured the plugin to use physical pin 18 and I missed the fact that this had to be switched to BCM numbering (GPIO24, in my case). Sorry for the hassle, but thank you again for the reply!
At least it was simple. There was a bug with BOARD->BCM conversion for those upgrading to 1.0.0+ but should be resolved now in 1.0.4 but if the upgrade already occured it wouldn't attempt to convert again.