genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
392 stars 155 forks source link

CM15A not connecting on FreeBSD #170

Closed JJ001 closed 9 years ago

JJ001 commented 9 years ago

Hi.

I have an AHP installation utilizing a CM15A with several lights and sensors. It functions properly but I need to update the computer and want to switch from Windows when I do. The new installation needs to be on a computer running FreeBSD.

I found HomeGenie which seems like the best prospect. The installation instructions for "Other UNIX systems" include modules that, I think, are not needed for my setup (e.g. lirc) or are already part of the OS (e.g. libusb). Also, the FreeBSD package for mono seems to include all of the additional mono add-on packages referenced. After downloading etc. the tgz file and starting mono, HomeGenie runs and can be configured by a web browser on another computer. (I configured the CM15A on the USB port and an X10 light at A3 plus a couple of the other programs.) I attached my CM15A and a test light from the AHP setup and everything looked right. Everything else works as expected but nothing happens when I switch the X10 light on and off.

A USB capture show the CM15A announcing itself when it is plugged in. A device dump shows all of the data expected for the device. The event log in HG shows the light being switched on and off. But the USB capture does not show any data sent to the CM15A from HG.

Is there something I can do to tell where the problem is?

genemars commented 9 years ago

hi @JJ001 , HG requires a symbolic link to the libusb path. The mechanism of probing the right libusb location is only tested on debian (x86 or arm). Probably the location/name of libusb on free bsd is different. The libusb path resolve limitation can be fixed here: https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/Program.cs#L63

JJ001 commented 9 years ago

Thanks for the fix.

I don't know C# yet so I took the easy way out. When I get a little proficient with C# I might try to understand the code you pointed to and see if I can fix it properly. For now, a symbolic link in the HG directory to the libusb.so module seems to operate correctly.

For reference, the module is at /usr/lib/libusb.so which is a symbolic link to /usr/lib/libusb.s0.3