• You've been granted Beta access to this site, allowing you to explore some of the new features while they're still under construction. More information can be found in the Beta forum.

Linux INSTEON scene management software

bpwwer

Member
I just put a new version up on my site. This version addes the ability to do device detection. It was a lot easier than I though it would be. The web page screen shots are also updated.

Now to start working on the keypadlinc configuration code....

Bob
 

johnnynine

Active Member
Great, thanks. I compiled it but was having PowerLinc issues this weekend so I wasn't able to get it to work yet. I've got a line noise filter ordered which should be here this week.
 

johnnynine

Active Member
I entered all of my devices including the PowerLinc and a ControlLinc.

When I choose Discover existing Scenes the program crashes and I get:

Code:
[[email protected] ilink2]# ./ilink
Error opening device
Querying Bedroom ControlLinc
Segmentation fault
[[email protected] ilink2]#

Then when I run ilink again it fails to initialize the PowerLinc.

I then have to reboot (ie. reboot the linux virtual machine) to get ilink to communicate with the powerlinc.

Johnny
 

bpwwer

Member
johnnynine said:
I entered all of my devices including the PowerLinc and a ControlLinc.

When I choose Discover existing Scenes the program crashes and I get:

Code:
[[email protected] ilink2]# ./ilink
Error opening device
Querying Bedroom ControlLinc
Segmentation fault
[[email protected] ilink2]#

Then when I run ilink again it fails to initialize the PowerLinc.

I then have to reboot (ie. reboot the linux virtual machine) to get ilink to communicate with the powerlinc.

Johnny
The first line there, "error opening device" means that the program never was able to connect with the PowerLinc. If you see that, don't even bother trying anything else.

The error checking is very good at this point although I don't think you really need to re-boot. You might have to go throught the steps again to get the USB driver working. (unload usb driver, re-attach plc, run detach, load driver).

Make sure the correct ID and version for your PLC is displayed in the lower left before trying any commands that will communicate with the PLC. If it's not right, quit and restart the program, if that doesn't work, make sure the driver is loaded correctly and has claimed the PLC.


Bob
 

johnnynine

Active Member
bpwwer said:
You might have to go throught the steps again to get the USB driver working. (unload usb driver, re-attach plc, run detach, load driver).
How do I unload the usb driver? Do I run an application or just unlplug the PLC?

I have tried a few things without success but I must have missed something.
 

bpwwer

Member
johnnynine said:
bpwwer said:
You might have to go throught the steps again to get the USB driver working. (unload usb driver, re-attach plc, run detach, load driver).
How do I unload the usb driver? Do I run an application or just unlplug the PLC?
Yeah, the interaction between the driver, the PLC and the OS doesn't work quite as well as it all should.

Every time you plug the PLC into the USB port, the HID driver will claim the resource, even if the USB driver is already running. So what this means is that you need to go through the same steps every time. If you unplug the PLC from the usb port or from the wall.

I think the iplc driver makefile has a target to remove the driver but it is simply 'rmmod iplc' (done as root, of course). So to get back up and running:

1. rmmod iplc
2. plug in the PLC and connect via USB
3. detach
4. insmod iplc.ko

There are ways around this, but it involves modifying the HID driver and rebuilding the kernel.

Bob
 

ginigma

Active Member
I've got the GUI (0.1.2a) up and running and have a few questions:

1. I can manually add a device and discover a device Ok. However, I found that if I add the same device a second time, it will let me. Perhaps some error checking based on device address would help. If I select the device from the Device Programming dropdown and click Delete Device, nothing happens.

2. If I select a device (from the Device Programming dropdown) and click List Linktable, nothing happens. No error message or console message. In general, it doesn't look like any of the Device Programming buttons are working. [edit: After discovering existing scenes, when selecting a device, it had information in the list. Deleting a device from the list produced a Segmentation fault.]

3. During discovery, it read a SwitchLinc V2 ver2.2 as a "PowerLinc V2 pre 1.6" and Firmware "0.1". I also received 20 "** (ilink:31630): CRITICAL **: file pango-layout.c: line 1773 (pango_layout_get_cursor_pos): assertion `index >= 0 && index <= layout->length' failed" messages in the console window.

