Developing support for Tellstick

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
dali
Starting Member
Starting Member
Posts: 46
Joined: Mon Nov 09, 2009 10:02 am
Location: Habo, Sweden
Contact:

Developing support for Tellstick

Post by dali »

Hi,

As this is my first post here, I should probably introduce myself.
I live in Sweden and have been wanting to automate my home for a few years. My choice of software has been Misterhouse since it's one of the oldest and biggest open source projects, and is written in perl which I know very well. But the more I've looked at the source, the more I've been thinking that there must be a better and more well structured project somewhere.
I started searching, and a few weeks ago I found DomotiGa. It has almost everything I want. The only downside is Gambas that I had never heard of before. But hey, why not learn something new! [:)]

That was supposed o be a short introduction. Sorry about that.


Let's get back on subject. I want to contribute to this project!
I'd like to start with with adding support for a Tellstick usb dongle (http://www.telldus.se/). In short it is a dongle which which can turn on/off and dim power outlet devices through radio (433.92 MHz). The downside is that it can only send commands to the device, not read the current state. The upside is the price, 3 devices cost under 20 euro and that it supports a lot of different makes and models (I even control my motorized projector screen).

The Tellstick software, called telldus-core, has a shared library with external functions, so it is very easy to communicate with from Gambas.
One thing though, that I need your input on, is that all devices needs to be added to a config file (called telltick.conf) for the software to be able to send commands to devices.

The config looks something like this:

Code: Select all

deviceNode = "/dev/tellstick"
device {
  id = 1
  name = "Window light"
  protocol = "arctech"
  model = "selflearning-switch"
  parameters {
    house = "953934"
    unit = "1"
  }
}

device {
  id = 2
  name = "Kitchen light"
  protocol = "arctech"
  model = "selflearning-switch"
  parameters {
    house = "953934"
    unit = "2"
  }
}
This means that devices needs to be configured both in DomotiGa and tellstick.conf. This is because telldus-core needs the device id, not device address parameters as input to the different commands.
This is NOT good!

<b>How should this be handled?</b>

The shared library has functions for adding and removing devices in the config file, so one dirty solution could be to have an empty config and add the device that we want to send a command to, send the command, and then remove the device from the config.

What do you guys think??


I also would like to add contribute to adding a themeable web gui and an iPhone gui (web based), but that will have to wait until I've cracked the tellstick part.
Merdeka
Member
Member
Posts: 65
Joined: Sun May 10, 2009 11:16 pm
Location: Netherlands
Contact:

Developing support for Tellstick

Post by Merdeka »

Hi and welcome Dali,

So the tellstick usb-dongle needs the tellstick.conf file to send commands to the correct device? Can't the dongle be used without the telldus-core? If the protocol is available we can implement it in a DomotiGa class.
dali
Starting Member
Starting Member
Posts: 46
Joined: Mon Nov 09, 2009 10:02 am
Location: Habo, Sweden
Contact:

Developing support for Tellstick

Post by dali »

Well, the source code of telldus-core is available, since it's open source. But redoing all the work that's been put into that software will be a HUGE work that I'm not interested in doing.
The guys at Telldus have promised to develop support for sending commands via the shared library without having to put the config in tellstick.conf, but they can't say WHEN this will be done.
So maybe we can go for the dirty solution I described above while waiting for theese new functions to be added.

What do you think?

The difference in the device config in DomotiGa will be that right now we'll need to have deviceId, protocol, model, house and unit in the device table, but when the new functions have been added in telldus-core we can remove deviceId.



So, what do you think about a themeable web gui (really want this for a touch screen in my kitchen) and an iPhone gui?
j.hoekstra
Member
Member
Posts: 255
Joined: Thu Jun 25, 2009 2:09 pm
Location: Enschede, The Netherlands

Developing support for Tellstick

Post by j.hoekstra »

I'm not familiar with this, but it seems to use the same method of Ikea Koppla?
Hmmm, I read a bit further and see: http://www.telldus.se/receivers.html
So it it's multi-protocol like the rfxcom transmitters?
dali
Starting Member
Starting Member
Posts: 46
Joined: Mon Nov 09, 2009 10:02 am
Location: Habo, Sweden
Contact:

Developing support for Tellstick

Post by dali »

Yes, it's multi protocol.
I don't know how rfxcom works (just found out about it last night), but the tellstick device doesn't have any intelligense to handle protocols internally, which means that developing support for new protocols is upp to the open source group which they do quite rapidly.
I don't know how the guys behind quick rfxcom develop support for new protocols, maybe this isn't a problem.

I really want a rfxcom reciever to be able to control devices with wall switches, but I want to fix support for tellstick first.

