edekeijzer / OctoPrint-PSUControl-Shelly

GNU Affero General Public License v3.0
10 stars 6 forks source link

Multiple Shelly-devices #6

Closed LavtRidende closed 3 years ago

LavtRidende commented 3 years ago

Are there any plans to expand to enable multiple devices that can be switched individually?

I'd like a couple to do a complete shut down, including the Octoprint as the very last stage. It would also give the opertunity to control lights individually.

I'm thinking of using GPIO and relays for LED-lighting, but if this is implemented I might not bother with it, making a 3-way cord controlled by a Shelly is easier in my book. And tidier, as it is set apart from the printer and doesn't clutter up around the bed.

edekeijzer commented 3 years ago

It's a nice idea, but this plugin is only an extension to the PSUControl plugin that supplies a way to connect to the Shelly API, which is mainly targeted at switching power of the printer itself. Implementing this would also leave you with a catch-22: you'd want to shut down Octoprint and its OS before sending the signal to the Shelly to prevent corruption of your SD card, but at the same time you can no longer send any commands when the OS is shut down. You'd also need to wire a switch to the Shelly to turn on the power if you'd want to start Octoprint up again.