Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.03k stars 1.67k forks source link

[New device support]: Hive SIREN001 #11975

Closed russdan closed 2 years ago

russdan commented 2 years ago

Link

https://www.hivehome.com/shop/smart-home-security/hive-siren

Database entry

{"id":24,"type":"Router","ieeeAddr":"0x6ffffffffe7223db","nwkAddr":14657,"manufId":4456,"manufName":"LDS","powerSource":"DC Source","modelId":"SIREN001","epList":[1,2,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":1027,"inClusterList":[0,1,3,1280,1282,2821],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"16419":0,"16420":21,"16421":1,"16422":1,"16424":0,"16425":2760,"modelId":"SIREN001","manufacturerName":"LDS","powerSource":132,"zclVersion":3,"appVersion":1,"stackVersion":6,"hwVersion":2,"dateCode":"21112019","swBuildId":"1.19"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124bfffff1d411","zoneState":1,"zoneId":23,"zoneStatus":32}},"ssIasWd":{"attributes":{"maxDuration":1800}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":118,"batteryVoltage":37}}},"binds":[{"cluster":0,"type":"endpoint","deviceIeeeAddress":"0x00124bfffff1d411","endpointID":1},{"cluster":1280,"type":"endpoint","deviceIeeeAddress":"0x00124bfffff1d411","endpointID":1},{"cluster":1282,"type":"endpoint","deviceIeeeAddress":"0x00124bfffff1d411","endpointID":1},{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124bfffff1d411","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":62000,"repChange":0},{"cluster":1,"attrId":32,"minRepIntval":3600,"maxRepIntval":62000,"repChange":0}],"meta":{}},"2":{"profId":260,"epId":2,"devId":257,"inClusterList":[0,3,4,5,6,8],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":6,"hwVersion":2,"dateCode":"21112019","swBuildId":"1.19","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-595656078},"lastSeen":1648491457195,"defaultSendRequestWhen":"immediate"}

Comments

So far I've managed to get some integration working with the following converter. Issues I have at present:

  1. tamper status is showing as Null - this should come from fz.ias_siren tamper status (bit 2);
  2. battery_low also shows as Null - this should come from fz.ias_siren battery (bit 3);
  3. I'd like to expose fz.ias_siren bits 6 (trouble) and 7 (AC/Mains fault) if possible - same issue as 1 & 2 above, how do I expose those values?
    From the dev console I can read zoneStatus : Read result of 'ssIasZone': {"zoneStatus":32} which translates to
    
    32 = 0000100000

b0 = Alarm 1 : 1 = armed / 0 not armed b1 = Alarm 2 : 1 = armed / 0 not armed b2 = Tamper : 1 = tampered / 0 not tampered b3 = Battery : 1 = low battery / 0 OK b4 = Supervision reports : 1 = reports / 0 no reports b5 = Restore reports : 1 = reports restore / 0 = no reports restore b6 = Trouble : 1 = Trouble/failure / 0 = OK b7 = AC/Mains fault : 1 = Fault / 0 = OK b8 = Test mode : 1 = Test mode / 0 = operational mode``

but I don't know how to expose these values...
4. In the debug logs I'm seeing frequent :

debug Received Zigbee message from '0x6ffffffffe7223db', type 'attributeReport', cluster 'genBasic', data '{"16425":3282}' from endpoint 1 with groupID 0 debug Received Zigbee message from '0x6ffffffffe7223db', type 'attributeReport', cluster 'genBasic', data '{"16420":21}' from endpoint 1 with groupID 0 debug Received Zigbee message from '0x6ffffffffe7223db', type 'attributeReport', cluster 'genBasic', data '{"16425":3282}' from endpoint 1 with groupID 0


and don't know how to decipher them - looking at the ZCL specs `genBasic` doesn't seem to show values this high, so how do I work out what these are?  From the database.db entries some of these are being handled automatically `"attributes": "16419":0,"16421":1,"16422":1,"16424":0`  but not `16420` and `16425`

5. The siren has a strobe which as I understand it can be enabled/disabled - not when its in alarm triggered state, or squawk state, just when the alarm is powered-on the strobe can be on or off - how do I expose that?

