PSU Control - API Error

I'm receiving an error when I attempt to use the API in Shawn Bruce's PSU Control plugin. I need to make an API call to turn the printer on from my Python application, with the plugin then handling connecting to the printer (serial is off when power is off), however when I make the POST request I receive the following:

'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>'

The same is received if I use the example CURL script in the docs, for reference (key removed)

curl -s -H "Content-Type: application/json" -H "X-Api-Key: myapikey" -X POST -d '{ "command":"turnPSUOn" }' http://192.168.0.21/api/plugin/psucontrol

The plugin is configured with the following settings:

Warning: Yes
GPIO Mode: Board
Switching: GPIO Pin (switches relay on power)
Pin: 8
Invert: Yes (Defaults to open so usable if RPi breaks etc)
Enable GCODE switch: False (would love this to work, but as serial is turned off when power is off all commands are rejected - in an ideal world I would just put M81 at the start of a GCODE file and the plugin would intercept, turn on, connect and start printing)
Auto on: No
Post delay: 10 sec
Auto off: No
Disconnect on power off: Yes

If I supply the wrong API key I receive 'Forbidden', but I assume this is handled pre-plugin, if I omit the Content Type header I receive 'Expected content-type JSON'

Hopefully that's enough to go by, hope someone can help.