This is a python plugin for Domoticz which allows you to switch things via your Raspberry Pi's pins.
How it works
If you enter a list of GPIO pins, the plugin will automatically create switches for those pins. It does this by exporting those pins via the SYSFS system, and then toggling them. It does all this via sudo shell commands.
Download the plugin from Github, and place it into a folder under your plugins directory.
I think you also have to make the plugin file executable. Navigate to the plugin directory and type:
chmod +x plugin.py
In this first version of the plugin using 1 pin is totally safe, as is adding pins.
However, if you have a list of pins and decide to switch the pin numbers around in that list, or to remove a pin form it, then you may have a problem. The switches in Domoticz will then be swapped as well.
The same goes for removing a switch in Domoticz. If you do, then the order changes and switches may start pointing to other PGIO pins than you expected.
The pins are not set before the plugin is loaded. So when you reboot your raspberry pi, it will change the state of the pins.
Also, when you restart Domoticz, the pins are temporarily released and recreated. This effectively means the switch is turned off for a second or two.