Capturing all the event emitted by the Yale Door Lock in my Edge driver?

In my driver logs, I see the following event:

<ZwaveDevice: 1e5c7c04-3742-4586-812c-5beb3de67ac5 [09] (Yale Door Lock)> emitting event: {"attribute_id":"lock","capability_id":"lock","component_id":"main","state":{"data":{"method":"manual"},"value":"locked"}}

I’m looking to capture all event and handle it in Edge driver. Any guidance on how to achieve this would be greatly appreciated. Thank you!

Events are emitted by the driver itself in response to receiving a command request from the mobile app/CLI/API that needs to be sent to the device or in response to receiving a transmission from the device.

2024-03-28T00:02:20.077708981+00:00 TRACE Z-Wave Lock PH  Received event with handler unnamed
2024-03-28T00:02:20.081180002+00:00 INFO Z-Wave Lock PH  <ZwaveDevice: eb0d3bf1-db9e-442d-9f8f-bf8ba318443b [85] (Test Lock)> received Z-Wave command: {args={alarm_level=1, alarm_type=19, event="KEYPAD_UNLOCK_OPERATION", event_parameter="\x01", notification_status="ON", notification_type="ACCESS_CONTROL", v1_alarm_level=1, v1_alarm_type=19, z_wave_alarm_event="KEYPAD_UNLOCK_OPERATION", z_wave_alarm_status="ON", z_wave_alarm_type="ACCESS_CONTROL", zensor_net_source_node_id=0}, cmd_class="NOTIFICATION", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x13\x01\x00\xFF\x06\x06\x01\x01", src_channel=0, version=3}
2024-03-28T00:02:20.097772210+00:00 TRACE Z-Wave Lock PH  Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock -> Schlage BE469
2024-03-28T00:02:20.099325460+00:00 INFO Z-Wave Lock PH  <ZwaveDevice: eb0d3bf1-db9e-442d-9f8f-bf8ba318443b [85] (Test Lock)> emitting event: {"attribute_id":"lock","capability_id":"lock","component_id":"main","state":{"data":{"codeId":"1","codeName":"Code 1","method":"keypad"},"value":"unlocked"}}
2024-03-28T00:02:20.112910356+00:00 INFO Z-Wave Lock PH  <ZwaveDevice: eb0d3bf1-db9e-442d-9f8f-bf8ba318443b [85] (Test Lock)> emitting event: {"attribute_id":"unlockCodeName","capability_id":"platinummassive43262.unlockCodeName","component_id":"main","state":{"value":"Code 1"}}
2024-03-28T00:02:20.119588627+00:00 DEBUG Z-Wave Lock PH  Test Lock device thread event handled

For example, the above is a keypad unlock action received as a Notification Report by the default Z-Wave handler and then processed by the Edge driver. The Edge driver has a Notification Handler that processes the notification and, in this case, emits two events; 1) one that describes the state of the lock; and 2) another than provides the code name used to unlock the lock from the keypad.

What I think you want is to capture all the types of notifications that your device would generate so that your Edge driver can then take action on them. For that, I think you could set your device to use the Z-Wave Thing Edge driver and then do driver logging to capture messages coming from your device. The Z-Wave Thing driver should receive the notifications and generate a Z-Wave event with the contents of the received messages. You would then need to activate all the different functions of your device to capture the different notifications.

I just want to capture all event data and process it on my server is there a way to do this it is not required to be on the driver. what would be the best way to get the device id and the event it emitted in a json format to a http webhook

emitting event: {"attribute_id":"lock","capability_id":"lock","component_id":"main","state":{"data":{"codeId":"1","codeName":"Code 1","method":"keypad"},"value":"unlocked"}}

{"attribute_id":"unlockCodeName","capability_id":"platinummassive43262.unlockCodeName","component_id":"main","state":{"value":"Code 1"}}

To achieve your goal of capturing all event data and processing it on your server, you’ll need to set up a SmartApp within the SmartThings ecosystem. This SmartApp will act as a bridge between your devices and your server, allowing you to subscribe to specific events and forward them to your server via an HTTP webhook.

By utilizing a SmartApp, you can easily manage event subscriptions, ensuring that you receive the relevant data from your devices in real-time. Once the SmartApp is installed and configured, it will continuously monitor the specified events and trigger the webhook to send the event data to your server in JSON format.

For detailed instructions on creating a SmartApp and setting up event subscriptions, you can refer to the SmartThings documentation. Additionally, you may find this tutorial helpful for a step-by-step guide.

However, please note that this approach does require some setup and configuration within the SmartThings platform. You’ll need to define the events you’re interested in capturing and specify the endpoint of your server to which the webhook will send the data.

Overall, setting up a SmartApp and configuring event subscriptions provides a reliable and efficient way to capture and process event data from your devices on your server.