Could not connect to the Telldus Service (-6) on Home Assistant on Docker

(I know there are alot of topics around this subject, but I can’t find any with my preconditions.)

I am running Home Assistans on Docker, on an Ubuntu 20 machine and am trying to configure my old Tellstick Duo. I have the Tellstick running on my host after custom building it (as the official build is outdated for latest versions of Ubuntu) and it’s working fine on the host.

However, when trying to install it into my Home Assistant docker I get the error: “Could not connect to the Telldus Service (-6)”.

How can I make Home Assistant use my custom build of the Tellstick tools? Or is it just a configuration error on my part? I’m not proficient enough on Docker…

Error during setup of component tellstick
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tellstick/__init__.py", line 112, in setup
    tellcore_devices = tellcore_lib.devices()
  File "/usr/local/lib/python3.8/site-packages/tellcore/telldus.py", line 173, in devices
    count = self.lib.tdGetNumberOfDevices()
  File "/usr/local/lib/python3.8/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)

My docker-compose.yml reads:

version: '3'
services:
  homeassistant:
    container_name: home-assistant
    image: homeassistant/home-assistant:stable
    volumes:
      - ~/homeassistant-config:/config
      - /etc/tellstick.conf:/etc/tellstick.conf
    devices:
      - /dev/bus/usb:/dev/bus/usb
    restart: always
    network_mode: host
    privileged: true

My homeassistant/configuration.yaml reads:

tellstick:
  signal_repetitions: 3

From what I gather that should be enought for the Tellstick Duo(?)

Hi!

I just moved my home assistant core from a virtual environment to use a docker container instead and had the exact same problem. After some digging I found that “telldusd” wasn’t started in the home assistant-image.

I already had a custom image based on “homeassistant:home-assistant” to add sql server support so I modified my docker file to also install supervisor and changed my entrypoint to start using supervisord.conf.

In my supervisord.conf I basically have the following to both start home assistant AND telldusd:

[supervisord]
nodaemon = true
user = root

[program:homeassistant]
command = python -m homeassistant --verbose --config /config

[program:telldusd]
command = telldusd --nodaemon

I found insipration from this docker image: https://github.com/taskinen/home-assistant (https://hub.docker.com/r/taskinen/home-assistant) which you can use if you don’t want to make your own custom image.

Hope this helps

Tack Andreas! I passed by that docker image before, but for some reason didn’t try it, as I didn’t think I should need the supervisord. Works great now! :ok_hand:

Hi!

I’m running the taskinen docker image on my Synology DS916+ NAS, and I can see that telldusd is running and connecting to my Tellstick Duo, but HA still says “Could not connect to the Telldus Service (-6)”.

I can’t for the life of me find any more info on why it fails. The ports are the same (50800 and 50801) and the telldus daemon finds the tellstick duo via USB, so everything seems to be as it should.

Anyone else who’s had this problem and solved it?

1 Like