To use the controller, a config file is needed. pilight-control can then easily switch devices by using their config name. This allows for controlling devices without having to remember all different ID numbers.
root@pi:~# pilight-control -d bookshelf
The config file will automatically be updated with the status of the configured devices. So while sending, but also while receiving.
To force the device in a specific state:
root@pi:~# pilight-control -d bookshelf -s on
To also simultaneously change the value a device such as a dimmer you can use:
root@pi:~# pilight-control -d main -s on -v dimlevel=1