OpenHAB2 INSTEONPLM Item Update Rules Not Triggered

I’ve worked for most of the holidays to get OpenHAB to trigger an event based on change in status from a motion detector. And am frustrated with a complete lack of success. I’ve attempted to find any relevant article in the user community or wider via endless searches in Google. And I’ve read and reread all the instructions for ITEMS, RULES, SITEMAPS, etc., but haven’t found anything that has helped solve my problem. I’ve never posted anything on a user community board, but am now. I’m kind of like most males who refuse to ask for directions and help when lost. But I’m to the point where I need to ask for directions/help…

I’ve an INSTEONPLM modem, a motion detector, a dimmer and a switch. I put them at the bottom of demo.items and commented-out nearly everything else in demo.items (and in demo.sitemap) in an effort to “keep it simple, stupid”…

I

Here is my openhab.log file:
OpenHAB - openhab.log.pdf (29.6 KB)

I have three .rules files; one for the dimmer, one for the motion detector, and a third for the switch. They are pretty similar. Each file contains a rule that writes an entry to logInfo on startup. You can see in openhab.log that each of the three startup rules is invoked and entries are written successfully to logInfo. Here is the .rules file for the dimmer:
OpenHAB - PADdimmer1.rules.pdf (22.4 KB)

Here is the rules file for the motion detector:
OpenHAB - PADmotion1.rules.pdf (22.1 KB)

And here is the rules file for the switch:
OpenHAB - PADswitch1.rules.pdf (22.1 KB)

My problem is that I cannot get rules written on “received update” or “changed” events to trigger the relevant rules, which has me completely baffled. Works for “received command”, but not for status updates or changes. I have five test scenarios which are intended to show what works and what doesn’t. The details can be seen in the insteonplm.log file (attached further below).

First scenario is to turn ON the switch via the classic UI. This works fine and the “Item Switch1 received command ON” rule is invoked successfully. I then turn the switch OFF via the UI and the “Item Switch1 received command OFF” rule is invoked successfully and INFO entries are written to the events.log and openhab.log files. So far so good…

Second scenario is to turn ON the dimmer via the classic UI. This works fine and the “Item Dimmer1 received command ON” and “Item Dimmer1 received command OFF” rules are invoked successfully and INFO entries are written to the events.log and openhab.log files. Again, so far so good. But subsequent actions don’t work…

Third scenario is to turn ON the dimmer via the ON/OFF knob on the lamp itself. This caused a change in item status as reflected in the insteonplm.log, but was not caused by me sending an ON or OFF commands via the UI as was done in the first scenario. I expected the “Item Dimmer1 received update ON” and “Item Dimmer1 received update OFF” rules to be invoked by the change in status, but they weren’t. Or maybe the “Item Dimmer1 changed from OFF to ON” rule would be invoked by the change in status. But no INFO entries were written to any log file…

The fourth scenario is similar to the third scenario only I physically turned the switch ON and OFF in the garage. No rules were invoked and no status update entries written to the log files.

Fifth scenario was to activate the motion detector. Again one can see activities posted in the insteonplm.log file, but no rules are invoked when the motion detector status becomes “OPEN” or when it changes to “CLOSED” later.

At present both Switch1 and the INSTEONPLM modem are linked as responders to Motion1, which is a controller. (I can provide output from Insteon Terminal if needed.) The motion detector in the garage turns on the lights in garage via the switch when there is motion. And it turns off the lights one minute after the last motion was detected. That’s been working fine for several months. But I want to install a second (new) motion detector outside and use OpenHAB to turn on the outside lights when motion is detected in the driveway. I expect to trigger the outside lights via a change in status for the motion detector from CLOSED to OPEN. I wanted to start simple and confirm I can trigger rules using the motion detector in the garage before I try anything more complex. And I’m stymied because I can’t trigger any action off the existing motion detector.

Here is the insteonplm.log file. You can see that I’ve edited the file and inserted comments such as “=====> Manual 'ON” Switch1 via demo.sitemap classic UI" at appropriate places in the files in an effort to indicate where I took the actions in scenarios one thru five…
OpenHAB - insteonplm.log.pdf (86.2 KB)

I’d appreciate help in figuring out what I’m doing wrong. Thanks…

I’m looking primarily at the motion detector scenario. I have two 2842-222 motion detectors. I use one to control a 2672-222 LED build and another to to control a Philips Hue bulb (both via openHAB). Looking at your insteonplm.log, I can see the binding is processing the OPEN/CLOSED events correctly and logs that it is publishing the related openHAB events. You are saying you never see a motion-related update event in the events.log? If so, it sounds like the problem is somewhere between when the insteonplm binding logs the intent to publish the update and when the update is actually published on the openHAB event bus.

There are a few TRACE-level log statements in org.openhab.binding.insteonplm.internal.device.DeviceFeatureListener. If you enable that specific logging (enabling TRACE for everything will be a lot of logging), then it might help to narrow down the source of the problem (look for “new state” or “old state” substrings in the TRACE-level log messages).

Also, what version of the binding are you using?

