Configure the Telldus Service – Part 2

In part 1 we assured that the service was following best practice in linux be creating a separate ‘telldus’ user and letting the device handle also be owned by that ‘telldus’ user.
Now it is time to configure the light switches for the Telldus service. The light switches are defined in several JSON data structures, one for each light switch. The format is defined by Telldus on the following page.

For example here is the definition from /etc/tellstick.config of two switches from Conrad:

device {
  id = 1
  name = "wallswitch1"  
  protocol = "risingsun"
  model = "selflearning:conrad"
  parameters {
    house = "31942"
    unit = "1"
device {
  id = 2
  name = "wallswitch2"  
  protocol = "risingsun"
  model = "selflearning:conrad"
  parameters {  
    house = "32170"
    unit = "15"    
The id is a simple identifier increased for each switch. The name is a symbolic name of the switch which is posssible to use in bash commands or when using one of the API to the telldus service. Protocol/model is often easy to find out either by looking at page or googling. The parameters are dependant on the protocol/model but in the case of the risingsun protocol these identifiers are learnt by the switch during the selflearning sequence.

Once the telldus.config file is finished – start or restart the telldus service:

/etc/init.d/telldus restart
[ ok ] Restarting the Telldus TellStick daemon: telldusd.

The command ‘tdtool’ is a command utility communicating with the telldus service. Here are some examples.
List the switches defined above:

> tdtool --list
Number of devices: 2
1 wallswitch1 OFF
2 wallswitch2 OFF
Learn a selflearning-switch the parameters:
> tdtool --learn wallswitchxx
Turning on a switch:
> tdtool --on wallswitch1
Turning off a switch:
> tdtool --off wallswitch1

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s