Homebridge, how to make a switch momentary?

In order to get a more palatable UI, I caved and setup Homekit. Everything works as expected aside from this z-wave relay I use to open and close my skylight. It's two normally-open relays (into one) that needs to be closed for ~0.5s for the skylight to register it. It works fine within Hubitat thanks to this configuration:

However, no matter how I expose those to Homebridge, they appear as dumb switches that don't reopen after they're pressed so I can't operate my skylight.

How do I expose a switch to Homebridge that will still automatically reopen after a set (short) time? I tried rules with a virtual button or switch but it doesn't work either once in Homekit.

Thanks!

Virtual switches have an auto off setting in the device preferences. I use that for multiple triggers between HomeKit and Hubitat.

It can take a few seconds before the switch updates in HomeKit however.

Donโ€™t know if that helps any.

1 Like

Same here.

@physh - to complete the picture, setup Hubitat automations that control your relays based on the status of the virtual switch. And expose only the virtual switches to Homebridge.

1 Like

That worked, thanks!

1 Like

Well, actually, while it does work, the switch state doesn't reset as it should in Homebridge. Is there a limitation of some sort?

I have enabled auto off set at 500ms, but HomeKit doesn't reflect that, the virtual switch stays on until I set it back to off.

Which HomeBridge integration are you using? Iโ€™m using the Maker API integration, and my auto-off virtual switch works.

HomeBridge v2 (2.5.8)

Follow up in that parent thread. Something isn't right if the switch state doesn't mirror the state in Hubitat. Certainly works the way it is intended with the (simpler) Maker API homebridge integration.

I have made some progress on the "momentary" part. It now works both in Hubitat and Homekit.
The Basic Rule looks like this:
When Open Velux turns on ...
Turn on Open Skylight Relay
Wait until elapsed time of 10 seconds has passed, then ...
Turn off Open Velux

This works great in the Hubitat UI, the virtual switch turns back off, but somehow this doesn't trickle down to HomeKit. I looked at Maker API but I would prefer not having to redo everything from scratch.

Iโ€™m curious what kind of Velux skylight do you have, and how is it integrated with Hubitat?

It's a modern one (motorized/solar), but I bought a basic remote on eBay and butchered it with a double z-wave relay.

I also bought a KLF200 but it's a nightmare to operate.