tellive_core_connector v0.4.1 - connect Tellstick to Live

Moderators: hekj, Telldus

Post Reply
erijo
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

tellive_core_connector v0.4.1 - connect Tellstick to Live

Post by erijo »

I've just released version 0.4.1 of my Python wrapper for Telldus live tellive-py and thought it was time to announce the program included there, namely tellive_core_connector. The purpose of this program is to connect your Telllstick or Tellstick Duo to Telldus Live, similar to TelldusCenter.

The program is implemented in Python and doesn't require any graphical user interface (i.e. you can easily run it on your server). The installation is as simple as

Code: Select all

pip install tellive-py
Running the program requires a configuration file, but one will be created upon the first run. Just specify the where to store it, like this:

Code: Select all

$ tellive_core_connector ~/.config/tellive.conf
The first time you run the program (with a particular config file), it will exit and ask you to visit a given URL to give the program access to your account.

When you have done so, you can then edit the config file (~/.config/tellive.conf in this example) and add a name to the sensors that you wish to send to Telldus Live. You can also disabled devices that you don't want to be controllable via Telldus Live (see tellive_core_connector --help for more info). Then start the program again as above.
Python wrapper for Telldus Core: tellcore-py
Python wrapper for Telldus Live: tellive-py
metalic
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Liv

Post by metalic »

Hi! Excellent.

Is it possible to have a step by step?
I have telldus core installed on my raspberry pi. I used a image gorhak created with Switchking already installed. Everything good, except no connection to Telldus Live! and that is needed so applications like Tellevent work on iOS devices.

I think your software will make this happen. Can you just guide me like real basic?
Do I need tellcore-py even if I have telldus core installed?

Thanks!!
erijo
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Liv

Post by erijo »

Yes, you need tellcore-py. Tellcore-py is a python wrapper around telldus core. Tellive-py uses tellcore-py to communicate with the tellstick.

The easiest way is to use pip to install tellive-py (see above), but it can also be done manually. Assuming you have downloaded tellcore-py 1.1.0 and tellive-py 0.5.2 which is the latest versions as of this writting, you would do:

Code: Select all

$ tar zxf tellcore-py-1.1.0.tar.gz
$ tar zxf tellive-py-0.5.2.tar.gz
$ PYTHONPATH=tellcore-py-1.1.0:tellive-py-0.5.2 ./tellive-py-0.5.2/bin/tellive_core_connector tellive.conf
The program will connect to the server, generate an activation URL and exit. You need to copy the URL to a browser, load it and log in to telldus live to activate tellive_core_connector. Once you have done so, run the last command again. Append --help to the command to get some more help.
Python wrapper for Telldus Core: tellcore-py
Python wrapper for Telldus Live: tellive-py
linorgious
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am
Location: Norway

Re: tellive_core_connector v0.4.1 - connect Tellstick to Liv

Post by linorgious »

Nice work:-)
I've installed the connector using pip. Being unfamiliar with Python and pip, can you tell me where the path to script files?
**creativity, philosophy, history, humanity, technology**
erijo
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Liv

Post by erijo »

linorgious wrote:Nice work:-)
I've installed the connector using pip. Being unfamiliar with Python and pip, can you tell me where the path to script files?
You can use pip to list all installed files:

Code: Select all

pip show -f tellive-py
Python wrapper for Telldus Core: tellcore-py
Python wrapper for Telldus Live: tellive-py
svesjo
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Live

Post by svesjo »

Hi , I have some issues to get it to work :/

pi@raspberrypi:~ $ tellive_core_connector ~/.config/tellive.conf
Traceback (most recent call last):
File "/usr/local/bin/tellive_core_connector", line 21, in <module>
from tellive.tellstick import TellstickLiveClient
File "/usr/local/lib/python2.7/dist-packages/tellive/tellstick.py", line 20, in <module>
import http.client as http
ImportError: No module named http.client
pi@raspberrypi:~ $


pip show -f tellive-py
---
Name: tellive-py
Version: 0.5.2
Location: /usr/local/lib/python2.7/dist-packages
Requires: tellcore-py, oauthlib
Files:
Cannot locate installed-files.txt

I can see that I have two versions of Python installed
pi@raspberrypi:~ $ python3 -V
Python 3.4.2
pi@raspberrypi:~ $ python -V
Python 2.7.9

Is that the problem with the import problem above? I'm very new to Python
//Sven
erijo
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Live

Post by erijo »

tellive-py requires python 3. You probably need to use pip3 to install it. First uninstall it with

Code: Select all

pip uninstall tellive-py
and then install it with pip3.
Python wrapper for Telldus Core: tellcore-py
Python wrapper for Telldus Live: tellive-py
rsafors
Posts: 8
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Live

Post by rsafors »

I had the same problem as svesjo but i solved it with a reinstallation of Pip3, unfortunately this crashed the configuration of FireMotD so i had to reinstall that to and reconfigure the exportfile.
Now it works great when i start Tellive from the cli but i can not get it to autostart when i reboot the server. I have tried to use both cron and rc.local but i can not get it to work. This should be quite simple but i can not figure out the correct command!

Can someone please give me instructions to get this to work?

/Patrik
erijo
Posts: 22
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Live

Post by erijo »

Check the system logs under /var/log and see if you find any clue there.
Python wrapper for Telldus Core: tellcore-py
Python wrapper for Telldus Live: tellive-py
rsafors
Posts: 8
Joined: Fri Mar 17, 2023 9:45 am

Re: tellive_core_connector v0.4.1 - connect Tellstick to Live

Post by rsafors »

Found the fault, had forgotten to give the command chmode x in the shell script!.... Well i am still a learner :?
Now it works great. Thanks!
Post Reply