I actually played around with togglePSU. It was a matter of simply changing the command in the PSUOn.sh to togglePSU. However, I never did get around to testing it while printing and I didn't know what PSU Control's behavior is when turning the printer off when not using the Octoprint UI. Have you tried toggling it while printing?
Is it possible to drive a relay with the command "get" : i try the PSU control, but i just think i can put a esp8266 on the relay (x2) to control ON/OFF with 2 GPios of a Wemos D1 Mini...
But i am not good enough to modify your code...can you help a bit please?
The goal is to clic on the PSU Control button in Octoprint and activate the gpio of the Wemos D1 Mini, who activate the relay.
Sure, I'll try to help you out. But I don't understand what you're trying to do just yet. What are you trying to turn on/off with the relay? You do know PSU control can use a relay to turn the printer on and off, don't you? That's what this code does. Help me understand what you're trying to do.
but what i want is use a esp8266 to control one or more relay (easy, no problem) but remote commands buy the RPi in octoprint.
The example above is for 2 input button on esp8266 that give info to Rpi on Octoprint, i just want to do the inverse : RPi command the esp8266 to put a Gpio High and down...
That why i ask if i have to use the "GET" command in the arduino program above?
thanks, really interesting, but no info about use of LAMP instead of a cloud, i hate cloud...no internet, nothing work, and i dont even think about privacy...lol
no change there is a pluging in Octoprint to do that...
I personally don't know of a turn-key plugin solution but that doesn't mean it doesn't exist. You might want to search the forum here, this is a popular topic I'm sure.
I know that I did a "big red switch" project (BRB) to solve a problem I had. My advice is for you to create a personalized solution to your problem.