D-LINK Binding: How to use it in items and rules?

I just got a D-Link DCH-S150 WIFI motion sensor and try to use it in OH2 (2.2.0 Snapshot 1003). The thing was discovered by PaperUI und I tried to define rules and items. Unfortunately the documentation has no example for item files???
I then tried to a establish a rule as described in the docs:

//Rule DLINK
when
      Channel "dlinksmarthome:DCH-S150:b3f631e1:motion" triggered
  then
	  logInfo("DLINK","Motion has been detected by rule!")
	  postUpdate(MO_BUER_LCH, new DateTimeType())
  end

However, neither the log is showing the entry from my rule nor the item gets the date/timestamp update so the rule does not seem to fire.
BUT: In the event log I see that the thing is sending data to OH2:

2017-08-09 22:35:27.350 [ChannelTriggeredEvent     ] - dlinksmarthome:DCH-S150:b3f631e1:motion triggered

Can anybody give me a hint what I am doing wrong? How can I use the things/channels from that binding?

Thank you for you help!

Cheers,
Martin

The start of the rule should be “rule DLINK” rather than “//Rule DLINK”

The thing only supports the trigger channel which as far as I know can’t be used with an item.

oh yes… my mistake. Now it works. Thank you very much for the quick help!

Apparently items are not supported for trigger channels…I do not understand fully why something like a trigger channel is needed but at least it works now…
Compared to my Zwave motion sensor devices the functionality and configuration options for D-Link are very poor. Just trigger a signal - that’s all. No configuration options for timing, sensitivity etc. No additional functions like measuring temperature, brightness, humidity or whatever. Not even a regular communication with OH (polling) so one could check by rules if the device is still ok…but ok, it was worth a try to see the difference.

You can set the sensitivity from the mydlink app, but that’s about it for configuration options.

You can use the thing status to catch the motion sensor going offline:


rule "Motion sensors status"
when
        Thing "dlinksmarthome:DCH-S150:480c8294a1" changed
then
        if ( ThingAction.getThingStatusInfo("dlinksmarthome:DCH-S150:480c8294a1").getStatus().toString() ==
"ONLINE" ) {
                motionSensors.postUpdate(ON)
        } else {
                motionSensors.postUpdate(OFF)
        }
end

Hi @MikeJMajor, I m new with openhab and trigger channels, i get it that trigger channels dont work with items, but im trying to work this channel with the openhab rest api, where the status info of the motion sensor should be reflected, i cant find any solution for this, could you suggest some?

thanks
avantika