Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heiman Smart Siren EF (WarningDevice-EF-3.0) #614

Closed
stickpin opened this issue Feb 1, 2020 · 6 comments
Closed

Heiman Smart Siren EF (WarningDevice-EF-3.0) #614

stickpin opened this issue Feb 1, 2020 · 6 comments

Comments

@stickpin
Copy link

stickpin commented Feb 1, 2020

Hi @ebaauw,

I am trying to setup Heiman Smart Siren. It seems to be properly exposed to the Homekit, but it looks like I'm missing the logic behind it.

Device exposed as a light:

    "26": {
        "etag": "47c6efa1604635b79db1fe577177acab",
        "hascolor": false,
        "manufacturername": "HEIMAN",
        "modelid": "WarningDevice-EF-3.0",
        "name": "Warning device 26",
        "state": {
            "alert": "none",
            "reachable": true
        },
        "swversion": "2019.5.23",
        "type": "Warning device",
        "uniqueid": "cc:cc:cc:ff:fe:d5:23:79-01"
    },

and as a Sensor for battery status I guess:

    "58": {
        "config": {
            "battery": 100,
            "on": true,
            "pending": [],
            "reachable": true
        },
        "ep": 1,
        "etag": "842608aafdd4d826751826ab1d40cd7e",
        "manufacturername": "HEIMAN",
        "modelid": "WarningDevice-EF-3.0",
        "name": "WarningDevice-EF-3.0",
        "state": {
            "alarm": false,
            "lastupdated": "none",
            "lowbattery": false,
            "tampered": false
        },
        "swversion": "2019.5.23",
        "type": "ZHAAlarm",
        "uniqueid": "cc:cc:cc:ff:fe:d5:23:79-01-0500"
    }

If I'm turning the siren "light" on, it only turns on for 2 seconds and turning itself off.

Can you explain please what I am missing?

Thanks a lot in advance!

@ebaauw
Copy link
Owner

ebaauw commented Feb 1, 2020

This has been some time since I looked at this. Looking at the code, homebridge-hue sends {"alert": "select"} to the “light” state. The deCONZ REST API plugin sets a duration of 1 (second) for select and 300 (5 minutes) for lselect. I don’t think my Heiman Siren honours the duration (cannot test it right now), so I never realised this before.

I activate my siren from deCONZ gateway rules, so I never bothered to expose lselect or blink to HomeKit. Not sure how best to do that either - I’m open to suggestions.

@stickpin
Copy link
Author

stickpin commented Feb 2, 2020

@ebaauw thanks a lot for a quick reply.

Maybe to expose it as 3 separate lamps (select, lselect and blink) + to add the duration param?

I prefer to manage everything in Homekit, but just for me and I guess also other's knowledge, can you please share the example for your siren config on deCONZ side?

@stickpin
Copy link
Author

stickpin commented Feb 3, 2020

@ebaauw btw, just realized that I am getting a warning from the plugin side:

[2/3/2020, 2:37:03 PM] [Hue] Zigbee-GW: /sensors/58: warning: unknown ZHAAlarm sensor {"config":{"battery":100,"on":true,"reachable":true},"ep":1,"etag":"842608aafdd4d826751826ab1d40cd7e","manufacturername":"HEIMAN","modelid":"WarningDevice-EF-3.0","name":"WarningDevice-EF-3.0","state":{"alarm":null,"lastupdated":"none","lowbattery":null,"tampered":null},"swversion":"2019.5.23","type":"ZHAAlarm","uniqueid":"cc:cc:cc:ff:fe:d5:23:79-01-0500"}

@ebaauw
Copy link
Owner

ebaauw commented Feb 3, 2020

I am getting a warning from the plugin

The warning is because I didn't whitelist this particular model. It shouldn't affect the functionality, as it provides exactly the same ZigBee IAS WD interface as the older model.

can you please share the example for your siren config on deCONZ side?

In the deCONZ REST API, you'd simply create a rule with an action to set the siren's state.alert.

Maybe to expose it as 3 separate lamps

I'll have a look at exposing select, lselect and blink as separate services, each with their own On characteristic.

to add the duration param

There's currently no support for this by the REST API plugin, but this could easily be added re-using state.ontime (so PUT a body of {"alert": "lselect", "ontime": 10} to /lights/id/state to sound the alarm for 10 seconds instead of 300).

Homebridge-hue already exposes state.ontime to HomeKit for /lights resources exposed as Valve, using the standard SetDuration / Remaining Duration characteristics. Apple's Home app only supports these characteristics for Valve services, hence the restriction. They do work brilliantly in Eve for other services though; homebridge-zp uses this to expose the sleep timer on Sonos zone players.

So you'd either have to expose your siren as a Valve, or use Eve to create a HomeKit scene, which can then be recalled from the Home app (or from Siri).

ebaauw added a commit that referenced this issue Feb 7, 2020
Support new model Heiman siren, see #614
ebaauw added a commit that referenced this issue Feb 7, 2020
Support longer warnings and strobe-only warnings for sirens, see #614.
@ebaauw
Copy link
Owner

ebaauw commented Feb 7, 2020

I'll have a look at exposing select, lselect and blink as separate services, each with their own On characteristic.

No can do; I would need to refactor the code too much.

Instead, I now expose the SIren as an Outlet, with additional Duration and Mute characteristics. Apple's Home app doesn't show these, but Eve supports them alright. If you leave Duration on 0, homebridge-hue will issue an {"alert": "select"} when setting On; if you set it > 0, it will issue {"alert": "lselect", "ontime": Duration}. If you set Mute, homebridge-hue will issue {"alert": "blink", "ontime": Duration}. The On characteristic will remain on for the duration of the warning; it will switch off automatically afterwards. You can also switch it off manually, to stop the active warning.

You can either set Duration and Mute once in Eve, and then use the tile in Home to issue the corresponding warning, or create a HomeKit scene in Eve, containing On, Duration, and Mute, and recall the scene from Home (or Siri). Note that Duration and Mute reset on homebridge restart. Note that you need deCONZ REST API v2.05.73 for support of state.ontime, or compile the REST API plugin yourself from my commit above.

@ebaauw
Copy link
Owner

ebaauw commented Feb 7, 2020

In v0.11.52.

manup pushed a commit to dresden-elektronik/deconz-rest-plugin that referenced this issue Feb 8, 2020
Support `state.ontime` in combination with setting `state.alert` to `lselect` or (for Warning Devices) to `blink`.  The default duration of the warning (300s) or identification (15s) can be overwritten using `state.ontime` (in seconds).
See ebaauw/homebridge-hue#614.
@ebaauw ebaauw closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants