Tellstick installation on HassIO

Hi.
I will vote for option 1.
Option 2 seems to overcomplicate things.

Ok. So the tellstick software is installed but the service is not running… do i understand this correctly?

Installed samba and SSH plugin on my hass.io
Compiled the telldus-core binaries after a lot of hassle with dependancies and massaging of the telldus code.

But after reboot all the files i worked with and compiled via SSH are gone. Facepalm.

I don’t really understand this concept of not having console access to the OS and being able to do this kind of stuff… yet.

If someone understand and wish to compile telldus-core on hass.io, i have documented all deps and steps to compile here… some type-o:s are expected.
https://pastebin.com/7y2xyWGk

If you wish to download the prepackaged bins or source, you will find the files here:
https://github.com/endor-force/tellstick-core-2.1.2_resinos

telldusd binary exits with segmentation fault when executing telldusd --nodaemon.
My bet is that the ssh container does not allow access to the hardware?

gdb shows following:

Thread 1 "telldusd" received signal SIGSEGV, Segmentation fault.
0x76fb9414 in pthread_mutex_lock () from /lib/ld-musl-armhf.so.1

and backtrace:
(gdb) bt
#0 0x76fb9414 in pthread_mutex_lock () from /lib/ld-musl-armhf.so.1
#1 0x76dd45f8 in libusb_get_device_list () from /usr/lib/libusb-1.0.so.0
#2 0x76f3252c in ftdi_usb_find_all () from /usr/lib/libftdi1.so.2
#3 0x54b1b830 in TellStick::findAllByVIDPID[abi:cxx11](int, int) ()
#4 0x54b1b544 in TellStick::findAllabi:cxx11 ()
#5 0x54aefef0 in ControllerManager::loadControllers() ()
#6 0x54aef358 in ControllerManager::ControllerManager(std::tr1::shared_ptrTelldusCore::Event, std::tr1::shared_ptrTelldusCore::Event) ()
#7 0x54b0b910 in TelldusMain::start() ()
#8 0x54b178bc in main ()

@pvizeli what do you make of this?

I’m basically grasping in the dark here but i tried to create a hass.io addon with the binaries and libs.
I still get segmentation fault when trying to load telldus daemon (telldusd) in this setup.

Addon files are available here if someone wish to play…
https://github.com/endor-force/tellstick-core-2.1.2_resinos

telldusd daemon starting up
/run.sh: line 2:    13 Segmentation fault      telldusd --nodaemon
1 Like

Tellstick daemon now executes without segfault… of course access to usb was required.

Added: "devices": ["/dev/bus/usb:/dev/bus/usb:rwm"], in config.json and the daemon executes. (addon files on github link above is updated)

tdtool seem to be able to communicate fine with telldus daemon within the container.

Next step?
Is hass.io able to communicate with the service in the container?

1 Like

Tried to add telldusd to start when homeassistant container boots, have not yet verified stability but hassio starts without errors…
This is not an option for all users since there need to be a clean trigger to control the start of the service if tellstick support is actively requested by user in config.

What you need:

  • samba plugin
  • ssh debug login to the host: https://home-assistant.io/developers/hassio/debugging/ (don’t forget that your authorized_keys file should have the public key in authorized_keys format on one line)
  • binaries for your platform, compiled files that are tested on raspberry pi 3 are available on this github page
  • create a folder in your hassio shared folder called telldus-core and put the files from above there…
  • login to your host, ssh on port 22222
  • run the script /resin-data/share/telldus-core/install_telldus-core.sh

This is intended for experimental use…

Cool, so what you are saying is that it seems to work? Anyway, great work so far :+1:!

Is there anyway this could work with the Tellstick net over local network. Or does it just work with the original tellstick on usb. I’m finding the telldus live API to be unreliable at times so it would be nice if it could be controlled directly from hassio.

Well. It does not work yet.
With tellstick: in configuration file hassio loads without tellstick errors.

However when trying to communicate with tellstick there is an error
2017-10-06 20:02:02 ERROR (SyncWorker_15) [homeassistant.components.tellstick] TellStick not found (-1)

Same thing when running tdtool in the homeassistant docker, tellstick not found.
Don’t know if /dev/tellstick is expected to exist?
Can someone confirm on a linux/raspberry if /dev/tellstick is present when tellstick service is loaded?

Note, the experimental installation in homeassistant docker above is not configured to commit to dockerfile so if you are experimenting with this be aware that the tellstick core files will be cleared on reboot.

Would be really helpful if any of the hassio developers could support with some insights in this… @pvizeli ?

Current state:

  • Source for telldus core is available for compilation on alpine linux for different architecture
  • Binaries for raspberry pi 3 available including documented dependancies
  • Addon with telldus core is possible to create and load telldus - But how to communicate with service and hassio? - does not seems like the way forward
  • Package and documentation available on how to add tellstick core in to homeassistant docker, however with error - Due to limited hardware access? Also needs to be secured to load telldusd service only if tellstick: is in configuration file.

… and now problem with tellstick not found is solved by correcting parameter for user in tellstick.conf

So in my sandbox i got tellstick working with hassio by adding the telldus core files in the homeassistant docker.
Startup of telldus daemon is done via /usr/bin/entry.sh .
This package is used

2 Likes

Did anyone get it to work yet?

@endor could you please share in a 1-2-3 way how you got this to work. Getting my tellstick duo to work with hass.io is the last thing I need to solve before migrating.

Would be really valuable if you could share this.

1 Like

Will some one add Tellstick to dockerfile?

We update hassio component to start daemon in background. So you can start it easy over home-assistant config.

Sounds great!

Do you want me to test to push the files in to the homeassistant docker on my system to verify that the daemon starts based on config and your recent changes?
Or in github?

3 Likes

I still get invalid config on hassio. Any progress to get i tellstick duo to work with hassio?

I would also very much appreciate to have my Tellstick Duo working in Hassio. The family is complaining that the lamps isnt turning on anymore since I switched to Hassio…

1 Like

@endor Any update on this?

@hnn Yes there is most definitely progress on this.
The telldus libraries are now compiled in to 0.57 release. Now the daemon/service must be available and running…

There is work ongoing for making the homeassistant tellstick service possible to talk to the telldus daemon running in an add-on in hass, it would hopefully be the last step.

You can see some more information here: https://github.com/home-assistant/hassio-build/pull/45

Great! Just looking to “upgrade” to HassIO because i got issues after upgrading and HassIO seems to solve them.

I read the link you posted but the ticket is closed does that mean its finished?

How do i install it? Even if its not finished i wouldent mind a beta build