Author Topic: eibd via USB  (Read 7101 times)

Lennox

  • Newbie
  • *
  • Posts: 7
    • View Profile
eibd via USB
« on: November 08, 2009, 04:24:20 pm »
Hi, I’m new in this forum and first of all I’d like to say hello and thanks to all who work on this project. I’m very impressed about the LinuxMCE video even though my installation is far away in terms of functionality as shown there.
I'm currently testing LinuxMCE 810 beta (DVD installation) and right now I'm especially interested into house automation based on KNX/EIB. I couldn't find eibd on the system after the LinuxMCE installation. I have therefore installed it following the instructions on http://www.auto.tuwien.ac.at/~mkoegler/index.php/eibdeb
I'm using a USB interface to connect to the EIB and one issue was that after every reboot the findknxusb command finds a different USB device address (I have no idea why). I have solved this using findknxusb in the eibd start script so that eibd always starts on the current USB device ID. After this I’m now able turning on/off lights on a terminal using the groupswrite command. My problem is now that I cannot control lights from LinuxMCE and to be honest I am not sure whether I understand the way it supposed to work. I would have thought that LinuxMCE just needs destination IP address (i.e. 127.0.0.1) and TCP port (i.e. 6720) to talk to eibd.
However, I found these instructions http://wiki.linuxmce.org/index.php/EIB/KNX_with_eibd and modified the EIB template (#49) - I have deleted all RS232 related device parameters and added parm ‘bus type’ and gave this a default value of ‘usb’. I also added parm ‘bus address’ but I wasn’t sure how to configure this as this value keeps changing after every reboot. After trying several things I came back to my original idea that this communication should be TCP-based and modified the EIB template (#49) again. This time I added parms ‘Server IP’ and ‘TCP Port’ and gave that a try but again without success. What do I need to do to control my EIB lights using my USB EIB port?

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: eibd via USB
« Reply #1 on: November 09, 2009, 02:41:25 pm »
hi lennox,

maybe this thread is interesting for you: http://forum.linuxmce.org/index.php?topic=9052.0

Now i have the old driver online because the new implementation with eibd don't work i've expected. The old implementation only works with RS232 and it can't "read" from the bus... that's not very good, but i can control lights, thermostates and blinds...

avajon

Lennox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: eibd via USB
« Reply #2 on: November 09, 2009, 05:09:38 pm »
hi avajon,
ok, I'd like to give that a try. What do I need to do? Did I get this right I need to download the binary file http://vt100.at/files/EIB-32bit-0810-binary, rename it to EIB and then replace the original usr/pluto/bin/EIB ? Anything else?
I also didn't understand "you need add further GAs to the port/channel field"
Many thanks for your help.

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: eibd via USB
« Reply #3 on: November 10, 2009, 10:12:26 am »
hi lennox,

yes, download the file, replace the old /usr/pluto/bin/EIB (make a copy of the old one), restart the dcerouter.
Before you have to start eibd - i don't know the command with usb exactly. In the device template you have to add address and port (i think) - this are the parameters to connect to the eibd - not to the usb. My main Problem with the new EIB was the high CPU-Load - it uses nearly 100% of the cpu, so i removed it. I'll hope i have the time to make a build system so i can try to fix this problem...


Lennox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: eibd via USB
« Reply #4 on: November 10, 2009, 12:53:17 pm »
hi avajon,
I have tried this last night but had no luck. The eibd is automatically starting (rcconf) through a script without issues. As mentioned above I am able turning on/off lights on a terminal using the groupswrite command (groupswrite ip:127.0.0.1 1/2/3 1). However, it didn't work with LinuxMCE. Was this new driver ever tested with USB? I'm considering now buying a RS232 FT1.2 (costs about 200€++ incl. the bus coupler) but I wonder whether this makes a lot of sense if LMCE can't read from the bus. According to Hari's statement "… It will listen to the additional GAs, so no direct read, but it will state the change of the devices from those telegrams …". If I turn on a light using a switch and not LMCE I guess LMCE would not be aware of the current state of this light. Is this right?

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: eibd via USB
« Reply #5 on: November 10, 2009, 01:12:13 pm »
hi,

i've managed to turn on/off lights with the new driver - but no dimming. What are the logs saying (/var/log/pluto/xx_EIB.log)? I think you don't have to read the states from the devices - when it listens to the bus and gets a turn on light it should update the state in lmce. Now, this don't work with the old driver. Sure, this is not very good, but i use lmce and eib every day. It's really cool when you sit on the couch and can turn on/off the lights with the nintendo wii remote control :)
i don't know if it makes sense for you to buy a new rs232 FT1.2...


Lennox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: eibd via USB
« Reply #6 on: November 10, 2009, 01:46:20 pm »
I think I know now what my issue is but I can't test right now. I believe the way I'm starting eibd is wrong. It's got to be eibd –u … etc. to enable LMCE to talk to eibd using Unix sockets. I originally thought this communication is TCP/IP based but this is probably not the case. I'll find out tonight …

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: eibd via USB
« Reply #7 on: November 10, 2009, 01:51:29 pm »
with this command i start eibd (with rs232 FT1.2): eibd -i -R -S -T -D -u ft12:/dev/ttyS0 i think you have to use /dev/usb...

Lennox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: eibd via USB
« Reply #8 on: November 11, 2009, 12:46:14 pm »
Hi avajon, 
eibd –u … did the trick. I am now able turning on/off lights through my USB interface. Like on your system, the CPU utilisation goes up to 99% - EIB is consuming up to 47%. Dimming does not work. Since I'm not a programmer I hope you or someone else will fix this. I'll be happy to help testing.
Cheers,
Lennox

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: eibd via USB
« Reply #9 on: November 11, 2009, 01:07:54 pm »
cool. great to hear that it works :)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: eibd via USB
« Reply #10 on: November 11, 2009, 10:24:00 pm »
What kind of KNX/EIB PC interfaces and devices do you use guys? If it isn't secret of course :)
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

avajon

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: eibd via USB
« Reply #11 on: November 12, 2009, 10:07:58 am »
hi nite_man,

i use a Berker RS232 FT1.2 interface. I don't know the exact order number, but if you want i can find it out.


Lennox

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: eibd via USB
« Reply #12 on: November 12, 2009, 12:33:05 pm »
I am using a 'Jung 2130 USB REG' interface. Don't know the order number right now but if required I can post it later on.

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: eibd via USB
« Reply #13 on: November 12, 2009, 03:11:05 pm »
Thanks a lot. It'd be nice if you add your devices into wiki. Because currently we don't have any KNX/EIB devices there.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: eibd via USB
« Reply #14 on: November 13, 2009, 04:59:47 pm »
Hi avajon, 
eibd –u … did the trick. I am now able turning on/off lights through my USB interface. Like on your system, the CPU utilisation goes up to 99% - EIB is consuming up to 47%. Dimming does not work. Since I'm not a programmer I hope you or someone else will fix this. I'll be happy to help testing.
Cheers,
Lennox

dimming and the cpu utilisation is fixed in svn.
rock your home - http://www.agocontrol.com home automation