Also, does rfxcom support self learning switches (used by Nexa) and dimable devices?
dali
Starting Member
Starting Member
Posts: 46
Joined: Mon Nov 09, 2009 10:02 am
Location: Habo, Sweden
Contact:

Developing support for Tellstick

Post by dali »

Question to Ron (and the rest of you).
DomotiGa has support for Nexa modules (arctech protocol) through RFXcom. It looks like the support is only for hardcoded addresses (house A-P, Unit 1-12?). Does it handle self learning modules (house 1-999999, unit 1-12)?

Self learning switches learn their address by sending a broadcast "learn" command.
Tellstick has support for this (I only use self learning modules), so I'd like to implement this in DomotiGa.

One problem is how we should solve this in the device editor? Should the Nexa device type be devided into "Nexa hardcoded" and "Nexa selflearning"?

I would like some input on this subject, I don't want to implement this in a way that you guys don't like.
luria
Starting Member
Starting Member
Posts: 36
Joined: Tue Mar 16, 2010 11:51 am

Re: Developing support for Tellstick

Post by luria »

Any updates on this? I also have a good deal of self-learning Nexa gear lying around, including a motion sensor, a few door/windowsensors and a lot of dimmers/appliance modules. I run this via rfxcom and xpl-perl/heyu and can use everything trough xpl-rfxcom-tx and xpl-rfxcom-rx. However, Domotiga is a better solution for me if I can get the self-learning stuff to work. I don't want to start any parallell development, and I wonder if there is any progress? Also, if this is tellstick exclusively I would like to reuse some code for the rfxcom interface.

Btw, thank You (all) for what looks to become a great application.
dali
Starting Member
Starting Member
Posts: 46
Joined: Mon Nov 09, 2009 10:02 am
Location: Habo, Sweden
Contact:

Re: Developing support for Tellstick

Post by dali »

I gave up on Tellstick, the signal range is a joke... I bought an rfxcom transmitter instead. It's more expensive, but works like a charm.
The rfxcom works with self learning Nexa devices, since they can self learn the same codes used by hard coded devices (A1, etc).
luria
Starting Member
Starting Member
Posts: 36
Joined: Tue Mar 16, 2010 11:51 am

Re: Developing support for Tellstick

Post by luria »

Thanks! I redid my devices and can now turn my Nexa gear on and off. However, dimming on the self-learning devices is still not working for me. All I can do is to start the dimmingloop, while these devices (eg LWM-210) also supports setting direct dimming levels. Whith XPL-RFXCOm i can set this by using command=preset level=[0-15]. Trying to dim these devices with the AC or ARC protcol in Domotiga causes a crash. Any tips?
dali
Starting Member
Starting Member
Posts: 46
Joined: Mon Nov 09, 2009 10:02 am
Location: Habo, Sweden
Contact:

Re: Developing support for Tellstick

Post by dali »

I haven't tried any dimmable devices, I only have on/off devices.
So I guess an answer from RDNZL would be better, and perhaps Bert who has developed the rfxcom transmitter could answer if it really supports dimmable selflearning Nexa devices (I think it's the same as KAKU).
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Developing support for Tellstick

Post by RDNZL »

@luria
can you mail me the error you get while trying to preset dim, it should be fixable easily.
Or better yet; Register yourself on domotiga.nl and open a ticket.

Did you create a new devicetype/module for the unit, if yes what did you fill in in field Type? AC or ARC?

Thanks!
Regards, Ron.
User avatar
b_weijenberg
Forum Moderator
Forum Moderator
Posts: 1746
Joined: Sun May 14, 2006 4:32 pm
Location: Netherlands

Re: Developing support for Tellstick

Post by b_weijenberg »

The newer modules with program button and a production date after mid 2008 have dim set levels and use the AC protocol. The new models with program button support also the ARC protocol that is used by the old models with address wheels.
The use of the dim option in the ARC units by a Home Automation system is very limited. You can set the dim level of these units using a remote and enter twice an ON command. The unit starts a dim cycle mode and this is stopped by the 3rd ON command you give on the remote. The unit will keep this dim level and when you switch the unit Off-On the dim level is what was set using the remote. The problem is when you transmit twice an On command the units starts again the dim cycle. This will also be the case with the new models. If you are not sure the unit is on and you will switch on a unit you can send first an Off then an On command or when using the new models you can send a set dim level 14 (15 is the same as On)
luria
Starting Member
Starting Member
Posts: 36
Joined: Tue Mar 16, 2010 11:51 am

Re: Developing support for Tellstick

Post by luria »

I have messed around with the source and the database, not easy getting a diff out of it. I'll try a clean install tonight, it might be myself leading me astray. I have made custom modules on which my devices are based on, trying either the ARC or AC protocol.
Post Reply

Return to “DomotiGa Forum”