A simple API in front of the TellStick tdtool. (Written in Go)
The tdtool binary is installed when installing the TelldusCenter.
You can also find it in the telldus-core package. (You probably don’t need to install the GUI)
You will also need one of these:
And probably one or two controllable devices. (I’ve got the Nexa PB-3)
nohup ./tdtool-api &
This will try to start a web server on port 8080
curl http://localhost:8080/Number of devices: 4
1 Lights ON
3 Hörnlampa ON
2 Skrivbordslampa OFF
4 Sovrumslampa ON
curl -X PUT http://localhost:8080/2/onThis should output:
Turning on device 2, Skrivbordslampa - Success
curl -X PUT http://localhost:8080/4/offThis should output:
Turning off device 4, Sovrumslampa - Success
You can also make synchronous requests by adding /sync to the end of the path:
curl -X PUT http://localhost:8080/3/off/sync
