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?
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:
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.
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.
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.
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 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.
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.