Custom Power Control on MaaS

Hello, I’ve seen a few posts around the web about how to bring back WoL as a Power Control mechanism but i’ve been unable to get a solution going.

Moreover, i do feel that the current interface lacks support for future (and past) or custom Power Control units.

I feel it would be excelent if the interface would allow ‘custom scripts’ to be run to power up/down the remote machines. Perhaps a simple ‘bash script’ would suffice.


While I understand the discontinued support for WOL I think there should be a custom/plugin Power Control mechanism.

Many are developing custom power control mechanisms in particular for IOT devices.

1 Like

I’ve written a generic webhook power driver. It’s simple and let’s me interface with whatever I’d like. In my case I push the power commands to Node-RED and then use that to control simple tasmota based power adapters but you could obviously build whatever logic you needed in the endpoint (run ssh commands, control relays, etc).


where is it? will it be released with MAAS?

@rvallel, as luck would have it, we released 2.9.2 on Tuesday, which includes a webhook power driver. you can read more about it here. more documentation is forthcoming.

1 Like

cool! will definitely play with it.

@billwear @travisghansen just noticed it got auto-upgraded in my snap!!

Very exciting.


While not supported I put together a simple WoL webhook server which you can use as a base for your own custom power control.

The webhook did open many possibilities, but it requires me to keep it alive.
I’m suggesting a ScriptPowerDriver where we can just give a script path on the local MaaS server and it will run it accordingly.
So the main solution it gives is not maintaining a webhook server.

snapd prevents MAAS from accessing files outside of the Snap. We wanted to respond to the community request to add third party power driver support in a way that would work for both the Debian package and Snap.

Can we use bashttpd as a local webserver to redirect/inject code in the local machine?

Bashttpd is a great solution for lab/secure environments (unsuitable for production)

As long as it responds to standard web requests MAAS doesn’t care what the server is. I haven’t used bashhttpd myself.

I’m not really familiar with snap internals.
Is it not possible to put the script on another path on the server and point to it with the ScriptDriver?
If we want to have the script inside maas we can store it as blob in the db and load it when need to run.
Is it not possible?