Virtual Siren Driver

Anyone have a very basic Siren Driver for a Virtual Siren?
I'm wanting to create a Virtual Siren that I can use in HSM, and with RM have it actuate a Zen 16 relay that my old hardwired siren is connected to. The siren works fine when actuating the relay (relay driver is a switch) but HSM doesn't recognize as a Siren, hence the idea of a Virtual Siren. I used this approach for old door contacts wired to a relay then create a Virtual Contact that HSM recognizes.
I suppose I could use RM to actuate the relay based on state of HSM, but seemed it might be simpler in various HSM configurations to be able to select the virtual siren.
I tried some of the branded Siren Drivers in HE, but could not get any of them to work.
Any help or reco on better way to tackle would be much appreciated.

I had a virtual driver used years ago for testing HubConnect features... not sure that this will work for you...

Glancing at the code, only "switch" (On / Off) seems functional. I think it was based on the Dome Siren set of options.

1 Like

Thank-you!

I don't fully understand coding of drivers and not confident I won't mess something up, so for now I was successfully able to use RM to turn on relay based on HSM alert and it works perfectly to fire siren, so will probably stick with that for now. For snicks and grins I may give your driver a try (after I make a back-up :slight_smile:

Thanks again!

1 Like

Download the Hubitat app