Author Topic: Working on PowerLinc USB, RCS TX15B Thermostat support  (Read 7161 times)

djrobx

  • Newbie
  • *
  • Posts: 11
    • View Profile
Working on PowerLinc USB, RCS TX15B Thermostat support
« on: September 09, 2007, 11:10:32 pm »
I have a PowerLinc USB and an RCS TX15B Thermostat.   I am currently working on DCE modules to support these (no timeframe promises!).   The PowerLinc USB will be pretty easy with the WiSH project (works fine with LMCE's kernel, no patches or custom kernel were needed), and I've worked with Project Wish before.

I have created my new Device Template and have built my shell application with GenDCE and SQL2CPP.   That all seems to have gone fine.

I'm guessing the best way to implement the RCS thermostat is make a completely separate DCE device (maybe a DCERouter plugin, since it's purely a logic layer?), and to add "send raw x10" as well as a "register to receive X10 events" to the PowerLinc interface so the two can communicate, but at the same time allow other X10 interfaces (e.g. CM11A) to offer the same I/O path.   Does that make sense?

This is entirely for my own personal use but I will make the results available to LinuxMCE should they want to include it in the project.  Mostly posting this to get design pointers from the LMCE team if I'm on the right track with the RCS implementation, and/or to avoid duplication with someone else working on the same thing.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #1 on: September 10, 2007, 02:55:44 am »
djrobx--

I'm currently working on an Insteon integration.  I'm using the low level library written by Bob Paauwe as part of his ilink project here:
http://www.bobsplace.com/ilinks/

This library is kind of neat in that it can use either a kernel module driver or it can interface with the hid driver.  This gives some flexibility in how to use it with LinuxMCE. I'm currently expanding it with some mid-level functions to do things like remote device database changes (creating/deleting groups).  My plan was to follow the Zwave development as closely as it makes sense to, in order to support the current lighting plugin.  Zwave is currently implemented via separate mutex-synchronized threads to control the interface between the usb controller and the DCErouter.

From taking a quick glance at the wish project, it looks like it doesn't support powerlinc V2 currently. I'm not sure how difficult it would be to add.

I know there is support in LMCE for a z-wave thermostat (i'm not sure which one).  You may want to look at that implementation.  If you want to help, PM me and we can talk.




dopey

  • Guru
  • ****
  • Posts: 223
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #2 on: September 10, 2007, 03:02:28 am »
I thought that thermostat was already supported. Or at the very least one similar to it is. http://wiki.linuxmce.org/index.php/Thermostats

djrobx

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #3 on: September 10, 2007, 07:52:23 am »
That's interesting, I wasn't able to find device support for that RCS anywhere in the source.

Maybe it was a version 1 thing?

I somehow don't think that info is accurate.  The only X10 support I see at all is the CM11A.  The CM11A code only has a small bit of support for receiving of X10 events.    In fact, how CM11A handles received events demonstrates exactly what I feel is a problem with Pluto's current x10 support.  There's too much "higher level" logic going on, its mapping events back to their LCME devices and firing "Sensor tripped" events.   We should be able to implement a driver that strictly sends and receives native X10 and let another layer in the framework support the various types of X10 devices that one might control via X10.   When you get into the various types of dimming wall switches and scenario setups, there's really quite a lot of logic that should not have to be re-done on a per-controller basis.

If I had to wager a guess, I'd say Pluto was rightfully focusing on newer, better technologies like Z-wave for automation.  But in the spirit of hobbyist projects I think X10 support shouldn't be overlooked.   In about 20 minutes I was able to install Homeseer on a windows box and get it controlling my Powerlinc USB, my RCS thermostat and all my lights.   Homeseer is just too "beta" feeling for me to want to pay their ridiculously high prices when I can contribute my time towrds LinuxMCE.

Thanks for the info regarding the Z-wave thermostat.  If I can track down which commands & events its using that will be helpful.   There's an aprilaire interface I was looking at but it seems incomplete.

As for what I'm doing Project Wish is pretty easy to integrate.  I'm more concerned with how to implement it in a way that's "friendly" to say, your Powerlinc V2 interface if/when you add X10 support to it.   It doesn't look like Wish supports V2, and it doesn't look like iLink supports V1.   Both Powerlincs use HID (and in fact, even have the same errata under Windows XP, breaking DirectInput support).   So while I'm sure there was some opportunity for an integrated driver solution, we seem to be better off using different low layer approaches.

-- Rob


djrobx

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #4 on: September 17, 2007, 07:24:33 pm »
Change of plans, I will be implementing Ocelot support instead.  Reason?  My Powerlinc USB died.   ::)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #5 on: September 18, 2007, 11:18:52 am »
Hi,

I also would like to contribute few things (to enhance Motion wrapper with new features, Audio only Xine player - to have multiple stereo outputs on Core, maybe even Zoneminder integration, Cybrotech home automation integration - have it running in Perl "proof of concept" driver, but would like to code it in c++)...

But I've read a lot about problems with compiling LMCe from source, etc...

I guess you have all overcome such problems and I'd kindly ask if you can post as much as possible about your work, so any other potential contributors can learn and developers community will grow...

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #6 on: September 18, 2007, 05:26:27 pm »
bulek--

I found this thread helpful (particularly Paul's post) http://forum.linuxmce.org/index.php?topic=2304.msg10938#msg10938

Basically, the steps I'm taking for Insteon Integration were:

1) Found a good existing FOSS C library for accesssing Insteon devices
2) Expanded C library and added C++ wrapper
3) Created device template (based on existing ZWave Device)
4) Used DCEGen to create a device

Do an apt-get install pluto-dcegen

Then cd to the directory where your sources are, like: cd /home/sources/src/bin

And run: /usr/pluto/bin/DCEGen -d [device template number]

5) Modified DCE header file
6) 'make bin' in device directory.
7) Add your code

There is a lot of good information in the forums and on the wiki, but it need some more work put into organizing it.  Please post or PM me if you need some more help.  There are a few guys here who are much better at this than I am, so I'm sure someone will be able to answer your questions.

-PeteK

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #7 on: September 18, 2007, 10:44:21 pm »
Hi,

thanks for info. I've already put some info on compiling few things on Pluto.

Maybe it can be updated. I guess you're making your notes for your reference, so maybe you can share them with us. There is always someone better, but currently AFAIK we don't have any step by step procedure what to do to compile certain binaries....

Outdated pages are here :
http://wiki.linuxmce.org/index.php/How_to_compile_Motion_Wrapper
http://wiki.linuxmce.org/index.php/How_to_compile_Asterisk

Will you (or anyone else doing similar thing) please be so kind to post steps (procedure) to compile certain binaries. IT would be of great help - I did under Pluto, but have no clue how to do it under LMCE...

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #8 on: September 19, 2007, 01:06:27 am »
Bulek,

I have been using the same process as in Pluto, and info from the links you mentioned.

I think that all I needed compiled to build a new C++ device was; DCE, pluto_main, Pluto_Utils, DCEGen and sql2cpp

I have been messing around mainly with LIRC_DCE (to add support for iguanaWorks receiver) so I also needed to have lirc sources - but you wouldn't need that for other binaries.

Regards
Darren

djrobx

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Working on PowerLinc USB, RCS TX15B Thermostat support
« Reply #9 on: September 19, 2007, 07:47:15 am »
This thread was helpful to me, I added my experience in trying to create a device to it as well.

http://forum.linuxmce.org/index.php?topic=2304.0