erijo / tellive-py Goto Github PK
View Code? Open in Web Editor NEWPython wrapper for Telldus Live
License: GNU General Public License v3.0
Python wrapper for Telldus Live
License: GNU General Public License v3.0
I get the following error:
2014-11-20 07:32:08,748 DEBUG: Client is registered, supported methods: 0x3d7 -> 0x3d7
2014-11-20 07:32:08,999 ERROR: Communication error:
Traceback (most recent call last):
File "/usr/local/bin/tellive_core_connector", line 303, in
main(config[section])
File "/usr/local/bin/tellive_core_connector", line 226, in main
report_devices(supported_methods)
File "/usr/local/bin/tellive_core_connector", line 166, in report_devices
client.report_devices(devices, supported_methods)
File "/usr/local/lib/python3.2/dist-packages/tellive/tellstick.py", line 167, in report_devices
self.send_message(message)
File "/usr/local/lib/python3.2/dist-packages/tellive/tellstick.py", line 112, in send_message
self.private_key, self.hash_method)
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 129, in create_signed_message
data = self.serialize()
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 142, in serialize
tokens = [LiveMessageToken(t).serialize() for t in self.tokens]
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 142, in
tokens = [LiveMessageToken(t).serialize() for t in self.tokens]
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 45, in serialize
items = [LiveMessageToken(m).serialize() for m in self.value]
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 45, in
items = [LiveMessageToken(m).serialize() for m in self.value]
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 52, in serialize
items.append(LiveMessageToken(value).serialize())
File "/usr/local/lib/python3.2/dist-packages/tellive/livemessage.py", line 55, in serialize
assert(False)
AssertionError
After this error is reported, tellive-py will try to reconnect, but the same error gets generated, and no communicaion with Telldus Live is possible.
The problem started when I added some new devices to my tellstick.conf. If I go back to the old tellstick.conf, tellive-py works as expected. There are no problems with using tdtool with the new config, so it is isolated to tellcore-py or tellive-py.
I use tellive-py 0.5.0 and tellcore-py 1.1.0
a new http connection is created for each request. this is not neccessary since the same connection can be reused for multiple requests. reuse the session if still connected. the Requests library can maybe be used.
I have tellive_core_connector running on a Raspberry Pi B. The software sends data from a temperatur/humidity sensor. Starting the software works fine, location gets online and data can be seen. However after some hours the data stream stops, but the location still reports online.
Checking the output from tellive_core_connector it still pings/pongs the server, but no data is received.
The sensors are located fairly close to the Telldus Duo so loss of sensor signal should not be a problem.
What can be done to find the error? Is this a problem with the tellive_core_connector or can it have something to do with other software on the system.
Regards
Olaf
The app has stopped sending sensor data to Telldus live, but it's different compared to issue #2 in that:
Log excerpt follows:
2014-05-06 19:20:25,092 DEBUG: Sending: b'28:5e457b92d739c4441548b498a859cc515f6a636878:B:SensorEventh8:protocol8:mandolyn9:sensor_idiDs5:model13:temperaturehumidityslh4:typei2s6:lastUpi536919D9s5:value2:63ss'
2014-05-06 19:20:48,019 DEBUG: Received: b'28:59fc427083682822da64c0e2cd2e879d1483d2566:4:pong'
2014-05-06 19:20:57,740 DEBUG: Sending: b'28:ec78b86b29ed209912a3813f88bb62553d8223d969:B:SensorEventh8:protocol6:oregon9:sensor_idi35s5:model4:1A2Dslh4:typei1s6:lastUpi536919F9s5:value4:20.1ss'
2014-05-06 19:20:57,741 DEBUG: Sending: b'28:e3b1ce4d9601be7865d6aaf08cf36831ca13724267:B:SensorEventh8:protocol6:oregon9:sensor_idi35s5:model4:1A2Dslh4:typei2s6:lastUpi536919F9s5:value2:32ss'
2014-05-06 19:21:11,033 DEBUG: Sending: b'28:56968e05b557c8a6df32739bd732ac4497f17c547A:B:SensorEventh8:protocol8:mandolyn9:sensor_idiCs5:model13:temperaturehumidityslh4:typei1s6:lastUpi53691A07s5:value4:21.6ss'
2014-05-06 19:21:11,035 DEBUG: Sending: b'28:647d8d9f9d6f376710c18fa740312df19853f31778:B:SensorEventh8:protocol8:mandolyn9:sensor_idiCs5:model13:temperaturehumidityslh4:typei2s6:lastUpi53691A07s5:value2:26ss'
2014-05-06 19:21:11,177 DEBUG: Sending: b'28:56968e05b557c8a6df32739bd732ac4497f17c547A:B:SensorEventh8:protocol8:mandolyn9:sensor_idiCs5:model13:temperaturehumidityslh4:typei1s6:lastUpi53691A07s5:value4:21.6ss'
2014-05-06 19:22:48,129 DEBUG: Received: b'28:59fc427083682822da64c0e2cd2e879d1483d2566:4:pong'
2014-05-06 19:23:11,252 DEBUG: Sending: b'28:6129697c4bb6179e8696877d36297326634db7ef6:4:Ping'
2014-05-06 19:24:49,460 DEBUG: Received: b'28:59fc427083682822da64c0e2cd2e879d1483d2566:4:pong'
2014-05-06 19:25:11,321 DEBUG: Sending: b'28:6129697c4bb6179e8696877d36297326634db7ef6:4:Ping'
2014-05-06 19:26:50,222 DEBUG: Received: b'28:59fc427083682822da64c0e2cd2e879d1483d2566:4:pong'
after that there is nothing but pings/pongs at the expected intervals until present time.
Trying tellive-py for the first time, (want to log sensor data), and my python skills are lacking. Getting this error when trying to connect using the tellive_core_connector script:
2015-10-30 15:42:54,187 ERROR: Communication error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646)
Also tried connecting using your API example, resulting in the same error:
(server, port) = client.connect_to_first_available_server()
Traceback (most recent call last):
File "<pyshell#22>", line 1, in <module>
(server, port) = client.connect_to_first_available_server()
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\tellive\tellstick.py", line 96, in connect_to_first_available_server
for server in self.servers():
File "C:\Program Files (x86)\Python 3.5\lib\site-packages\tellive\tellstick.py", line 64, in servers
conn.request('GET', "/server/assign?protocolVersion=2")
File "C:\Program Files (x86)\Python 3.5\lib\http\client.py", line 1083, in request
self._send_request(method, url, body, headers)
File "C:\Program Files (x86)\Python 3.5\lib\http\client.py", line 1128, in _send_request
self.endheaders(body)
File "C:\Program Files (x86)\Python 3.5\lib\http\client.py", line 1079, in endheaders
self._send_output(message_body)
File "C:\Program Files (x86)\Python 3.5\lib\http\client.py", line 911, in _send_output
self.send(msg)
File "C:\Program Files (x86)\Python 3.5\lib\http\client.py", line 854, in send
self.connect()
File "C:\Program Files (x86)\Python 3.5\lib\http\client.py", line 1237, in connect
server_hostname=server_hostname)
File "C:\Program Files (x86)\Python 3.5\lib\ssl.py", line 376, in wrap_socket
_context=self)
File "C:\Program Files (x86)\Python 3.5\lib\ssl.py", line 747, in __init__
self.do_handshake()
File "C:\Program Files (x86)\Python 3.5\lib\ssl.py", line 983, in do_handshake
self._sslobj.do_handshake()
File "C:\Program Files (x86)\Python 3.5\lib\ssl.py", line 628, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646)
-Daniel
On Mac OS X 10.9 Mavericks, I get the following after installing:
$ tellive_core_connector -d testconfig
2014-02-25 10:14:28,697 DEBUG: Fetching server list from api.telldus.com:443
2014-02-25 10:14:29,035 DEBUG: Found 10 available servers
2014-02-25 10:14:29,036 DEBUG: Connecting to ebba.telldus.com:45000
2014-02-25 10:14:29,151 INFO: Connected to ebba.telldus.com:45000
2014-02-25 10:14:29,151 ERROR: Communication error: [Errno 57] Socket is not connected
Traceback (most recent call last):
File "/usr/local/bin/tellive_core_connector", line 277, in <module>
main(config[section])
File "/usr/local/bin/tellive_core_connector", line 146, in main
callback_dispatcher = SelectableCallbackDispatcher()
File "/usr/local/bin/tellive_core_connector", line 91, in __init__
csock.shutdown(socket.SHUT_RD)
OSError: [Errno 57] Socket is not connected
2014-02-25 10:14:29,152 INFO: Reconnecting in 51 seconds
The testconfig
file contains the following after the above run:
[settings]
uuid =
debug = False
Also, I do not get a prompt to visit a URL when launching.
Please note that Python 3 is not installed as standard on Mac OS X 10.9, I installed manually it alongside python 2.7. I'm not entirely sure that python 3 is being used, don't know how to check that.
tellive_core_connector was launched correctly on system boot February 28 and has correctly reported sensor data and been able to remote control switches as expected. On March 17 at 18:35 CET (i.e about 17 days later) it stopped reporting sensor data and Telldus Live now reports the location as offline.
I have looked for error messages in the system logs, but haven't found anything. The python process is still running, nothing appears out of the ordinary.
System is Mac OS X 10.9.2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.