Search found 3 matches

by lew_for
Fri Mar 17, 2023 9:45 am
Forum: General
Topic: TellStick + Python
Replies: 3
Views: 7671

TellStick + Python

Hello, I have done some research on using Python with the TellStick, and have managed to get it working, with the tellcore-py wrapper. Although I don't entirely understand how to use it. The code I have written is very bad, but it does the job for now. Could someone please help me optimise it. I can...
by lew_for
Fri Mar 17, 2023 9:45 am
Forum: General
Topic: TellStick + Python
Replies: 3
Views: 7671

Re: TellStick + Python

I'll reply here too then. So if my device is called 'Switch' in the .conf file, the code you provided: devices = core.devices() for device in devices: if device.name == "Switch": device.turn_on() That will turn on Switch? So if I save that to on.py, that will find and turn on my switch? Th...
by lew_for
Fri Mar 17, 2023 9:45 am
Forum: General
Topic: Python + URL Params
Replies: 1
Views: 4812

Python + URL Params

So I have finally got a web interface setup, and I can visit example.com/cgi-bin/on.py and it will turn my socket on, I don't know much python though, so I was wondering if it would be possible to control the power/device via the URL? This is the code I am currently using: print "Content-Type: ...