Tellstick addon broken after 0.60?

very weird…

I tried full host reboot a few times before without luck, this time i did it again with your attached config and it gave me the same result.

I’m starting to think that its related to my mysterious delays every time I start hassio… I read about it and I’m not the only one but since I havent had any issues with it other than a very long boot of hassio I havent digged deeper in it. What do you think? Do you also get these errors in your tests? Could it be becuse of an old sd-card?

Timer got out of sync. Resetting
20:40 core.py (ERROR)
Error during setup of component tellstick
20:39 components/tellstick.py (ERROR)
Setup of tellstick is taking over 10 seconds.
20:39 bootstrap.py (WARNING)
Setup of tts is taking over 10 seconds.
20:39 bootstrap.py (WARNING)
Setup of sensor is taking over 10 seconds.
20:39 bootstrap.py (WARNING)

My Tellstick directly to rbpi with the original 1m usb-wire
had firmware 10, updated to 12, same error

I’ll get back withthe pi firmware since I’ve never done that before

Yes I have a dash before platform, but this page did not format it well and it disappeared…
I have exactly the same configuration as you have, and yes I have correct spaces where it shold be (hate YAML though). The configuration worked just before updating to 0.60.0 so it is not a configuration format error.

When trying developer tools I can turn on and off my devices. Weird why it says that is a configuration error in the config.

Great…
My theory is that the tellstick service is not fully initialized or sockets have not been connected in time before the hass tellstick component is loaded and tries to start communicating with the service.

The add-on should be up and running before hass so my bet is that tellcore-net maybe could be improved with some checks to secure that socket is loaded before continuing.

I experienced that pi 2 is much slower on loading hass than pi 3 in general… and I have some similar timeout messages with sensors also on the pi 3.
A bad performing SD card is not going to make things better of course…

It would be interesting to verify that the sockets exists at all in your homeassistant.

It is possible with hassio debug SSH.

  1. generate a key with puttygen
  2. copy the authorized keys formatted text (all text) from the textbox and paste it in to a file called authorized_keys (note no file suffix)
  3. put the file on the root of your SD card using your computer
  4. put the SD back in the pi and fire it up
  5. in puttygen, enter a password for your certificate and save the private key file on your computer
  6. using putty, configure it to use your private key file under ssh auth
  7. connect to your pi on port 22222 as root and the password you entered for your private key
  8. run: docker exec homeassistant ls /tmp

You should have two telldus files there.

I think we may be on to something here… Luckily I haven’t purchased my borrowed PI2 yet so mabye it’s time to think about buying a PI3 and new sd-card instead…? Of course a boot check sounds right anyway.

Result:

root@hassio:~# docker exec homeassistant ls /tmp
TelldusClient
TelldusEvents
clock_gettimebm2yboeb.c
clock_gettimex7ulgk74.c

It checks out good.

If you like to make an experiment,
I have added a quite stupid 10 second delay after each socket setups in this file.tellcorenet.yaml (2.3 KB)

  1. Copy it to your /share folder and rename it to tellcorenet.py (it is not allowed to upload py files here;)
  2. Login to your debug ssh.
  3. run: docker exec homeassistant cp /share/tellcorenet.py /usr/lib/python3.6/site-packages/tellcorenet.py
  4. run: docker restart homeassistant

Check if tellstick loaded?

This will not persist after host reboot, in that case you have to repeat step 3 & 4

placed the tellcorenet.py in the sharefolder and ran the commands but unfortunately with the same result… :confused:

Hm try edit the py file and increase sleep(10) to 20 or 30 and run step 3 and 4 again.
Sleep appears in two places in the file…

I tried the 30 sec now (in both places), no change… does it make any difference in your test environment?

I took the chance and bought a PI3 Model B with 16GB sandisk now. I’ll wait for it and see if it works better, I wanted the wireless possibility anyway…

if you want I could expose my hass-web together with ssh to let you look deeper into it, I can give you the details in private. If not its totally fine, I’ll just wait for the other pi. I already appreciate your effort here!

I’m sure the new hardware will save you a lot of headache and miscoloured hair in either way.

