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

[New device support]: Outdoor Siren by Lexman (LDSENK07) #12818

Closed
Sonyoyo opened this issue Jun 13, 2022 · 12 comments
Closed

[New device support]: Outdoor Siren by Lexman (LDSENK07) #12818

Sonyoyo opened this issue Jun 13, 2022 · 12 comments
Labels
new device support New device support request stale Stale issues

Comments

@Sonyoyo
Copy link

Sonyoyo commented Jun 13, 2022

Link

https://enki-home.com/produit/sirene-exterieure-connectee-sur-batterie-lexman/

Database entry

{"id":20,"type":"EndDevice","ieeeAddr":"0x04cd15fffe6390ed","nwkAddr":20687,"manufId":4727,"manufName":"ADEO","powerSource":"Battery","modelId":"LDSENK07","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":1027,"inClusterList":[0,3,32,1280,1282,2821],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"LDSENK07","manufacturerName":"ADEO","powerSource":3,"zclVersion":3,"appVersion":2,"stackVersion":6,"hwVersion":1,"dateCode":"20200521-15","swBuildId":"2.3"}},"ssIasZone":{"attributes":{"iasCieAddr":"0x00124b0024c315d8","zoneState":1}},"genPollCtrl":{"attributes":{"checkinInterval":6480}}},"binds":[{"cluster":32,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c315d8","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":6,"hwVersion":1,"dateCode":"20200521-15","swBuildId":"2.3","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1655132684738,"defaultSendRequestWhen":"active"}

Comments

I started using Home Assistant and Zigbee2MQTT a couple of month ago and this is my first 'unsupported' device.

I tried to add a dedicated converter following the instructions and now the siren looks like it is supported...but actually nothing is really working with the siren. Neither the battery status is showing up correctly.

To fill the converter I took a look to other sirens already supported. However, honestly, I do not know how I can check what really correspond to the functionalities of my device.

As far as I understood the process (and the Zigbee protocol), to discover features of devices such as remote controller, one can press the buttons and look at the log to see the messages which are sent. But in the case of a siren, no button is available to press and the functionalities are essentially services that can be called or states that can be read...if only I knew their names !

Thanks in advance for any help.

External converter

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: ['LDSENK07'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'LDSENK07', // Vendor model number, look on the device for a model number
    vendor: 'ADEO', // Vendor of the device (only used for documentation and startup logging)
    description: 'Lexman Wireless Smart Outdoor Siren', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [fz.battery, fz.ias_siren],
    toZigbee: [tz.warning, tz.squawk],
    exposes: [e.warning(), e.squawk(), e.battery(), e.battery_low(), e.tamper()]
};

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

@Sonyoyo Sonyoyo added the new device support New device support request label Jun 13, 2022
@Sonyoyo
Copy link
Author

Sonyoyo commented Jun 24, 2022

Can I have some help on how to test what I should put in fromZigbee, toZigbee and exposes? Is there a place (in the zigbee2mqtt gui or in Home Assistant) where I should try some commands (to call services for example, or to retrieve entity's states or whatever) to define what I should put in the external converter? What would be the syntax and pertinent keywords of such commands?

Should I better start with empty parentheses in the external converter instead of putting there something which appears as non-working?

Thanks for any help...

@Koenkk
Copy link
Owner

Koenkk commented Jun 26, 2022

You can try to execute the squawk and warnings commands from the z2m gui (click on your device -> exposes tab)

@Sonyoyo
Copy link
Author

Sonyoyo commented Jun 27, 2022

Thanks for this suggestion.
I tried to manually execute the warning command, which resulted in the following sequence of messages in the log:

Debug 2022-06-27 23:06:40Received MQTT message on 'zigbee2mqtt/Sirena esterna/set' with data '{"warning":{"duration":5,"level":"medium","mode":"burglar","strobe":true,"strobe_duty_cycle":1,"strobe_level":"medium"}}'
Debug 2022-06-27 23:06:40Publishing 'set' 'warning' to 'Sirena esterna'
Debug 2022-06-27 23:09:22Saving state to file /app/data/state.json
Error 2022-06-27 23:10:03Publish 'set' 'squawk' to 'Sirena esterna' failed: 'Error: Command 0x04cd15fffe6390ed/1 ssIasWd.squawk({"squawkinfo":144}, {"sendWhen":"active","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 13753 - 1 - 35 - 1282 - 11 after 10000ms)'
Debug 2022-06-27 23:10:03Error: Command 0x04cd15fffe6390ed/1 ssIasWd.squawk({"squawkinfo":144}, {"sendWhen":"active","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 13753 - 1 - 35 - 1282 - 11 after 10000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7)
Info 2022-06-27 23:10:04MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'squawk' to 'Sirena esterna' failed: 'Error: Command 0x04cd15fffe6390ed/1 ssIasWd.squawk({\"squawkinfo\":144}, {\"sendWhen\":\"active\",\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (Timeout - 13753 - 1 - 35 - 1282 - 11 after 10000ms)'","meta":{"friendly_name":"Sirena esterna"},"type":"zigbee_publish_error"}' 

@Sonyoyo
Copy link
Author

Sonyoyo commented Jun 27, 2022

Update: many minutes later the Siren starts flashing and making sounds, with irregular frequency and nothing in the log.

Edit:
Some minutes later found this in the log.

Debug 2022-06-27 23:40:06Received Zigbee message from 'Sirena esterna', type 'commandStatusChangeNotification', cluster 'ssIasZone', data '{"extendedstatus":0,"zonestatus":180}' from endpoint 1 with groupID 0
Info 2022-06-27 23:40:06MQTT publish: topic 'zigbee2mqtt/Sirena esterna', payload '{"ac_status":true,"alarm":false,"battery":null,"battery_low":false,"linkquality":123,"restore_reports":true,"supervision_reports":true,"tamper":true,"test":false}'

In the meanwhile I had to tak the battery away to make it stop (it's late for today...)

By the way, there is some progress here, even if I do not know where to go next. It looks like I still have no action available in Home Assistant for this device...

@Sonyoyo
Copy link
Author

Sonyoyo commented Jun 28, 2022

This morning I reconnected the batteries and the siren stayed quiet.
I then tried several command (warning /squawk) which only took effect after a significant delay (about 15 minutes...).

debug 2022-06-28 13:46:44: Received MQTT message on 'zigbee2mqtt/Sirena esterna/set' with data '{"warning":{"level":"low","mode":"burglar","strobe":true,"strobe_duty_cycle":1,"strobe_level":"low"}}'
debug 2022-06-28 13:46:44: Publishing 'set' 'warning' to 'Sirena esterna'
debug 2022-06-28 13:47:44: Received MQTT message on 'zigbee2mqtt/Sirena esterna/set' with data '{"squawk":{"level":"low","state":"system_is_armed","strobe":true}}'
debug 2022-06-28 13:47:44: Publishing 'set' 'squawk' to 'Sirena esterna'

Not sure of which one was effective (actually I do not know what's the difference among this two commands). Moreover, I had some error message later (which inclueded a 'timeout'...is this timeout related to the delay between the command and the noise produced?). They potentially appeared when the siren started to make noise:

error 2022-06-28 13:59:36: Publish 'set' 'squawk' to 'Sirena esterna' failed: 'Error: Command 0x04cd15fffe6390ed/1 ssIasWd.squawk({"squawkinfo":192}, {"sendWhen":"active","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 13753 - 1 - 110 - 1282 - 11 after 10000ms)'
info  2022-06-28 13:59:36: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'squawk' to 'Sirena esterna' failed: 'Error: Command 0x04cd15fffe6390ed/1 ssIasWd.squawk({\"squawkinfo\":192}, {\"sendWhen\":\"active\",\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (Timeout - 13753 - 1 - 110 - 1282 - 11 after 10000ms)'","meta":{"friendly_name":"Sirena esterna"},"type":"zigbee_publish_error"}'
[...]
error 2022-06-28 16:36:14: Publish 'set' 'warning' to 'Sirena esterna' failed: 'Error: Command 0x04cd15fffe6390ed/1 ssIasWd.startWarning({"startwarninginfo":53,"warningduration":5,"strobedutycycle":10,"strobelevel":1}, {"sendWhen":"active","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 13753 - 1 - 116 - 1282 - 11 after 10000ms)'
info  2022-06-28 16:36:14: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'warning' to 'Sirena esterna' failed: 'Error: Command 0x04cd15fffe6390ed/1 ssIasWd.startWarning({\"startwarninginfo\":53,\"warningduration\":5,\"strobedutycycle\":10,\"strobelevel\":1}, {\"sendWhen\":\"active\",\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (Timeout - 13753 - 1 - 116 - 1282 - 11 after 10000ms)'","meta":{"friendly_name":"Sirena esterna"},"type":"zigbee_publish_error"}'

Moreover, I am not sure that the noise-sequences of the siren corresponded to command. They were surely initiated by the command; however, they looked not so regular. And moreover, they never stopped. I tried with warning/mode/stop of with squawk/state/system_is_disarmed but it did not seem to have any effect. I then had to take the battery away once more.
When I reconnected the batteries some hours later, the siren started to make noises once more, no way to stop it. Here follows the logs after reconnection. What could I do?

debug 2022-06-28 18:15:04: Device 'Sirena esterna' announced itself
info  2022-06-28 18:15:04: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Sirena esterna","ieee_address":"0x04cd15fffe6390ed"},"type":"device_announce"}'
info  2022-06-28 18:15:04: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"Sirena esterna"},"type":"device_announced"}'
debug 2022-06-28 18:15:06: Retrieving state of 'Sirena esterna' after reconnect
debug 2022-06-28 18:15:07: Received Zigbee message from 'Sirena esterna', type 'commandStatusChangeNotification', cluster 'ssIasZone', data '{"extendedstatus":0,"zonestatus":180}' from endpoint 1 with groupID 0
info  2022-06-28 18:15:07: MQTT publish: topic 'zigbee2mqtt/Sirena esterna', payload '{"ac_status":true,"alarm":false,"battery":null,"battery_low":false,"linkquality":171,"restore_reports":true,"supervision_reports":true,"tamper":true,"test":false}'
debug 2022-06-28 18:15:11: Received Zigbee message from 'Sirena esterna', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":553844742,"imageType":33287,"manufacturerCode":4727}' from endpoint 1 with groupID 0
debug 2022-06-28 18:15:11: Device 'Sirena esterna' requested OTA
debug 2022-06-28 18:15:14: Received Zigbee message from 'Sirena esterna', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":553844742,"imageType":33287,"manufacturerCode":4727}' from endpoint 1 with groupID 0
debug 2022-06-28 18:15:14: Device 'Sirena esterna' requested OTA
debug 2022-06-28 18:15:17: Received Zigbee message from 'Sirena esterna', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":553844742,"imageType":33287,"manufacturerCode":4727}' from endpoint 1 with groupID 0
debug 2022-06-28 18:15:17: Device 'Sirena esterna' requested OTA
debug 2022-06-28 18:15:20: Received Zigbee message from 'Sirena esterna', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":553844742,"imageType":33287,"manufacturerCode":4727}' from endpoint 1 with groupID 0
debug 2022-06-28 18:15:20: Device 'Sirena esterna' requested OTA
debug 2022-06-28 18:15:23: Received Zigbee message from 'Sirena esterna', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":553844742,"imageType":33287,"manufacturerCode":4727}' from endpoint 1 with groupID 0
debug 2022-06-28 18:15:23: Device 'Sirena esterna' requested OTA
debug 2022-06-28 18:15:29: Received Zigbee message from 'Sirena esterna', type 'commandStatusChangeNotification', cluster 'ssIasZone', data '{"extendedstatus":0,"zonestatus":180}' from endpoint 1 with groupID 0
info  2022-06-28 18:15:29: MQTT publish: topic 'zigbee2mqtt/Sirena esterna', payload '{"ac_status":true,"alarm":false,"battery":null,"battery_low":false,"linkquality":186,"restore_reports":true,"supervision_reports":true,"tamper":true,"test":false}'
debug 2022-06-28 18:16:29: Received MQTT message on 'zigbee2mqtt/Sirena esterna/set' with data '{"squawk":{"state":"system_is_disarmed"}}'
debug 2022-06-28 18:16:29: Publishing 'set' 'squawk' to 'Sirena esterna'
debug 2022-06-28 18:42:15: Received Zigbee message from 'Sirena esterna', type 'commandCheckIn', cluster 'genPollCtrl', data '{}' from endpoint 1 with groupID 0
debug 2022-06-28 18:44:00: Received MQTT message on 'zigbee2mqtt/Sirena esterna/set' with data '{"warning":{"mode":"stop"}}'
debug 2022-06-28 18:44:00: Publishing 'set' 'warning' to 'Sirena esterna'

@Koenkk
Copy link
Owner

Koenkk commented Jun 29, 2022

Can you try to repair this device directly next to the coordinator and keep it there? This may solve the big delay you are seeing (maybe one of the routers is messing up)

@Koenkk Koenkk closed this as completed Jun 29, 2022
@Koenkk Koenkk reopened this Jun 29, 2022
@Sonyoyo
Copy link
Author

Sonyoyo commented Jun 29, 2022

The siren Is already less than a meter away from the coordinator and I think it was already there when I last paired it.
However, I removed the device and paired again. Then I tried several 'squawk' commands with no effect, even waiting some minutes after them. The log shows the commands sent and the associated (but delayed) error messages that I posted above.

@Koenkk
Copy link
Owner

Koenkk commented Jul 1, 2022

Can you try with the following external converter? Make sure to reapair the device after loading the new converter:

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: ['LDSENK07'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'LDSENK07', // Vendor model number, look on the device for a model number
    vendor: 'ADEO', // Vendor of the device (only used for documentation and startup logging)
    description: 'Lexman Wireless Smart Outdoor Siren', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    fromZigbee: [fz.battery, fz.ias_siren],
    toZigbee: [tz.warning, tz.squawk],
    exposes: [e.warning(), e.squawk(), e.battery(), e.battery_low(), e.tamper()],
    configure: async (device, coordinatorEndpoint, logger) => {
        device.defaultSendRequestWhen = 'immediate';
        device.save();
        await device.getEndpoint(1).unbind('genPollCtrl', coordinatorEndpoint);
    },
};

module.exports = definition;

@Sonyoyo
Copy link
Author

Sonyoyo commented Jul 2, 2022

Thanks for your support !!!
Now I can call the "warning" and it works with nearly no delay ! Wonderful ! I can also stop it setting mode=stop.

squawk does not seems to work...but that is not really an issue for me since I can use the "warning" call...am I missing something ?

I can now call the siren from Home Assistant but only passing through the mqtt.publish service : I have no action available directly associated to the siren...

What should I then do next ?

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jul 2, 2022
@Koenkk
Copy link
Owner

Koenkk commented Jul 2, 2022

Great, added it now for support out-of-the-box.

HA doesn't provide a nice way to integrate a siren device, so you should use the mqtt.publish service.

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

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

@github-actions github-actions bot added the stale Stale issues label Aug 2, 2022
@github-actions github-actions bot closed this as completed Aug 9, 2022
Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this issue Dec 13, 2022
@maxill1
Copy link

maxill1 commented Jul 11, 2023

Thanks for your support !!! Now I can call the "warning" and it works with nearly no delay ! Wonderful ! I can also stop it setting mode=stop.

squawk does not seems to work...but that is not really an issue for me since I can use the "warning" call...am I missing something ?

I can now call the siren from Home Assistant but only passing through the mqtt.publish service : I have no action available directly associated to the siren...

What should I then do next ?

Hi, @Sonyoyo,

I own the same device and it seems that any "warning" "mode" I select in z2m UI, the siren produces the same sound.
Is it the same for you?

Also tested publishing via MQTT, same results:

  • {"warning": {"mode": "burglar", "duration": 10 }}
  • {"warning": {"mode": "fire", "duration": 10 }}
  • {"warning": {"mode": "emergency", "duration": 10 }}
  • {"warning": {"mode": "police_panic ", "duration": 10 }}
  • {"warning": {"mode": "fire_panic", "duration": 10 }}
  • {"warning": {"mode": "emergency_panic", "duration": 10 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request stale Stale issues
Projects
None yet
Development

No branches or pull requests

3 participants