BLE and Telldus Live Errors on new HASS 0.35.3 install on RPI3 AIO

Sorry for delay @molobrakos - Has been busy with work of late! Will work on testing this. Also planning on upgrading to latest HASS release, so will test with that.

1 Like

Saw on GitHub this was merged into the dev branch, but I am struggling to get that running in my venv :frowning:

That said, I am not getting the error, and I believe that is because I have already got this parameter specified in my persistence. I checked my logs on 0.37 and it’s clean.

1 Like

I am running the latest 0.37.1 and im getting a lot of telldus live errors.
Running the HASS AIO installation (prior to December 2016)
And i have been updating every relese.
These errors have been there for the latest 3 atlest, but i think its more versions than that.

This is a example from reboot last night to now (12h)

http://pastebin.com/2d9YAQU0

Thanks for reporting, @mcfrojd. I think I have an idea why you are getting these errors. This seems to occur when the server does not respond for some reason, and then the local state is cleared. This should make the device/sensor be marked as unavailable in HA. Are you using the sensor value in a template or something?

No telldus sensor value in any template.
I did find some faulty sensor references in some of my group cards.
sensor.2_kitchen_humidity instead for the correct sensor.kitchen_humidity.

@mcfrojd, do you have the ability to check out and test the updated version at https://github.com/molobrakos/home-assistant/tree/tellduslive?
I believe it should handle the case were the connection to the server is lost better.
(changed files: https://github.com/home-assistant/home-assistant/compare/dev...molobrakos:tellduslive)

I replaced the files now, will run for a couple of hours to se what happens.
When i look at yesterdays log it took 15h before the error appered, so i guess i have to wait untill tomorrow to see if it takes effect.

After about 7 h i got this now.

17-02-04 16:50:15 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] No route to host
17-02-04 17:00:09 ERROR (Thread-4) [tellduslive] Failed request: HTTPSConnectionPool(host='api.telldus.com', port=443): Read timed out. (read timeout=5)
17-02-04 18:23:59 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/selector_events.py", line 582, in _read_ready
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] No route to host

The one at 17:00:09 is tellduslive-related, and it just says that the server didn’t respond as expected. It seems to be properly handled (maybe the logging level could be changed to a warning).

Since then i have had only 2 more lines in my log.

17-02-05 23:15:08 ERROR (Thread-3) [tellduslive] Failed request: HTTPSConnectionPool(host='api.telldus.com', port=443): Read timed out. (read timeout=5)
17-02-06 01:00:07 ERROR (Thread-5) [tellduslive] Failed request: HTTPSConnectionPool(host='api.telldus.com', port=443): Read timed out. (read timeout=5)

Not much and i guess its quite normal.
So your fix cleaned my log a lot.

Thanks a lot for reporting and helping out testing the fix. I’ll change the log level to a warning instead of error.

Allways happy to help engaged developers, keep up the good work.
Without you guys us (semi)noobs would get no where. :slight_smile:

1 Like

Anyone else experiencing this many timeouts?

http://pastebin.com/uFYGPwXe

@mcfrojd, are you on a very flaky connection in general (“mobile broadband” or something)? I noticed this in your previous logs as well that the connection to the servers seemed to get lost a lot more often than for me.

@molobrakos No no, in fact a very stable 500/50 cable connection, and most of all my devices use cable not wifi where possible. One thing i notice is that there seem to be more people in close range that have devices that my telldus net pick up, but i guess that that sholud not make a diffrence.
I guess that the (read timeout=5) is a 5 sec timeout? maybe there is a way to set a higher value for the timeout to see if the errors become less frekvent.

Yes, maybe that is a bit short. You can try changing it locally if you locate this file in your installation and see if that changes anything for you: https://github.com/molobrakos/tellduslive/blob/master/tellduslive.py#L17

I raised it to 10 sec, but they where still coming, now after raising it to 25 sec i havent had a single warning message

Ok, thanks for testing! Let’s increase the timeout for the next release then.

It was a long time ago - but I have worked with the Telldus Live API for a few years, and I am sure I recall seeing somewhere that they have a throttle / limiter on the number of requests you can make.

This is done to ensure their servers are not overloaded by too frequent requests, because if many people doing short update intervals like 5 seconds it requires a lot of resources.

I’ll see if I can still find something.

Getting the same error:

ERROR (MainThread) [homeassistant.core] Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/selector_events.py”, line 582, in _read_ready
data = self._sock.recv(self.max_size)

but i cant find local file, where is tellduslive located? I would like to change it too