However I call it in Domoticz (either ON|OFF on a dummy switch, or calling from a shell script or from a Lua script) it will not work and returns an error 256.
I suspect that it's because the script is loading a non-standard module that can't be found. I have tried appending the module path to sys.path (in the .py), but this makes no difference.
Apart from telling me the solution

1. Does Domoticz run only a certain version of Python?
2. Does Domoticz need to use a special location for script modules to load successfully?