I could probably check your system on-line and save some ping-pong here.
For me it makes no difference with sleep timers on or off (works anyway)…

What would be interesting is to see the times of when the sockets are run
Added logging to the file. tellcorenet.yaml (4.7 KB)

Rename file and use for above step 3 & 4.

Edit your configuration.yaml and add logger:

Then check the timestamps for tellcorenet log entries in /config/home-assistant.log
the interesting part is a comparison of the log entry timestamp compared to the file creation time reported on the log line

Like this example where the socket files are created before the sleep timer finished it’s 30 seconds.

2018-01-03 21:37:44 INFO (SyncWorker_2) [tellcorenet] Tellcore-net: TelldusClient socket file exists (after timeout) Wed Jan  3 21:37:14 2018
2018-01-03 21:37:44 INFO (SyncWorker_2) [tellcorenet] Tellcore-net: TelldusEvents socket file exists (after timeout) Wed Jan  3 21:37:14 2018

With next hass.io verson 0.79 it will be better coordinate booting stuff. maybe it help

@pvizeli sounds good!

@endor thanks for all help, I’ll try the PI3 when it arrives

If you have the possibility, try now.
Seems like 0.79 is out. (Check in your hass.io advanced settings) if it is updated on your device.

I cant belive it… Just installed hassio on my newly arriwed raspberry pi 3 with 16gb sandisk card and I get the exact same error…what the…?

I got hassio supervisor 0.79 (all seems okay here, just like we tested before)

starting version 3.2.4
18-01-07 11:20:55 INFO (MainThread) [__main__] Initialize Hassio setup
18-01-07 11:20:55 INFO (MainThread) [__main__] Setup HassIO
18-01-07 11:20:55 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to supervisor homeassistant/armhf-hassio-supervisor with version 0.79
18-01-07 11:20:55 INFO (MainThread) [hassio.host_control] Send 'info' to HostControl.
18-01-07 11:20:56 INFO (MainThread) [hassio.host_control] Receive from HostControl: { "type": "resinos", "version": "1.1", "last_version": "1.1", "hostname": "hassio", "features": ["shutdown", "reboot", "update", "hostname"], "os": "GNU/Linux" }.
18-01-07 11:20:56 INFO (SyncWorker_1) [hassio.docker.interface] Attach to image homeassistant/raspberrypi3-homeassistant with version 0.60
18-01-07 11:20:56 INFO (MainThread) [hassio.addons.git] Load addon /data/addons/core repository
18-01-07 11:20:56 INFO (MainThread) [hassio.addons] Load addons: 19 all - 19 new - 0 remove
18-01-07 11:20:56 INFO (SyncWorker_2) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-ssh with version 2.9
18-01-07 11:20:56 INFO (SyncWorker_1) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-samba with version 2.0
18-01-07 11:20:56 INFO (SyncWorker_0) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-tellstick with version 0.4
18-01-07 11:20:56 INFO (MainThread) [hassio.updater] Fetch update data from https://raw.githubusercontent.com/home-assistant/hassio/master/version.json
18-01-07 11:20:57 INFO (MainThread) [hassio.snapshots] Found 0 snapshot files
18-01-07 11:20:57 INFO (MainThread) [hassio.addons] Startup initialize run 0 addons
18-01-07 11:20:57 INFO (MainThread) [__main__] Run HassIO
18-01-07 11:20:57 INFO (MainThread) [hassio.dns] Start DNS port forwarding for host add-ons
18-01-07 11:20:57 INFO (MainThread) [hassio.supervisor] Version 0.79 is already installed
18-01-07 11:20:57 INFO (MainThread) [hassio.core] Start API on 172.30.32.2
18-01-07 11:20:57 INFO (MainThread) [hassio.addons] Startup system run 1 addons
18-01-07 11:20:57 INFO (SyncWorker_3) [hassio.docker.interface] Clean homeassistant/armhf-addon-tellstick docker application
18-01-07 11:20:59 INFO (SyncWorker_3) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-tellstick with version 0.4
18-01-07 11:21:04 INFO (MainThread) [hassio.addons] Startup services run 2 addons
18-01-07 11:21:04 INFO (SyncWorker_4) [hassio.docker.interface] Clean homeassistant/armhf-addon-ssh docker application
18-01-07 11:21:04 INFO (SyncWorker_9) [hassio.docker.interface] Clean homeassistant/armhf-addon-samba docker application
18-01-07 11:21:06 INFO (SyncWorker_9) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-samba with version 2.0
18-01-07 11:21:06 INFO (SyncWorker_4) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-ssh with version 2.9
18-01-07 11:21:23 INFO (SyncWorker_6) [hassio.docker.interface] Clean homeassistant/raspberrypi3-homeassistant docker application
18-01-07 11:21:26 INFO (SyncWorker_6) [hassio.docker.homeassistant] Start homeassistant homeassistant/raspberrypi3-homeassistant with version 0.60
18-01-07 11:21:26 INFO (MainThread) [hassio.addons] Startup application run 0 addons
18-01-07 11:21:26 INFO (MainThread) [hassio.core] Hass.io is up and running