4. During Discover existing scenes, it queried my devices. I added a device to a scene, but couldn't delete it from the scene. Not sure what's going on. Are Scene Group #'s supposed to correspond to the controller type, e.g. a ControLinc would have scenes 1-5, a SwitchLinc would only have 1 scene, etc?

5. File -> Save always prompts for a filename. Shouldn't it save to the current open file? Only File -> Save As should prompt for a filename.

In general I'm pleased with what this program will be able to do. I started using PowerHome to create scenes, but that is overkill for my needs right now. ilink is (will be) perfect.

I've started compiling a FAQ based on Q&A in this thread and my own "fooling around." I'll post a link here in a couple days.

Thanks for your help.

-charles
 

bpwwer

Member
Thanks for all the feedback Charles!
ginigma said:
1. I can manually add a device and discover a device Ok. However, I found that if I add the same device a second time, it will let me. Perhaps some error checking based on device address would help. If I select the device from the Device Programming dropdown and click Delete Device, nothing happens.
You're right, it doens't do any error checking to prevent the same device from being entered twice. I thought about that at one point and then forgot. I'll add it to the list of things to fix. Delete device is implemented. It should remove the device from all scenes and from all the drop down boxes. I'll have to look into what it's doing. It isn't saving a device that was deleted but the device seems to stay in the drop down boxes.

ginigma said:
2. If I select a device (from the Device Programming dropdown) and click List Linktable, nothing happens. No error message or console message. In general, it doesn't look like any of the Device Programming buttons are working. [edit: After discovering existing scenes, when selecting a device, it had information in the list. Deleting a device from the list produced a Segmentation fault.]
List Linktable doesn't actually do anything yet. I was thinking it would query the device for the actual link table. Right now it will display what the program thinks the link table should be. This is what is suppose to get sent to the device when you program a device.

ginigma said:
3. During discovery, it read a SwitchLinc V2 ver2.2 as a "PowerLinc V2 pre 1.6" and Firmware "0.1". I also received 20 "** (ilink:31630): CRITICAL **: file pango-layout.c: line 1773 (pango_layout_get_cursor_pos): assertion `index >= 0 && index <= layout->length' failed" messages in the console window.
You're talking about discover device? Good thing someone is testing it. So far I've only tested with one Icon dimmer switch. I'll try some more devices and see if I can track this down.

ginigma said:
4. During Discover existing scenes, it queried my devices. I added a device to a scene, but couldn't delete it from the scene. Not sure what's going on. Are Scene Group #'s supposed to correspond to the controller type, e.g. a ControLinc would have scenes 1-5, a SwitchLinc would only have 1 scene, etc?
Correct. Another enhancement would be to limit the group numbers selectable based on the device type listed as scene controller. Delete device from scene didn't work? I'll have to look into that.

ginigma said:
5. File -> Save always prompts for a filename. Shouldn't it save to the current open file? Only File -> Save As should prompt for a filename.
You're right, it should but doesn't yet. I started adding in code to keep track of changes and such so that save and save as work right. Hey, at least it lets you save it!

ginigma said:
In general I'm pleased with what this program will be able to do. I started using PowerHome to create scenes, but that is overkill for my needs right now. ilink is (will be) perfect.

I've started compiling a FAQ based on Q&A in this thread and my own "fooling around." I'll post a link here in a couple days.
Thanks. I'm glad you like it and appreciate the feedback. Once I got all my devices programmed (using the command line version), I've been somewhat reluctant to try too many things using the GUI version. Mostly I've been adding new features. I have a keypadlinc configuration dialog somewhat working (needs testing) and have started on the code to program timers into the PLC. I guess I ought to step back and do some bug fixes :angry:

Bob
 

bpwwer

Member
New -- version 0.1.3a now available.

This is mostly bug fixes.
  • Duplicate device ID's are not allowed.
  • Delete device now works.
  • Delete device from scene now implimented.
  • Group number range set based on scene controller type.
There is a new menu item/dialog box for KeypadLinc configuration. This is real experimental at this time. I've used it to read the data off my KeypadLinc but I have not tried to change anything. Use at your own risk :angry:

