Events and NodeRED

How do I respond to events in NodeRED? I’ve got the NodeRED API app set up, and I can query devices as to their state. But if I create an Events node and connect it to a Debug node, and cause an event to happen, nothing shows up.

In particular, I'm trying to get my front door lock/unlock events that show up in the Device Events tab in Hubitat (it's a Kwikset 916 z-wave lock). But I'd also like to get motion/occupancy events (I have these Aeon Multisensor 6 devices but I can't figure out how to get them to react when they detect motion).

I think you might want to use a Device Node instead of an Events node. I have used the Node Red integration since it was created and never needed an Events node.

When you create a Device Node and have this checkbox checked, it will send a message every time that device changes.
image

If the Device Node is sending events, it will have a solid box underneath:
image

If the Device Node is not sending events, it will be hollow:
image

In the simplest form, this will perform a command to set level of lamp to 33% when the button is double-tapped. Note I change the color of all of the HE nodes in Node Red.
image

2 Likes

Check your Node-RED configuration for the Hubitat node and make sure that you have followed the steps outlined here, particularly the configuration of the webhook and the security. Also, as @stephen_nutt suggests, if you are not interested in events from ALL devices, use the device node for specific devices.

I use the event node for logging all events from HE to a database. All my automation logic however, is driven by device nodes (and I always turn the "send events" off if I am just checking the status of a device) :wink:

2 Likes

Thank you for mentioning this. It was set when I first set this up, but somehow got cleared. Now things are working as expected.

UPDATE: Not quite as expected. Some events definitely get through, so I know the URL is correct. But there's something not right about my door lock. It doesn't seem to be generate events any more. This is the latest in its events table (last even recorded is almost two days ago):

I do, however, see entries like this in the debug log:

Not sure how to troubleshoot that.

1 Like

What is the make of the lock and did you make any changes to your z-wave devices (add/delete/move)? Also, can you lock/unlock it from the device page? If you cannot lock/unlock it from the device page, it's likely that it cannot communicate with the hub.

It's a Kwikset 916, but it shows up in Hubitat as "Schlage FE599/BE369 Lock". Yes, I can lock and unlock it from the device page, and program new codes. This thread describes similar issues, although doesn't touch on events reporting. I do see a couple of events in the device's events table now, but it's still very sporadic (misses most events).

That other thread has a reply that says if it has clusters, one should use the generic ZWave lock. I guess mine has clusters? I don't know what that is:

  • deviceType: 3
  • zwaveSecurePairingComplete: true
  • inClusters: 0x5E,0x72,0x5A,0x98,0x73,0x7A
  • zwNodeInfo: 53 DC 80 04 40 03 5E 72 5A 98 73 7A 68 23 F1 00 86 80 62 63 85 5C 59 71 70 4E 8B 4C 5D
  • secureInClusters: 0x86,0x80,0x62,0x63,0x85,0x59,0x71,0x70,0x4E,0x8B,0x4C,0x5D
  • deviceId: 1602
  • S2: 128
  • manufacturer: 144

Using the generic driver, however, now I seem to get events in NodeRED.

2 Likes

My Kwikset locks (different model than what you have) are both paired with the generic driver and have been very reliable (on a C-5).

Great that you figured out a solution to your issue.

2 Likes

Download the Hubitat app