Steve1: thanks for your quick reply… Am running org.openhab.binding.insteonplm-1.7.0.jar which I downloaded as part of V2.0.0.alpha2-addons.zip on December 23rd…

Yes, I’m saying I never see an update event for any device. That’s for the motion detector, the switch and the dimmer. Both the switch and the dimmer work fine when I send commands to them via the classic UI…

Enabled the TRACE-level log as you suggested and reran. Only tested the motion detector. (I could rerun all of my five scenarios if you’d like…) There are two “new state” and seven “old state” TRACE entries in the insteonplm.log (.pdf file of the log attached here: OpenHAB - insteonplm.log#2.pdf (64.8 KB)

Not sure what to make of these entries. Does seem to confirm there’s a problem somewhere between when the insteonplm binding logs the intent to publish the update and when the update is actually published on the event bus.

Here is the events.log file:
OpenHAB - events.log#2.pdf (21.0 KB)

And here is the openhab.log file:
OpenHAB - openhab.log#2.pdf (28.0 KB)

Am hoping you can offer another suggestion for what to do next…

Have received no reply to my last update. It contained files I uploaded in response to Steve1’s suggestions. Am still wondering what to do next. Am afraid I might be doing something incorrect…

In an effort to be proactive, I presumed to change INSTEONPLM logger from DEBUG to TRACE and to rerun. And yes, that did generate a lot of detail. What’s more, I manually activated the motion detector (which turned on the lights in the garage), then waited one minute for the motion detector to turn them off. Then manually turned on the lights in the garage, and then manually turned them off. And then manually turned on the dimmer and manually turned it off too. None of these actions caused my “received update” rules to be triggered.

Here is the insteonplm.log with full trace logging. I believe the part that’s of interest to this problem begins on page 25 of 96 in the following .pdf file. Again I inserted a few comment lines to denote where various actions too place. All comments begin with “=====>”…
OpenHAB - insteonplm.log#3.pdf (268.6 KB)

I can provide events.log and openhab.log if desired. If more data is needed, please advise…

Just for completeness, I’m running on a Raspberry Pi with the most current Raspbian image which I downloaded on December 20th. I installed Samba on this little server and it is active too…

Warning: I am a beginner and unqualified to give advice but…

I am running OpenHAB 2 with InsteonPLM v1.8 binding without problems.
I thought (although I am not positive) that InsteonPLM version 1.8 was REQUIRED for OH2.

I am currently up to the OH2 cloud 12/28/2015 build (I don’t recall the build #) but I would look at upgrading the Binding to v1.8 first before upgrading OH2.

I am running on a Raspberry Pi 2 with latest Raspbian.

Sorry about the delay. I did look at your previous logs and it looks normal. At the code level, there’s really nothing significant that happens between the new/old state log messages and the event being published on the OSGI event bus. There are various reasons why an update might not be applied (wrong type of item, etc.), but I’d expect you’d see some related error messages in the openhab.log if that were the case. Also, the item definitions you listed look OK to me. I don’t have any theories at this point. Maybe @Bernd_Pfrommer (one of the InsteonPLM binding developers) has some suggestions?

I’m running openHAB on a Raspberry Pi ( wheezy) with the 1.8.0-SNAPSHOT version of the insteonplm binding.

I gave up on using OpenHAB 2.0. I loaded Raspbian onto a new microSD card and installed OpenHAB 1.7.1. Continued to have problems with rules. But finally worked through them. For the motion sensor, my rules were written to trigger on “ON” and “OFF”. But motion sensors trigger on “OPEN” and “CLOSED”. Once I fixed that my motion sensor rules worked fine. Took more experimenting to figure out what was going on with the dimmer. Even though runtime.busevents posts “ON” and “OFF” for dimmer states, I couldn’t get my triggers to work until I replaced “ON” with “100” (as in 100% brightness) and “OFF” with “0” (as in 0% brightness). Now my rules trigger for “received command”, “received update” and “changed” conditions. Plan now is to write rules that will turn lights on and off at sunset. I know there are samples in the OpenHAB documentation, so will start with them…

I don’t think there was ever any problem with OpenHAB 2.0. I did try jtmoderate876’s suggestion re: the v1.8 binding, but my rules still did not trigger. Felt pretty disgusted at that point. But resolved to try one more time with 1.7.1 before giving up. Now that 1.7.1 is working, am going to stay with it. Am a firm believer in “if it’s not broke, don’t fix it”. Am not going to try 2.0 again until I have more time to experiment / waste or it goes into “production” status…

I recommend replacing the 1.7 insteonplm jar file with the OH 1.8 insteonplm jar file. You can find the latter on the cloudbees nightly build server for openhab. We fixed tons of problems and added features for the insteonplm binding. It’s a drop in replacement, you can use it with an OH 1.7 installation.

Bernd: Thank you for your reply. Downloaded the 1.8 InsteonPLM jar file and replaced the 1.7 file. Haven’t noticed any changes so far, but always want to follow your recommendations…

If anyone would like to test a small change to the insteonplm binding that should solve issue #3922, please find the test JAR link in PR #4573 and report back on the PR or here. Thanks!