Bob
-- Linux scene management software http://www.bobsplace.com/ilinks/
 

ginigma

Active Member
Thanks for the info Bob. I just received a KPL yesterday and I'm hoping to have some time to fool around with it this week. Unfortunately my real job keeps getting in the way of me working on HA.
 

johnnynine

Active Member
I looks like it's starting to take shape, good job.

I have 0.1.3a and have found the following issues:

Delete Scene gives me a Segmentation fault.
Save gave me a segmentation fault and I my old saved file was replaces with a new one with comments in it only.
Selecting Discover Scenes after entering all of my devices (except the powerlinc) I got:

[[email protected] ilink2]# ./ilink
Querying KeypadLinc
Timeout in usb_cts (0)
Timeout in usb_cts (0)
Timeout in usb_cts (0)

Timeouts continued until I hit CTRL-C. If I then Restart ilink, it can't find the powerlinc until I rmmod, unplug powerlinc, and start over.

Keypadlinc Configuration locked up on me as well when it was reading from keypadlinc.

On the plus side, Device Discovery worked. It would be nice it it would auto add the device and allow rename later so we could add more than 1 at a time.

Device Control also worked fine.

Johnny
 

bpwwer

Member
Hi Johnny,

I uploaded a new version that might fix some of your problems. I know I found a couple of bugs but don't remember exactly what they were. This version has two new menu items. Neither of these are fully functional yet. I added a copy scene dialog box for copying a scene from one controller to another. I started thinking about having to re-create a scene on another controller and decided it would be better to let the computer do it for me. I added a dialog box for PLC timers. This will currently read the timers from the PLC but doesn't yet allow you to modify them. I made some changes to the keypadlinc configuration code but I'm still not sure this is working right

johnnynine said:
Delete Scene gives me a Segmentation fault.
I don't think I've tried this recently, I'll have to look into it. I don't think any of my changes yesterday directly effect this.

johnnynine said:
Save gave me a segmentation fault and I my old saved file was replaces with a new one with comments in it only.
I did a number of file saves yesterday and didn't see this. Probably a scene is messed up and causing problems. I'll look at the save code and try to make it more robust. I'd suggest making backup copies or saving to a new file name for now. That way you won't lose everything.

johnnynine said:
Selecting Discover Scenes after entering all of my devices (except the powerlinc) I got:

[[email protected] ilink2]# ./ilink
Querying KeypadLinc
Timeout in usb_cts (0)
Timeout in usb_cts (0)
Timeout in usb_cts (0)
I think this can only happen if the PLC stops communicating. I had this problem a lot when I was trying to use libusb to talk with the PLC. Since I switched to using the usb driver, I haven't had this problem. It is interesting that you see it when trying to read from the KeypadLinc. While I do see some corruption in messages back from remote devices, I haven't had mine lock up.

johnnynine said:
On the plus side, Device Discovery worked. It would be nice it it would auto add the device and allow rename later so we could add more than 1 at a time.

Device Control also worked fine.
That's a good idea. It probably isn't too hard to do but youi'll have to remember the order that discovered them in when you go to rename them. But I guess that's not really my problem ;)
 

bpwwer

Member
ginigma said:
Thanks for the info Bob. I just received a KPL yesterday and I'm hoping to have some time to fool around with it this week. Unfortunately my real job keeps getting in the way of me working on HA.
The weather wasn't very nice yesterday so I had some time to write code. Otherwise, it's an hour here and there. I need more spare time ;)

I also installed my new KeypadLinc so I now have one to experiment with.
 

ginigma

Active Member
(johnnynine @ Mar 5 2006, 10:08 PM)
On the plus side, Device Discovery worked. It would be nice it it would auto add the device and allow rename later so we could add more than 1 at a time.

Device Control also worked fine.
That's a good idea. It probably isn't too hard to do but youi'll have to remember the order that discovered them in when you go to rename them. But I guess that's not really my problem
I second this. It would be a great time saver to discover all the devices without all that walking back and forth.
Hopefully I have a chance to take a look at the new version tonight.
 
Top