[Z2M] Adding features for AQARA JY-GZ-01AQ

Hello,
I bought this smoke detector Aqara SD-S01D and it’s missing a few features.
Here are the details:




{
  "battery": 100,
  "buzzer_manual_alarm": false,
  "buzzer_manual_mute": false,
  "heartbeat_indicator": false,
  "last_seen": "2025-02-18T21:04:36+00:00",
  "linkage_alarm": true,
  "linkquality": 220,
  "power_outage_count": 14,
  "smoke": false,
  "smoke_density": 0,
  "smoke_density_dbm": 0,
  "test": false,
  "update": {
    "installed_version": 19,
    "latest_version": 17,
    "state": "idle"
  },
  "voltage": 3091
}

Thanks in advance!

Hello,

Gladys doesn’t integrate all the features of every device (especially the more exotic ones).
Here, for example, the actions Test / Manual Cut / Number of Power Outages are not integrated because they are very rarely used.
I can look into the Manual Alarm part; I believe that has already been done.

Which features do you really need in Gladys?

Hi @cicoub13
indeed I don’t need all the features.
From what I saw during my smoke detection tests, I think that:

  • smoke_density is useful to know if there is even a little smoke (smoke=true if smoke_density\u003e=10). No need for smoke_density_dbm.
  • selftest can be triggered physically on the detector but for those who have the detector high up and not accessible without a step stool/ladder, it would be nice to be able to trigger it in Gladys
  • test would interest me because I have 4 detectors (1 per floor) and I’d like to create a manual scene that tests all my detectors and sends me a Telegram report
  • for the manual alarm (buzzer_manual_alarm ?) it would be interesting if we also want to use this detector as an internal alarm siren during absences (I know that’s not the detector’s primary purpose but if it can « scare » intruders, I prefer to be belt-and-braces). We might also need buzzer_manual_mute to mute the alarm via Gladys.
{
  "battery": 100,
  "buzzer_manual_alarm": false,
  "buzzer_manual_mute": true,
  "heartbeat_indicator": false,
  "last_seen": "2025-02-19T13:22:36+00:00",
  "linkage_alarm": true,
  "linkage_alarm_state": true,
  "linkquality": 224,
  "power_outage_count": 14,
  "smoke": true,
  "smoke_density": 10,
  "smoke_density_dbm": 0.125,
  "test": false,
  "update": {
    "installed_version": 19,
    "latest_version": 17,
    "state": "idle"
  },
  "voltage": 3079
}

From what I could find, linkage_alarm would allow linking several devices together so they all sound at the same time. By default when pairing with z2m, it’s true. I don’t know, however, whether the Aqara hub handles that or whether z2m can do it (couldn’t find anything :frowning: ) or whether I need to create a specific scene in Gladys.

I’ve added the smoke_density feat(z2m): Add smoke_density by cicoub13 · Pull Request #2242 · GladysAssistant/Gladys · GitHub

The rest will require a bit more research and development from me

thanks @cicoub13, I’d like to help you with dev but I’m far from being up to speed :frowning:

EDIT: from what I saw of your additions on GitHub, I think you took the smoke_density but applied the info from smoke_density_dbm.

For smoke_density, there is no unit, it’s just an integer.

Ah yes, you’re right, I mixed the two. So what’s the unit of smoke_density then?

There isn’t one; it’s just an integer that starts at 0 and goes up to some point :smiling_face:. I can only say that if it goes past 10, the detector will sound.

Hi @cicoub13,

1 Like

hello @cicoub13
have you by any chance been able to rework the feature additions for this sensor?
Thanks in advance

1 Like

@cicoub13 Do you want me to take the lead on this topic? :slight_smile: Do we just need to remove the unit from smoke_density?