Here it seems to fail to load in the gui…?

Invalid config, The followinf components and platforms could not be set up:

  • Tellstick

Running original config.yaml with tellstick added like this:

# Tellstick
tellstick:
    host: core-tellstick
    port: [50800, 50801]


Sun Jan 07 2018 12:22:14 GMT+0100 (W. Europe Standard Time)

Error during setup of component tellstick
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/tellstick.py", line 99, in setup
    tellcore_devices = tellcore_lib.devices()
  File "/usr/lib/python3.6/site-packages/tellcore/telldus.py", line 173, in devices
    count = self.lib.tdGetNumberOfDevices()
  File "/usr/lib/python3.6/site-packages/tellcore/library.py", line 257, in check_int_result
    raise TelldusError(result)
tellcore.library.TelldusError: Could not connect to the Telldus Service (-6)

That truly sucks.
Just for wrapping up,
You are running a pi 3, tellstick duo, hassio fresh install?
Have you verified with blank default install and only adding tellstick settings?

What is the amp rating on the micro usb power supply that supply the pi with power?
Make sure it’s not a quick charger (usually marked with dual power outputs on the psu) for a phone.

I also have a custom tellstick component with additional logging for you to try.
Will post that along with instructions shortly.
Do you have discord to speed up ping-pong of messages? Add me: endor#4345

Here is the custom tellstick component and instructions to help you troubleshoot…

  1. Download, rename to tellstick.py and put in folder /config/custom_components (create folder if it does not exist)
    tellstick.yaml (12.3 KB)

  2. Add line logger: to your configuration.yaml

  3. reboot the pi.

  4. In SSH (addon) run hassio supervisor logs > /config/supervisor.log

  5. take the files /config/home-assistant.log and /config/supervisor.log and send them in a PM to me.

You are running a pi 3, tellstick duo, hassio fresh install? = correct
Have you verified with blank default install and only adding tellstick settings? = correct

I’m using a 5V 2A charger for a tablet. I know it’s not the original but as said before, it worked before, also even without the tellstickhardware plugged in the config should still be able to load the component? That can’t be dependent on powerconsumption in my view. But ofc it is still a possibility.

I’ll try to reach you on discord later tonight if you’re online, got some familybusiness to attend to first.

Sounds good.
2A should cover it.
You must have the tellstick hardware plugged in when you power up the pi or do host reboot after plugging in the tellstick.

If I connect tellstick after boot it fails like yours, also if I connect tellstick and only do restart of homeassistant, it will fail.

I think so too, I have tried hard-rebooting :confused:

I these errors durint boot

Timer got out of sync. Resetting
13:33 core.py (ERROR)
Error during setup of component tellstick
13:32 components/tellstick.py (ERROR)
Setup of tellstick is taking over 10 seconds.
13:32 bootstrap.py (WARNING)
Setup of sensor is taking over 10 seconds.
13:32 bootstrap.py (WARNING)

Those messages are ok to some extent I think…
Butyou don’t get the massive dump like before?

Problem with tellstick errors loading for some users on hass.io is resolved in hass.io 0.81. Update your supervisor, reboot and tellstick should work.

Thanks @Mattie for your patience and @pvizeli for the correction :smile:

1 Like