mkuf / prind

print in docker - Deploy a containerized Klipper Stack for your 3D Printer
GNU General Public License v3.0
324 stars 82 forks source link

Configuring smart plug with mainsail #100

Closed jhugs closed 10 months ago

jhugs commented 10 months ago

Description

Trying the set up a tplink kasa smart plug with the following in moonraker.conf from the mainsail docs + some additional options I've seen in other people's configs:

[power printer]
type: tplink_smartplug
address: ...
bound_services: klipper
off_when_shutdown_delay: 0
off_when_shutdown: True
locked_while_printing: True

I get an error saying the bound service klipper is unavailable, I'm assuming because it's running in the container. The plug still works from the drop down menu, but what does not work is the custom power UI when the printer is shut down. Any help / guidance is appreciated.

mkuf commented 10 months ago

Hi there,

looking at the moonraker config docs, you'll definitely have to remove the bound_services key from your moonraker config. This will get rid of the error message about the service being unavailable.
When running in a container, there is no way for moonraker to control any service.

Can you give more details about the custom power UI you mentioned?
Where is this configured and how do you access it? Is it specific to the used frontend?

-Markus

jhugs commented 10 months ago

Thanks for the quick response!

Ah, alright that makes sense, I'll get rid of that.

The UI I'm talking about (that I'm not seeing in my UI, but would like to) can be seen here

mkuf commented 10 months ago

Looking at the docs you linked, there does not seem to be a way to get the prompt when bound_devices: klipper is not set. And setting it will cause an error so that the prompt also is not displayed.

From the hosting side, there is nothing that can be done here.
Maybe there is a setting in mainsail that enables this prompt even if the service is not defined. The Mainsail maintainers/Support group may be able to help you with that.