Last active
August 29, 2015 13:57
-
-
Save peterhellberg/9650927 to your computer and use it in GitHub Desktop.
Script that adds my lamps to the TelldusService
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# This script requires tellcore-py, Python and the Telldus Core library | |
from tellcore.telldus import TelldusCore | |
core = TelldusCore() | |
# Remove all devices | |
for device in core.devices(): | |
device.remove() | |
# Add my lamps | |
devices = [ | |
core.add_device(u"Skrivbordet", "arctech", "selflearning-switch", house=59563515, unit=2), | |
core.add_device(u"Hörnlampa", "arctech", "selflearning-switch", house=26286707, unit=2), | |
core.add_device(u"Sovrum", "arctech", "selflearning-switch", house=44411904, unit=2), | |
] | |
# Make sure all lamps are turned off | |
for device in devices: | |
device.turn_off() | |
# Create a group for all lamps | |
core.add_group("Lamps", devices) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installing Telldus Core under OS X Mavericks (10.9)
I managed to compile telldus-core by applying the patch mentioned in Ticket #353 on the Telldus Developer Trac.