I am looking for a way to power on/off a 230V power connector from software.
The most ideal way would be if it could be controlled from linux, but anything could be ok.
Hardware Recommendations Stack Exchange is a question and answer site for people seeking specific hardware recommendations. It only takes a minute to sign up.
Sign up to join this communityYou need a relay, probably driven by USB. Examples: Yocto-PowerRelay, Cleware USB switch, EnerGenie EG-PM2 (found by a web search, I'm not endorsing these particular products or vendors).
Lots of people use a Raspberry Pi or similar boards to control mains-powered appliances, so you'll find lots of discussions around this topic in their communities. You can build something cheaper if you do some of it yourself, but don't do that unless you're comfortable working with mains power — you could fry your hardware or worse, fry yourself. If you already have a RPi or Arduino in your system, you can get specialized peripherals for a bit cheaper, e.g. SainSmart 8-Kanäle RelaisModul or PowerSwitch Tail for Arduino (and see this thread on Arduino SE), Pi-Face Digital for RPi (and see these threads on Raspberry Pi.SE), etc. There's quite a bit of material around on using the PowerSwitch Tail with either Arduino or Raspberry Pi.
Whatever product you use, take care not to exceed its maximum amperage.
I have EnerGenie EG-PM2 and was very fast to install and use on Linux/Ubuntu, steps here:
Install sispmctl
wget https://downloads.sourceforge.net/project/sispmctl/sispmctl/sispmctl-4.9/sispmctl-4.9.tar.gz
tar xzvf sispmctl-4.9.tar.gz
cd sispmctl-4.9/
sudo apt install libusb-dev
./configure
make
sudo make install
sispmctl
cp ./src/.libs/libsispmctl.so.0 /usr/lib #this command should be done after sudo su
sispmctl
The outlet has 4 ports, example to operate off and on port 1 you do the following commands
Turn off and on port 1
sudo sispmctl -f 1
#Accessing Gembird #0 USB device 053
#Switched outlet 1 off
sudo sispmctl -o 1
#Accessing Gembird #0 USB device 053
#Switched outlet 1 on