I want to autoconnet prusa mk3s to RPI 3B+

What is the problem?

I have a prusa mk3s and a Raspberry Pi 3B+ with octoprint and a relay to turn off the printer by software. At the moment I have to manually set Serial Port to /dev/ttyACM0 and Baudrate to 115200 and click "connect", then go to prusaslicer and finally send to octoprint. I would like to skip the "connect" step: turn on the relay of the printer and it automatically connect to octoprint so I can use only prusaslicer to send the gcode and start the print.

What did you already try to solve it?

The option "Auto-connect on server startup" is checked.
I installed the plugin "PortLister" but nothing changed.
Years ago I used Cura instead of prusaslicer and if I remember correctly there was a button to connect directly there. Maybe is there something like that on prusaslicer too?

Have you tried running in safe mode?

No

Did running in safe mode solve the problem?

No

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

WRITE HERE

Additional information about your setup

OctoPrint version: 1.8.1, OctoPi version: 0.18.0, printer: prusa mk3s, firmware: 3.10.0-4481, browser: chrome, operating system: windows

Thank you

Are you using an OctoPrint plugin to control the relay?

yes and not, I use "enclosure plugin" to toggle the relay by software and a python script to toggle the relay by a phisical button next to the printer