Enclosure plugin and python scripts

Hi

I would like to control a servo which is attached to a adafruit 16-Channel PWM RPI hat, I have made a basic python script to rotate the servo.

Can anyone tell me how I can call this script with the enclosure plugin or if there is a better way to activate the servo from the plugin.

The basic idea is the servo will open an iris before an extraction fan will kick in when the enclosure get too hot.

Hello @Chris_Gilroy !

You may have a look on these:

Maybe they can give a hint how to do.

Thanks for the suggestion, but those look like they are wired to the gpio pins, mine is to a servo hat.

I unfortunately cannot help with the servo hat question, but I would LOVE to see the "iris" and actuation mechanism you are using. I've wanted to do exactly what you suggest with a fan on my enclosure (i.e., close it off when fan not running) but have not found any good iris or louver system I could easily adapt.

Just printing the bits now to see how well it works, currently my plan is to use home assistant as i can trigger the python script once a set temperature has been reached

Fancy
Me likey :tentacle: