Insteon Smoke Bridge 2982-222 Setup for InsteonPLM Binding

Working on getting this device working. I’ve been able to setup the appropriate links on both my PLM and Smoke Bridge devices. I’m seeing traffic on the openhab logs, but it doesn’t seem to be working as expected. It does not seem that the items ever receive the OPEN command. For this particular device there is an “All Clear” message in the group 5 which I’ve added into the different features to close them as was suggested. If I comment that group 5 msg out the OPEN command does work, but the contacts never close. I could make a rule to close each one when all clear is detected, but I assume that isn’t the proper way to set this up. My setup is below. Where am I going wrong?

My own device file:

<xml>
 <device productKey="0x000027">
    <model>2982-222</model>
    <description>Smoke Bridge</description>
    <feature name="smoke">SmokeDetected</feature>
    <feature name="co">CODetected</feature>
    <feature name="test">SmokeTest</feature>
    <feature name="msg">NewUnknownMsg</feature>
    <feature name="battery">LowBattery</feature>
    <feature name="malfunction">SensorMalfunction</feature>
    <feature name="heart">Heartbeat</feature>
</device>
</xml>

Here are the device features I’ve added.

<xml>
<feature name="SmokeDetected">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="1">OpenedContactHandler</message-handler>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="CODetected">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="2">OpenedContactHandler</message-handler>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="SmokeTest">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="3">OpenedContactHandler</message-handler>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="NewUnknownMsg">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="4">OpenedContactHandler</message-handler>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="ClearDetected">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="LowBattery">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="6">OpenedContactHandler</message-handler>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="SensorMalfunction">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" group="7">OpenedContactHandler</message-handler>
    <message-handler cmd="0x11" group="5">ClosedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
<feature name="Heartbeat">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" cmd2="0x00" group="A">OpenedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>
</xml>

My Contact items for each msg

Contact smokeDetected "Smoke Detected [%s]" {insteonplm="AB.CD.EF:0x000027#smoke"}
Contact coDetected "CO Detected [%s]" {insteonplm=""AB.CD.EF:0x000027#co"}
Contact smokeTest "Test [%s]" {insteonplm=""AB.CD.EF:0x000027#test"}
Contact newUnknownMsg "Unknown Message [%s]" {insteonplm=""AB.CD.EF:0x000027#msg"}
Contact clearDetected "All Clear [%s]" {insteonplm=""AB.CD.EF:0x000027#clear"}
Contact smLowBattery "Low Battery [%s]" {insteonplm=""AB.CD.EF:0x000027#battery"}
Contact smMalfunction "Sensor Malfunction[%s]" {insteonplm=""AB.CD.EF:0x000027#malfunction"}
Contact smHeartBeat "Heartbeat [%s]" {insteonplm="AB.CD.EF:0x000027#heart"}

`

Sorry, that was my bad: there can only be one handler per command. So you cannot have two handlers with cmd=“0x11”. Only one of them will be called.

The whole purpose of the xml files was to enable people to support new devices without touching the java code, but somehow Insteon throws me a curve ball with every new device. End of rant. Want to say: this needs a new message handler, i.e. you will have to get the development environment up and all that, fun, fun. Getting the ide to work can be very painful at times. You can instead just run “mvn clean install” at the top of the workspace, then cd into the insteonplm subdirectories, edit the code using your favorite editor, and from then on just rebuild “mvn install” from the top of the insteonplm subdirectory. That way you don’t have to get the IDE working to get a insteonplm jar file.

Here’s the code:

public static class GroupBasedContactHandler extends MessageHandler {
		GroupBasedContactHandler(DeviceFeature p) { super(p); }
		@Override
		public void handleMessage(int group, byte cmd1, Msg msg,
				DeviceFeature f, String fromPort) {
			if (cmd1 != 0x11) {
				logger.debug("{} unexpected cmd1 found, dropping msg {}", nm(), msg);
				return;
			}
			int openGroup = getIntParameter("opengroup", -1);
			int closedGroup = getIntParameter("closegroup", -1);
			if (group == openGroup) {
				m_feature.publish(OpenClosedType.OPEN, StateChangeType.CHANGED);
			} else if (group == closedGroup) {
				m_feature.publish(OpenClosedType.CLOSED, StateChangeType.CHANGED);
			}
		}
	}

Put this into MessageHandler.java, right after the OpenedOrClosedContactHandler.

Then reference it in your device_features.xml like that:

<feature name="LowBattery">
    <message-dispatcher>DefaultDispatcher</message-dispatcher>
    <message-handler cmd="0x11" opengroup="6" closegroup="5">GroupBasedContactHandler</message-handler>
    <poll-handler>NoPollHandler</poll-handler>
</feature>

Hang in there, you are doing great!

Is there any way this fix to support the Smoke Bridge could make it into a release version of Openhab?

Does anyone know how to tackle this task. I get the code and the custom features file but I have no clue how to recompile a jar file. Furthermore, can this not be added to the code in Github.

Looking for some help here please. I’m not afraid to roll-up my sleeves and get in there, but I do need some guidance.

Did you ever get this to work?

I cannot roll this code in until it is tested. I do not have the device to test.

If you are willing to do the coding, I can do the testing.

I can test…please send me the jar file

I’d also be willing to test. Just bought a smoke bridge…

Hi Bernd,

I have a smoke bridge New in Box, I’d be willing to let you borrow if you wanted to test this out. I do not yet have a smoke detector though. Working that still.

Tom,

If you send me the device I can have a look at it. My address is at 11 Nolen Ln, Darien, CT 06820.
I just looked over the manual: there is a way to trigger the alarm without actually having a smoke detector attached.
Bear in mind that I can only work on this on the weekends, so it may take 2-3 weeks to get something working.

Bernd

Hi Bernd,

That would be great! I’ll try to get it into the mail in the next few days.

Thank you!

Hi Bernd,

OK, Smoke Bridge is in the mail. I’ll shoot you a PM with the tracking later tonight.

Thank you very much for your help/time. I’m not in any hurry, so what ever time frame you need is fine with me.

@tommycw10, @Bernd_Pfrommer

Hello gentlemen, I’m wondering if I can help with the testing of the Smokebridge binding. I’ve got one of these and have mastered Insteon Terminal to allow me to link different Insteon devices together. I’ve also cleared Groups 3-8 in anticipation of needed these for the different alerts. All I need to know now is how to call the information in Openhab. For example do I use the data, or contact values in the items?

Any info or pointing me to the right info is appreciated.

The smokebridge has been added to the binding (but documentation thereof not!). Do you have the latest snapshot of the binding (I think you need the OH 1.9 version)?
I’ll try and add some documentation once I get around to it.

I have the latest indeed. Thanks.

I added documentation, give it a shot. Items file is not debugged. The hardest part is setting up the groups using InsteonTerminal.

I am hoping somebody can help me here. I am fairly new to openhab2 and this is my first stab at Insteon. I used the Insteon PLM binding that came with Openhab2.

So I was able to pair the smoke bridge to the modem. I did however use the homelinc application rather than the Insteon Terminal.
I set up my .items file and insteon config file with the modem.
Looking at the logs file it appears to have connected successfully. It regularly polls the device and when I press the button on the smoke bridge to test it the next poll indicates I have 15 messages.

My question is how to setup the rules file so I can translate the messages to an actual notification.
Can anyone share their .rules file?

Also I am not sure I understand the top post and what the device.xml file is.

I have 5 smoke detectors, how do I differentiate them in openhab2.

Thanks in advance for any help.

First, I would expect you to see a message coming into the binding well before the next poll. It should be delivered right away when you exercise the test on the device.
I assume you have created some items that will change state when the message comes in.

I’m not familiar with OH2, but in OH1 there is an events log file that will have entries whenever an item changes state. Once you have that working, the rules should work just like they do for any openhab item.

Thanks Bernd,

I think the issue may be with how I set the item up. The only entry that I have in the items file is:

Number smokeBridgeNotification “smoke bridge” {insteonplm=“xx.xx.xx:F00.00.22#notification”}

I replaced the xx.xx.xx with the key on the device.
Are you able to show what entries are in your . items file?