Hello,
the internal functions sispm_switch_on and sispm_switch_off should check the state of the outlet before sending the usb action.
If I call the "sispmctl -o 1" command frequently on an already active outlet it can happen that the relay(outlet) turns off(or fails?)
To prevent this and also to prevent unecessary usb commands, the code should check the state of the outlet before sending the command.
In addition to this it is more efficent to do the check in the program directly.
Checking the state in a third party application would require to start the program two times and two times parsing the output. Starting a program creates a lot of overhead.
So I would highly request such a check in your software.
Thank You
I made a patch file.
Thanks for the patch. I will have a look at it :)