Skip to main content

Listen for UDP sensor broadcasts from a Tellstick

Project description

[![Build Status](](

Interface with a Tellstick Net device on the local network bypassing the Telldus Live cloud service (events are still passed through the Telldus Live cloud service).

Use cases
- The Tellstick Net device is on a poor connection, such as a mobile broadband subscription in the summer house
- Archival of sensor readings
- Faster sensor updates than from the Telldus live service
- Instant updates for sensors such as door sensors.

There is no support for local access to Tellstick Net in the [telldus-core][1] or [tellcore][2] libraries. This Python implementation tries to fill the gap. Unfortunately, the [Protocol::decodeData method][3] is not exposed in the telldus-core library, so the protocol parsing is reimplemented in Python.



> ./script/discover # (or python3 -m
[('', ['TellStickNet', '<MAC>', '<CODE>', '17'])]

Listen for received packets and print parsed values
> ./script/listen 2>/dev/null # or python3 -m tellsticknet
{'model': 'temperaturehumidity', 'data': {'humidity': 31, 'temp': 18.1}, 'lastUpdated': 1459502928, 'sensorId': 104, 'protocol': 'mandolyn', 'class': 'sensor'}
{'model': 'temperaturehumidity', 'data': {'humidity': 34, 'temp': 16.7}, 'lastUpdated': 1459503006, 'sensorId': 135, 'protocol': 'fineoffset', 'class': 'sensor'}

Listen for raw packets and dump to file
> ./script/listen raw 2>/dev/null | tee packets.log
2016-04-01T11:39:15 7:RawDatah5:class6:sensor8:protocolA:fineoffset4:datai41B03B4DAAss
2016-04-01T11:39:17 7:RawDatah5:class6:sensor8:protocol8:mandolyn5:model13:temperaturehumidity4:datai13413986ss

Parse previously dumped packets
> cat packets.log | ./script/parse
{"class": "sensor", "data": {"temp": 5.9, "humidity": 77}, "model": "temperaturehumidity", "sensorId": 27, "lastUpdated": 1459503555, "protocol": "fineoffset"}
{"class": "sensor", "data": {"temp": 7.5, "humidity": 65}, "model": "temperaturehumidity", "sensorId": 11, "lastUpdated": 1459503557, "protocol": "mandolyn"}

Display all sensors
> cat packets.log | ./script/parse | jq ".sensorId" | sort -n | uniq

Export temperature readings as csv
> cat packets.log | ./script/parse | jq '[.sensorId, .lastUpdated, .data["temp"]] | @csv'

Archive all packets, one file per day
> ./script/dump | tee >(cronolog packets.%Y-%m-%d.log)

Start MQTT gateway, forwarding all sensor readings to a MQTT server (where Home Assistant can be a subscriber), also receive any commands from the server (e.g. from Home Assistant)
> ./script/tellsticknet mqtt -vv

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tellsticknet-0.1.2.tar.gz (20.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page