I'm still experimenting at present, but these are my questions so far!

Thanks for any help....

### External converter

```shell
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['SIREN001'], 
    model: 'SIREN001', 
    vendor: 'LDS', 
    description: 'Hive Smart Siren',
    fromZigbee: [fz.battery, fz.ias_wd, fz.ias_enroll, fz.ias_siren],
    toZigbee: [tz.warning, tz.warning_simple, tz.ias_max_duration, tz.squawk],
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'ssIasZone', 'ssIasWd', 'genBasic']);
        await reporting.batteryPercentageRemaining(endpoint);
        await endpoint.read('ssIasZone', ['zoneState', 'iasCieAddr', 'zoneId', 'zoneStatus']);
        await endpoint.read('ssIasWd', ['maxDuration']);
    },
    exposes: [e.battery_low(), e.battery(), e.tamper(), e.squawk(), e.warning(), e.test(),
        exposes.numeric('max_duration', ea.ALL).withUnit('s').withValueMin(0).withValueMax(1800).withDescription('Max duration of the siren'),
        exposes.binary('alarm', ea.SET, 'ON', 'OFF').withDescription('Manual start of siren')],
};

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

russdan commented 2 years ago

OK, Good news:

  1. The device seems to work without needing the bits reversing (as per #8310)
  2. tamper and low_battery are working now - I needed to physically 'Tamper' to get the state change to Tampered and now its showing Clear instead of Null - Low Battery has started all by itself, I guess over time it refreshed.
  3. The various Alarm modes seem to work - burglar and fire produce different sounds - I'm assuming the other modes work too but not tried!
  4. Squawk works also - useful for arming/disarming.
  5. Test doesn't seem to do anything so will remove that.

So now just how to decode the genBasic attributes - looks like attribute 16425 decays over time but what its showing therefore needs more consideration!

debug 2022-03-29 01:20:25: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1980}' from endpoint 1 with groupID 0
debug 2022-03-29 01:21:26: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1980}' from endpoint 1 with groupID 0
debug 2022-03-29 01:22:27: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1980}' from endpoint 1 with groupID 0
debug 2022-03-29 01:23:27: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1980}' from endpoint 1 with groupID 0
debug 2022-03-29 01:24:28: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:25:29: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:26:30: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1980}' from endpoint 1 with groupID 0
debug 2022-03-29 01:27:31: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:28:31: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:29:32: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:30:33: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:31:34: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:32:35: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:33:36: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:34:36: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:35:37: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:36:38: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:37:39: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:38:40: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:39:40: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:40:41: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:41:42: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:42:43: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:43:44: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:44:44: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:45:45: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1950}' from endpoint 1 with groupID 0
debug 2022-03-29 01:46:46: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:47:47: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:48:48: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:49:48: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:50:49: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:51:50: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:52:51: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:53:52: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:54:52: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:55:53: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:56:54: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:57:55: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:58:56: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 01:59:57: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 02:00:57: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 02:01:58: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1890}' from endpoint 1 with groupID 0
debug 2022-03-29 02:02:59: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 02:04:00: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1920}' from endpoint 1 with groupID 0
debug 2022-03-29 02:05:00: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1890}' from endpoint 1 with groupID 0
....
debug 2022-03-29 08:10:52: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:11:52: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:12:53: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:13:54: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:14:55: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:15:56: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:16:56: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1530}' from endpoint 1 with groupID 0
debug 2022-03-29 08:17:57: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1251}' from endpoint 1 with groupID 0
debug 2022-03-29 08:18:58: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1530}' from endpoint 1 with groupID 0
debug 2022-03-29 08:21:37: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1338}' from endpoint 1 with groupID 0
debug 2022-03-29 08:22:37: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:23:38: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:24:39: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:25:40: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:26:41: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:27:42: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:28:42: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
debug 2022-03-29 08:29:43: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16425":1350}' from endpoint 1 with groupID 0
russdan commented 2 years ago

Now seeing values coming through for fz.ias_siren which is good:

info MQTT publish: topic 'zigbee2mqtt/Hive Siren 001', payload '{"ac_status":false,"alarm":false,"battery":86,"battery_low":false,"enrolled":true,"linkquality":15,"max_duration":1800,"restore_reports":true,"supervision_reports":false,"tamper":false,"test":false,"voltage":4000}'

and can control with

debug Received MQTT message on 'zigbee2mqtt/Hive Siren 001/set' with data '{"squawk":{"level":"low"}}'
debug Received MQTT message on 'zigbee2mqtt/Hive Siren 001/set' with data '{"warning":{"mode":"stop"}}'
debug Received MQTT message on 'zigbee2mqtt/Hive Siren 001/set' with data '{"squawk":{"level":"low","state":"system_is_disarmed"}}'
debug Received MQTT message on 'zigbee2mqtt/Hive Siren 001/set' with data '{"warning":{"level":"low","mode":"emergency","strobe_level":"low"}}'

Squawk mode only seems to work with low - medium, high and very high produce no sound (Warning mode works as expected with each level) - I wonder if Squawk isn't handling the other levels correctly as with #8310 for the main warning siren so it needs reversing?

with attribute 16425 I realised the AC adapter was off at the plug, so it had been running on battery, so the decaying value I guess is related to remaining battery - when I switch on the AC adapter I saw

debug 2022-03-29 08:49:54: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16417":1}' from endpoint 1 with groupID 0
debug 2022-03-29 08:49:55: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16424":0}' from endpoint 1 with groupID 0
debug 2022-03-29 08:50:31: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16420":21}' from endpoint 1 with groupID 0
debug 2022-03-29 08:51:31: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16419":1}' from endpoint 1 with groupID 0
debug 2022-03-29 08:52:31: Received Zigbee message from 'Hive Siren 001', type 'attributeReport', cluster 'genBasic', data '{"16420":21}' from endpoint 1 with groupID 0

and the 16425 values stopped - I'll do some playing to see if I can understand what 16417 and 16424 mean - possibly 16417 is "running on mains" and 16424 "running on battery"... 16420 seems to be always 21 - if some of these values mirror those in the fz.ias_siren payload then I guess they can be mapped-out / ignored....

So apart from small amount of tweaking I think this is nearly there...

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

russdan commented 2 years ago

Just working on adding the documentation links next....

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

sourbrambles commented 2 years ago

@russdan how are you getting on with this?

duckfullstop commented 1 year ago

@russdan Would also love to know if you managed to finish this up - just picked one up myself and you've made far more progress than I have...

(Also: it appears that the floodlight is controllable using standard light controls: No converter available for 'SIREN001' with cluster 'genLevelCtrl' and type 'attributeReport' and data '{"currentLevel":254}')

russdan commented 1 year ago

Hi @sourbrambles @duckfullstop the converter works without issue, where I ran out of time/patience/interest/ability was in creating the other elements needed to push this change, as listed in https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_3-adding-converter-s-for-your-device, primarily creating the zigbee2mqtt.io documentation where I couldn't work out how to do the updates needed - if that's done then a pull request to zigbee-herdsman-converters would add the support I believe....

In my testing the converter code above works, and can be added manually by adding to configuration.yaml

external_converters:
  - SIREN001.js

and putting the convertor code in SIREN001.js in the same folder as configuration.yaml which is the last point I got to before stopping.... maybe if you guys can test it too?

If anyone can help with the steps for adding zigbee2mqtt.io documentation that would be great!

duckfullstop commented 1 year ago

Thanks for getting back to us @russdan, it's much appreciated!

I'm not sure the implementation is feature complete, especially in terms of its exposure to things like Home Assistant (for example, the siren toggle does nothing, you need to send a warning message to get the siren to work - maybe we should handle that better?)

As mentioned above, it feels like there should be a light toggle for the flood light, as per the Hive implementation - that seems like it might just be a matter of sending a warning message with the light duty cycle set to 10, and the siren disabled. Here's the two additional status messages I'm getting in debug mode - I've already tried poking the clusters mentioned and just get READ_ONLY errors:

No converter available for 'SIREN001' with cluster 'genOnOff' and type 'attributeReport' and data '{"onOff":0}'
No converter available for 'SIREN001' with cluster 'genLevelCtrl' and type 'attributeReport' and data '{"currentLevel":254}'

Additionally, something notable is that the status light (the blue beam above the flood) is flashing quite regularly on my unit (once every 3 seconds or so), which seems awfully regular - not sure if it's just because my unit is stuck in tamper mode? Sending squawk commands with system_is_armed and system_is_disarmed does nothing except make it squawk, it doesn't change the light pattern. If anyone knows how you get these things out of tamper mode that'd be stupidly helpful to find that out - I took mine apart and the only vaguely tamper related thing I could see is an antenna on the battery compartment stuck down with some metal tape, so I wonder if it's related to there not being an 18650 installed?

Other than that, I'd be happy to help with creating a PR for documentation and anything else necessary. Unfortunately I don't have a hive hub so I can't sniff traffic :(

Cheapstuff commented 1 year ago

Anything I could do to help get this included on home assistant via USB zigbee dongle? Currently I have it connected to my hive hub but that support will be stopping soon!

duckfullstop commented 1 year ago

I have got a Hive Hub being airdropped to me at some point in the next month or two, but if you have the capacity to then taking a packet dump of the traffic between the hive hub and the siren would make this trivial (hopefully) to fully implement. I'm planning on doing similar for the keypad (which I'm fairly sure might be missing functionality).

Note that you'll need the transport key for your Hive Zigbee network, which you'll probably need to sniff from a pairing process (not sure on the specifics of this, was going to cross that bridge when I came to it).

If this all sounds too complicated, then please hang tight (or use the above custom device for basic functionality)!

Cheapstuff commented 1 year ago

Yes definitely happy to try and help but I am a complete noob and only just installed HA on a pi4 But if you could give me very basic instructions step by step I can try to help!

What extra functionality would you want from the keypad?

duckfullstop commented 1 year ago

Weather update: Unfortunately the hub I've just been dropped is DoA, so I can't presently contribute packet dumps. If someone else has the ability to then that'd be awesome!

WRT the keypad, I think there might be something related to an entry timer beeper or similar? Seems like there's an extra LED in the middle with a clock symbol? Unsure.

mtlill commented 1 year ago

Did anyone get any further with this? Just picked one of these up with a keypad, keypads working fine but the siren isn’t supported

Cheapstuff commented 1 year ago

Did anyone get any further with this? Just picked one of these up with a keypad, keypads working fine but the siren isn’t supported

The siren paired automatically but doesn't have the same functionality as the hive system. Can control the light and switch the siren on/off from memory

mtlill commented 1 year ago

Did anyone get any further with this? Just picked one of these up with a keypad, keypads working fine but the siren isn’t supported

The siren paired automatically but doesn't have the same functionality as the hive system. Can control the light and switch the siren on/off from memory

That's basically the only functionality I want if I'm honest, how do I go about sorting it to work in Z2M?

Cheapstuff commented 1 year ago

Don't think it's actually using z2m just the inbuilt recognition Using the sonoff dongle with a usb extension as was getting loads of interference from the other usb ports

russdan commented 1 year ago

@mtlill if it helps, take my code from the External converter section in post 1, save it as "siren001.js" and put in your zigbee2mqtt/data folder (same place as your configuration.yaml). Then add to configuration.yaml

external_converters:
  - siren001.js

and restart z2m. This will get you as far as I got with the siren.... you can then send

{"warning":{"mode": mode, "level": level, "duration": duration}}

where mode is alarm for example (it does fire and a few other different modes too), level I think is low/high, duration in mins...

and to squawk (start & stop)

{"squawk":{"level":"low"}}
{"warning":{"mode":"stop"}}

tamper status comes on the payload, ie

payload = json.loads(message.payload.decode("utf-8"))
tamper = payload['tamper']

I've abandonded the Hive Siren, too hard to make it work like a proper alarm and I see Hive are dropping support from 2025 too.. amateurs......

If anyone wants an unused (apart from some desk-based debug above) siren and (brand new) keypad + 2x door contacts & 1x PIR I'm open to offers....

Cheapstuff commented 1 year ago

@mtlill if it helps, take my code from the External converter section in post 1, save it as "siren001.js" and put in your zigbee2mqtt/data folder (same place as your configuration.yaml). Then add to configuration.yaml

external_converters:
  - siren001.js

and restart z2m. This will get you as far as I got with the siren.... you can then send

{"warning":{"mode": mode, "level": level, "duration": duration}}

where mode is alarm for example (it does fire and a few other different modes too), level I think is low/high, duration in mins...

and to squawk (start & stop)

{"squawk":{"level":"low"}}
{"warning":{"mode":"stop"}}

tamper status comes on the payload, ie

payload = json.loads(message.payload.decode("utf-8"))
tamper = payload['tamper']

I've abandonded the Hive Siren, too hard to make it work like a proper alarm and I see Hive are dropping support from 2025 too.. amateurs......

If anyone wants an unused (apart from some desk-based debug above) siren and (brand new) keypad + 2x door contacts & 1x PIR I'm open to offers....

How much are you after? £50?

duckfullstop commented 1 year ago

tamper status comes on the payload, ie

Out of curiosity @russdan, can you confirm that your tamper status is working as you'd expect? If so, what triggers a change of state - internal reed switch or something? (Just trying to rule out that I don't have a local hardware issue)

russdan commented 1 year ago

@duckfullstop sorry, can't remember - having looked at the siren again last night it can only be one of:

  1. Unscrewing the backing plate screw (the screw on the side holding it on the base plate)
  2. Removing the alarm from the backing plate (although I can't see any signs of a contact switch there)
  3. Removing the screw from the battery cover
  4. Unplugging the power plug (ie running on battery power alone without the mains plugged in)

As documented above in my 2nd post initially I was getting null through for tamper, but after doing one of the above it then started to show true/false.

The siren's all nicely packed away again now so reluctant to unpack to try and deduce what combination caused it to tamper.....

RGarrett93 commented 1 year ago

I've picked the siren & keypad up today, going to start looking in this and see if I can help out with anything. I don't have the original hub to packet sniff but will see if I can find one cheap. Appreciate the work you have put in to this so far @russdan, you've done most of the hard work, hopefully we can help out with the other features.

mtlill commented 1 year ago

I've got a hub and a siren, if there's anyway I can help then let me know, not very versed in this sort of stuff but I'm a fairly quick learner.

russdan commented 1 year ago

I'm not entirely sure what else needs doing for the Siren support apart from the documentation updates to show it on the main zigbee2mqtt.io devices and a push of the code for review - I couldn't work out how to do the doc updates so stopped there, I'm sure someone can do this with relative ease who has done it before. If you want to test read above for the siren001.js` you need to add to configuration.yaml​ to get it working as a local adapter. I think there we some small niggles as it wasn't 100% in Home Assistant, but it was working for me so I'd assumed those with the issues would do the leg work on solving the niggles, but doesn't seem to be the way.

The keypad is already supported, its the same as a Linkind one.

There is already a Home Assistant plugin I think which supports Zigbee Alarms, so once the Siren is available you should be able to use that.

Russ


From: mtlill @.> Sent: 19 July 2023 09:21 To: Koenkk/zigbee2mqtt @.> Cc: russdan @.>; Mention @.> Subject: Re: [Koenkk/zigbee2mqtt] [New device support]: Hive SIREN001 (Issue #11975)

I've got a hub and a siren, if there's anyway I can help then let me know, not very versed in this sort of stuff but I'm a fairly quick learner.

— Reply to this email directly, view it on GitHubhttps://github.com/Koenkk/zigbee2mqtt/issues/11975#issuecomment-1641643910, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEBWZJGO5QDOW6JVGKEQQULXQ6KKJANCNFSM5R4BVXIA. You are receiving this because you were mentioned.Message ID: @.***>

burner- commented 6 months ago

did you manage to get keypad work properly? I had problem that server side commands give MAC timeout. I have full kit here but not luck yet. Is there something what I can do to help in this. I have plans to buy more of these if I manage to get this work.