New binding: Isy

Hi,

I have an initial release for a Openhab 2 binding for the Isy device.

Current features:
Can auto discover nodes (typically insteon devices) for many different types of insteon devices.
Can auto discover variables
Can auto discover programs (though ability to run, stop, runElse etc not currently implemented.
Control many insteon devices. e.g. light level on dimmers, switch for relays, etc.

I have not hooked up auto-discovery of the Isy itself. Just go to the inbox, click + and select isy binding. Then pick manually add, and pick the bridge. Then enter user name, password, and the IP address of the device. IMPORTANT, enter the IP address, not the url (don’t include http, or tcp, etc)

Would be great if there are others who would like to access their isy device via openhab, and could help prioritize future development.

Here is the source for the binding

You should be able to download the jar file from the following link, and drop it into your addons folder.

https://github.com/QuailAutomation/openhab2-addons/releases/download/0.1/org.openhab.binding.isy-2.1.0-SNAPSHOT.jar

This really is an alpha release so there will be some growing pains to start off.

cheers,
Craig

1 Like

I’m curious what it is used for, so I took a quick peek.

  • you didn’t create a feature branch in your repo, did you?
  • the snapshot jar has 2.0.0 marker, but it should be 2.1.0 since yesterday :wink:
  • the source doesn’t include any README.md documentation

Deep link to the source in master branch of your repo:
https://github.com/QuailAutomation/openhab2-addons/tree/master/addons/binding/org.openhab.binding.isy

1 Like

thanks for the feedback Robert.

I’ll address those things.

In your opinion, is it just easiest for me to create a new fork of the openhab2-addons and drop all my latest files into a branch named as suggested (e.g. create a branch called isy-binding or something)? I missed doing that as I got started. I’m not particularly interested in all the commit history up to this point anyways.

thanks,
Craig

You’ll just have to create a new branch at your current HEAD.
Then you can reset master to the last commit pulled from origin. Done :wink:

here is a link to the releases for the binding.

Just came across this thread. I have a number of Insteon devices that I manage through an ISY. I’m currently integrating the ISY into OH using the old ISY binding version 1.9. It works well, but has it’s draw backs.

I downloaded your jar and started testing it out. Things seem to be working well. I was able to quickly connect to my ISY and then use auto discovery to find devices, scenes, programs, and variables. I really like that the binding uses DON and DOF commands so the ramp rates setup in ISY are used. I also like the Paddle Action channel. I can use that for some rules in OH. So far I’ve successfully tested a SwitchLinc, On/Off Outdoor Module, Motion Sensor, and a scene, I have not seen problems with these.

Here are the things I see that are missing or not working:

  • LampLinc devices have the On/Off channel. These devices are dimmable so they should have the Load Level channel
  • I have multiple KeypadLinc8 wall switches that do not show up in the Inbox through auto discovery. Are these not supported?
  • I have multiple TriggerLinc devices that also don’t show up in the Inbox.
  • I added one of my ISY programs as a Thing and linked the Run channel to a switch item in OH. When I turn the OH item on, I don’t see the ISY program run. I also tried running the program in ISY and didn’t see the OH item status change.

Let me know when a new jar is available and I can test again. This is really great work and I’m happy to help where I can.

Thanks for the feedback.

I have made a couple changes to the binding which should help me zero in on the issues.

Specifically, there is now a new attribute for every insteon device called Device ID. This will help me add support for devices I don’t have, or identify issues in the current implementation.

There is also a new Thing Type unrecognized. This will allow the binding to create a skeleton of a thing so users can easily see the device id, and then we can add support for it.

Could you download the latest jar from my build server, located at:

https://s3-us-west-2.amazonaws.com/craigham-pub/org.openhab.binding.isy-2.1.0-SNAPSHOT.jar

You will have to remove those problem devices from your configuration, and then rediscover them to take advantage of these changes.

As for the programs. I don’t have support for the status of the program yet.

However, I can run the programs.

Here is a line from my sitemap:

Switch item=isy_program_aaaee208_shower_preheat_control mappings=["run"="Run","runThen"="Run Then","runElse"="Run Else","stop"="Stop"] label="Preheat Shower"

I just added back the run channel to programs. That allows a simple switch to run the program. this is helpful when integrating in with the hue emulation (Alexa).

1 Like

Thanks for the sitemap example. I just had a simple switch with no mapping. This explains why my setup wasn’t working.

Downloading the new jar now. I’ll let you know what I find.

I have also added a run channel, so that will allow a simple default switch within the sitemap to run the program.

I looked through the logs and found the DeviceId for my devices that were unrecognized. Here is the DeviceId with the description of the device shown in the ISY GUI. I also mention what channels I think each should have based on their capabilities.

  • DeviceId 01.0E = (B2457D2) LampLinc BiPhy v.43 [LoadLevel, PaddleAction]
  • DeviceId 02.09 = (2456S3) ApplianceLinc v.42 [On/Off]
  • DeviceId 01.19 = (2476D) SwitchLinc Dimmer W/Bepper v.38 [LoadLevel, PaddleAction]
  • DeviceId 02.1C = (2476S) SwitchLinc Relay - Remote Control On/Off Switch v.3A [On/Off]
  • DeviceId 01.41 = (2334-2) KeypadLinc Dimmer 8 Buttons v.44 [LoadLevel]
  • DeviceId 01.1C = (2486D) KeypadLinc Dimmer 8 Buttons v.36 [LoadLevel]
  • DeviceId 02.08 = (2473) OutletLinc v.38 [LoadLevel]
  • DeviceId 10.02 = (2421) TriggerLinc v.43 [On/Off]

I also played around with programs. I was able to run a program through the Run channel. That is a very handy feature. Especially since it can be combined with the Hue Emulator and Google Home. I still couldn’t get the program to work through the Control channel. What item type should I use for the Control channel?

I’m going to test setting up Things and items through flat file next. I’ll let you know what i find.

For the programs /control channel, this is what the simple linking puts in:

smarthome:items | grep _control

isy_program_isybridge_shower_preheat_control (Type=SwitchItem, State=NULL, Label=Control, Category=Program Control)

then use that sitemap example.

1 Like

there should be a new build now on my integration server which adds most of those device types.

after you do a discovery, you should be able to look at configuration things, and see some designated unrecognized. I did this in case some users can’t find the log file.

You may have to delete the things which were of the types you mentioned above, not sure if it will update things with the new discovery results.

I don’t have any of those items, and I haven’t taken on good unit testing within the binding so there may be some silly bugs. Just let me know and I will address right away.

thanks,
craig

Sorry for the delay. Been a busy week at work.

I tried out the new jar and a few of the new DeviceIds appear to be working well. Here is what I found on the other ones:

  • DeviceId 01.0E - needs to be changed to a DIMMER_THING_TYPE
  • DeviceId 02.1C - needs to be added as a SWITCH_THING_TYPE
  • DeviceId 01.41 - This shows up as a KeypadLinc Dimmer 6 in PaperUI, It is actually an 8 button KeypadLinc Dimmer. Also, there are only channels for Buttons A through D. This device also has buttons E through H.
  • DeviceId 01.1C - This shows up as Unrecognized Device. It should also be a KeypadLinc Dimmer 8.
  • DeviceId 02.08 - This shows up as Unrecognized Device. It should be a SWITCH_THING_TYPE
  • DeviceId 10.02 - This shows up as Unrecognized Device. This is a TriggerLinc that says whether a door is open or closed. Can you set it up as the GARAGEDOORKIT_THING_TYPE? I think they have the same capabilities.

Also, I’m trying to add Things and Items through flat file config. I find that easier to work with than PaperUI. I have the Things working correctly but am having trouble with items. Here is my isy.things file

Thing isy:isyBridge:22d8f1a9 [ ipAddress="192.168.xxx.xxx", user="admin", password="xxxxxxxxxx"]
Thing isy:switch:22d8f1a9:FamilyChairLamp [name="Family Chair Lamp", deviceid="01.0E",address="2E 77 D4"]

Here is my isy.items file:

Switch isy_family_ChairLampState “Chair Lamp” { channel=“isy:switch:22d8f1a9:FamilyChairLamp:state” }

The Things are loaded w/o a problem. When the Items are loaded I get the below error:

14:57:55.305 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occured while informing handler:null
java.lang.NullPointerException
at org.openhab.binding.isy.handler.AbtractIsyThingHandler.getBridgeHandler(AbtractIsyThingHandler.java:13)[224:org.openhab.binding.isy:2.1.0.201702200253]
at org.openhab.binding.isy.handler.IsyInsteonDeviceHandler.handleCommand(IsyInsteonDeviceHandler.java:74)[224:org.openhab.binding.isy:2.1.0.201702200253]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:207)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.informHandlerAboutLinkedChannel(ThingLinkManager.java:264)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.access$3(ThingLinkManager.java:255)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager$1.added(ThingLinkManager.java:125)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager$1.added(ThingLinkManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.allItemsChanged(ItemRegistryImpl.java:105)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:350)[123:org.eclipse.smarthome.model.item:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.lang.Thread.run(Unknown Source)[:1.8.0_111]

Can you tell me what I’m doing wrong in the isy.items file?

I’ll continue testing the jar and let you know what else I find. I’m really excited with this binding. It gives access to a lot more of the ISY features than the old binding. Thanks for the hard work!

That exception is because the bridge isn’t hooked up to the item properly. I’m not sure how to do that via files to be honest. Even when I use the Paper UI, for things, it shows bridge, but never has that filled in with the ISY bridge.

In short, not sure how the bridge is linked to things. I just specify it within the discovery routines and it seems to work.

I’ll take a look at the other issues next time a get a chance. Thanks for the feedback.

craig

DeviceId 01.0E - needs to be changed to a DIMMER_THING_TYPE

Could you delete this thing, and then re-discover it? It should be a dimmer now.

DeviceId 02.1C - needs to be added as a SWITCH_THING_TYPE

Done

DeviceId 01.41 - This shows up as a KeypadLinc Dimmer 6 in PaperUI, It is actually an 8 button KeypadLinc Dimmer. Also, there are only channels for Buttons A through D. This device also has buttons E through H.

I have added keypadlinc8. So all 8 buttons are dimmers? They are still switches for now. Please confirm that all 8 buttons are dimmers and I will adjust.

DeviceId 01.1C - This shows up as Unrecognized Device. It should also be a KeypadLinc Dimmer 8.

Done

DeviceId 02.08 - This shows up as Unrecognized Device. It should be a SWITCH_THING_TYPE

Done

DeviceId 10.02 - This shows up as Unrecognized Device. This is a TriggerLinc that says whether a door is open or closed. Can you set it up as the GARAGEDOORKIT_THING_TYPE? I think they have the same capabilities.

Done

If you are having trouble with a device that you had previously added, try removing them and re-discovering. If you are using files, then maybe this doesn’t matter.

Grab latest build for these changes.

https://s3-us-west-2.amazonaws.com/craigham-pub/org.openhab.binding.isy-2.1.0-SNAPSHOT.jar

I’m not sure if the ISY treats all the buttons on a KeypadLinc 8 as dimmers or switches. Button A is a dimmer and controls the load (light) connected to the KeypadLinc. Buttons B to H act as controllers for other Insteon devices. If you hold one of the buttons down, it will brighten/dim the Insteon device it is controlling if that device supports it. The ISY admin console shows button A like a regular dimmable device. It shows buttons B to H differently.

Here is a screenshot of the ISY admin console for button A of the KepadLinc8.

Here is a screenshot of the ISY admin console for button B of the KepadLinc8.

I’m going to download the new jar now and test it out. Thanks

I finally figured out how to do the Thing and Item configuration through flat file!

Here is an example of the isy.things file:

Bridge isy:isyBridge:MyISY "My ISY" [ user="admin", password="*****", ipAddress="192.168.xxx.xxx" ] {
	Thing isy:dimmer:MyISY:MediaRoom "Media Room" [ address="44 FD 84", name="Media Room", deviceid="01.20" ]
	Thing isy:keypadlinc8:MyISY:KitchenOverhead "Kitchen Overhead" [ address="38 FB C7", name="Kitchen Overhead", deviceid="01.41" ]
}

And here is an example of the isy.items file:

Dimmer isy_media_Overhead { channel="isy:dimmer:MyISY:MediaRoom:loadlevel" }
Switch isy_kitchen_Overhead  { channel="isy:keypadlinc8:MyISY:KitchenOverhead:button_a" }

I am having some issues with the KeypadLinc8 I’ll get some debug info and send to you in another post.

I did some testing with the KeypadLinc8. To do the test I created Switch items for each of the button channels. I then turned each switch item on, then turned each one off. I was able to successfully turn on/off and dim/brighten the light. Also, I saw that the items updated in OH2 when I manually clicked the buttons on the KeypadLinc8.

The only problem I found is that the address for the buttons has the wrong device id. When I clicked on button A, the binding tried to updated address “38 FB C7 2”. Button A should be “38 FB C7 1”. Button B is 2, C is 3, D is 4, E is 5, F is 6, G is 7, and H is 8.

I’m going to continue setting up more devices and testing. I’ll let you know if I find anything else.