If you have any issues please check these FAQ first to see if that can help you with your problem. If not, don´t hesitate to contact us!

In order to receive readings from sensors sent to a Tellstick Duo you have to whitelist them. To do this you need to know the ID that is used in HomeAutomation.

To get the ID you first run the following command:
tdtool --list-sensors

In the output you see all sensors from which your Tellstick has received readings since the Telldus service was last restarted. Find the rows that are relevant to you. If it’s a temperature sensor the ID is constructed using the formula protocol-model-id. If it’s another sensor you should add the reading type to the end.

Examples:
Here are some rows from my tdtool –list-sensors:
type=sensor protocol=fineoffset model=temperature id=167 temperature=28.1 time=2016-12-07 08:18:04 age=6
type=sensor protocol=oregon model=2914 id=11 rainrate=0.0 raintotal=145.1
type=sensor protocol=fineoffset model=temperaturehumidity id=244 temperature=-62.5 humidity=25 time=2016-11-26 08:53:03 age=948307

The first one is temperature only. The ID of that sensor would be fineoffset-temperature-167.

The second one is reporting two values, rainrate and raintotal (ie it’s reported as two different sensors). The ID’s for those sensors are oregon-2914-11-rainrate and oregon-2914-11-raintotal.

The last one reports both temperature and humidity. In order to whitelist both the ID’s used are fineoffset-temperaturehumidity-244 and fineoffset-temperaturehumidity-244-humidity.

There are two ways to do this:
Using Telldus script execution
This is the preferred way if your server is running Linux, since you’ll get the readings directly into HA without delay. It doesn’t work on Windows though.

1. Create the directory /usr/local/share/telldus/scripts/sensorevent (you might need to create more of the levels in the path). Easiest way to do this is with this command (logged in as root):
mkdir -p /usr/local/share/telldus/scripts/sensorevent
2. In the directory you just created, create a file containing the following code:
#!/bin/bash

declare -A whitelist=([oregon-2914-11-rainrate]=1
[oregon-2914-11-raintotal]=1
[fineoffset-temperature-248]=1)

timestamp=$(date +"%d %b %T")

extraarguments=""

case ${DATATYPE} in
1)
haid="${PROTOCOL}-${MODEL}-${SENSORID}"
;;
2)
haid="${PROTOCOL}-${MODEL}-${SENSORID}-humidity"
;;
4)
haid="${PROTOCOL}-${MODEL}-${SENSORID}-rainrate"
;;
8)
haid="${PROTOCOL}-${MODEL}-${SENSORID}-raintotal"
extraarguments="&calculatevalues=true"
;;
16)
haid="${PROTOCOL}-${MODEL}-${SENSORID}-winddirection"
;;
32)
haid="${PROTOCOL}-${MODEL}-${SENSORID}-windaverage"
;;
64)
haid="${PROTOCOL}-${MODEL}-${SENSORID}-windgust"
;;
esac

if [[ ${whitelist["$haid"]} ]] ; then

echo "${timestamp} - ${haid} -> ${VALUE} " >> /tmp/tdsensor.log

url="http://localhost/homeautomation/api.php?do=sensors/setValue&serial=${haid}&name=${haid}&value=${VALUE}${extraarguments}"

wget --header='Accept-Language: sv' -qO- "${url}" &> /dev/null

fi

(the name of the file doesn’t matter, call it whatever you want)

3. Edit the whitelist in the file to match the names of your sensors. You might need to edit the url as well, depending on where your HA installation is.

4. Change the file permissions so that it’s executable. Use something like the following command:

chmod a+x

5. Restart the telldus service.

Using the Weather Parser
This is a program that you schedule to run at regular intervals and which then collects the values from various systems.

1. Go into the parser directory in your homeautomation directory.

2. If it’s the first time you’re setting up the parser, rename parser_config_sample.php to parser_config.php

3. Edit parser_config.php, simply uncomment (remove the //) the systems you want to use. In this case the telldusduo line

4. Configure each enabled system in their own config file, eg system_config\telldusduo.php. Put your sensors in the whitelist.

5. Run the parser manually to see that it works:

php path-to-parser\parser.php

5. Add a cron job (Linux) or scheduled task (Windows) that executes the parser (command above) with an interval of your choice, typically every five minutes:

On *nix systems you must verify that the web server user is not listed in the any of at.deny or cron.deny. Also verify that AT is installed and that the AT daemon is running.