[RELEASE] Shelly Wave i4 / i4 DC — 4-Channel Contact Sensor Driver (Toggle/Dry Contact Mode)

This driver enables the Shelly Wave i4 and Wave i4 DC to report 4 independent dry-contact inputs as individual child Contact Sensor devices using the device's toggle switch mode. Full background, investigation detail, and development discussion can be found in the original thread here: https://community.hubitat.com/t/looking-for-a-device-driver-for-shelly-wave-i4-dc/144994/23


The problem with existing drivers

The built-in Hubitat driver handle the Wave i4 as a scene controller using the Central Scene command class (momentary mode). This approach has two fundamental problems for dry-contact monitoring:

  1. No persistent ON/OFF state — Central Scene reports a "held" event while the contact is closed, repeating approximately every 55 seconds, rather than a clean edge-triggered state change.

  2. Simultaneous inputs mask each other — a firmware-level limitation. When a second input closes while another is already held, the device's Central Scene state machine incorrectly reports the first input as "released" even though it is still physically closed. This makes Central Scene completely unsuitable for any use case where more than one contact can be closed at the same time.


How this driver works

The Wave i4 has a toggle switch mode (parameters 1–4 set to value 1) designed exactly for dry-contact inputs. In this mode the device sends a SwitchBinaryReport ON/OFF on each state change, with each input mapped to its own independent Z-Wave endpoint:

Input Z-Wave Endpoint
SW1 2
SW2 3
SW3 4
SW4 5

Contact closed → value 0xFF | Contact open → value 0x00

Key discovery: the hub's node ID must be registered using MultiChannel Association (command class 0x8E) in groups 2, 4, 6 and 8 — one per input. Regular Association (0x85) has no effect on per-endpoint traffic and the Binary Switch reports will never arrive at the hub without this. The driver handles this automatically.


What the driver does

The driver is fully self-contained — pressing Configure does everything in one operation:

  • Sets MultiChannel Association groups 2, 4, 6, 8 → hub node 1 and verifies each

  • Sets device parameters 1–4 to Toggle Switch mode and verifies each

  • Creates 4 child Generic Component Contact Sensor devices (one per input)

  • Automatically refreshes all 4 input states 15 seconds later so they correctly reflect the physical contact positions immediately

The configStatus attribute on the parent device updates to "configured OK" once complete. A Refresh command is available to poll all 4 inputs on demand, and each child device has its own individual Refresh.

A Z-Wave device fingerprint is included so Hubitat will automatically suggest this driver during inclusion of a Wave i4 or Wave i4 DC.

Re-run Configure after any factory reset or Z-Wave re-inclusion as both association groups and parameters are wiped by those operations.


Installation

  1. In Hubitat go to Drivers Code → + New Driver

  2. Click Import and paste the raw GitHub URL below, or paste the code directly

  3. Click Save

  4. Open your Shelly Wave i4 device page, change the Type dropdown to Shelly Wave i4 Contact Sensor with multichannel Association and click Save Device

  5. Click Configure

  6. Watch the logs — you will see association confirmations, parameter confirmations, 4 child devices created, then an input state refresh 15 seconds later

  7. Test each input — child contact sensors should report open/closed correctly

GitHub: https://github.com/RSZ-Max/Hubitat_Shelly_Drivers/blob/main/Shelly_Wave_I4_Contact_Sensor_v1_3.groovy


Notes

  • Tested on Shelly Wave i4 DC.

  • The device must be Z-Wave included before installing this driver. Standard Classic mesh inclusion works correctly.

  • If any input still generates Central Scene events after Configure runs, that input's parameter did not save to toggle mode — re-run Configure and check the logs for a parameter confirmation entry for that input number.

  • If child devices already exist from a previous setup after a factory reset or re-inclusion, Configure will skip re-creating them and just re-set the associations and parameters.

  • Debug logging can be enabled in Preferences for detailed event tracing.

  • Note for WiFi Shelly Plus i4 users: this driver is for the Z-Wave Wave i4 only. The WiFi Shelly Plus i4 is a completely different device from an integration standpoint and already works well with the community driver "Shelly Plus/Pro xPM" by drozovyk which creates 4 child devices without any of the complexity described above.


Driver developed with assistance from Claude AI. Shared as-is — I am not a developer. Feedback and improvements welcome.