Is it possible to connect an external Siren to the xiaomi gateway?

Okay - I’ll try to set that up as well, thanks :+1:

I can’t understand how this is so wrong. I have 2 requirements:

  • When the alarm is triggered also activate an external siren

  • Be able to share the alarm control to other users

Well, this seems to be totally imposible to achieve simultaneously:

If you use the implemented “Alarm” system you can’t add an external device (like activating a smart plug when the alarm is triggered)

If you create an scene, like someone suggested before, you can’t share it with other users.

am I wrong? it is totally insane.

Easily possible. How each person does this is dependent on their particular hardware selection.

Also possible.

Yes.

This thread is about physically connecting a siren to the xiaomi gateway. ie: hacking the hardware. What you have posted about is largely down to how you code your HA automations / scripts/ whatever. Neither of your points have anything tom do with the xiaomi gateway.

Hello everyone. I know this is an older topic, but I am trying do what you describe and I got stuck. I think Xiaomi updated the app and now we can’t add an action when the alarm is triggered. any ideas ???

I have a Xiaomi Hub and I was trying to use it as siren in my alarm system automations. However the service

cannot be found even the gateway is there and I can also change the alarm state and I can change the colors via scripts. But I cannot find any service that lets me trigger an alarm / play a ringtone.

I can play the alarms however using the MI home app on my phone so the hub is capable of that.

What I am not sure about is if I might have the wrong hub. With Xiaomi this is a nightmare with Mija, Miio, Xiaomi, Aqara, Luma etc. hubs, gateways, v1, v2, v3 for China, Europe, etc.

Mine is called Xiaomi Gateway and it uses the Xiaomi Miio: Xiaomi Gateway integration

Does anyone know how this can be done?

Thanks

So in the dev tools you can’t find this?

nope that is the problem. I don’t have the Aqara hub but a Xiaomi hub. Mine is connected via the Xiaomi Miio integration which seems not to support the audio.

I did also try to connect it via the Xiaomi Gateway (Aqara) integration which is the one that has the ringtone service.

I tried to connect the gateway via that integration but it always fails to detect it even according to the description of the integration that one should support “Xiaomi Mijia Gateway (lumi.gateway.v2, lumi.gateway.v3)” which is the one I have.

In the past I also had the Aqara hub once (now sold) which was a complete non-starter and could not be connected to HA whatsoever, that’s why I sold it.

Xiaomi/Aqara is such a mess :frowning:

So do I. Mine is about 4 years old.

Yep:

image

Hmmm that is interesting. I disabled the Miio integration and then tried adding the Xiaomi Aqara integration. I tried multiple times to find it via Auto search, with IP and with MAC address. Noting worked.

However maybe I need to completely delete the miio integration and delete the existing devices and entities instead of just disabling them?

I’m not sure. I never had an issue adding it to the integration. I’ve had mine so long it used to be integrated via YAML

Ah I think I now remember what the issue was. You need to switch to the Chinese server in order to add it. I remember a few months ago I had the hub and lots of child devices paired via the Mi Home app and I wanted to integrate all of them via the Xiaomi Integration. But I needed to enable the local network functions first.

For iOS: You first need to enable local network functions by using the iOS Mi Home App iosApp Mi

  1. Install the App on a iOS device
  2. Make sure you set your region to: Mainland China under settings → Locale - required for the moment.
  3. Mainland China and language can set on English
  4. Select your Gateway in Mi Home
  5. Then the 3 dots at the top right of the screen
  6. Then click on about
  7. Tap under Tutorial menu(on the blank part) repeatedly
  8. You should see now 3 extra options listed in Chinese until you did now enable the developer mode. [ if not try all steps again!]
  9. Choose the second new option
  10. Then tap the first toggle switch to enable LAN functions. Note down the password (29p9i40jeypwck38 in the screenshot). Make sure you hit the OK button (to the right of the cancel button) to save your changes.
  11. If you change here something, you lose your password! [ this password you need in Domoticz ]

I did switch over to the Chinese server and it lost all my devices and also the option starting with step 5. were simply not there and I could not activate the local network functions at all. Therefore I moved all the sensors to deconz and abandoned that option.

Did you manage to do this? Or did you manage to add the gateway even though you could not enable this either?

On second thought, could you past your lines from your config.yaml where you added the integration? Then I will also try to add it directly in the config.

Thanks!

From memory I used the Chinese server as that was explained in the docs at the time. I have all the child devices brought through to HA without any issues. As you can see in my screenshot above, the Xiaomi Integration shows 11 devices, 1 is the gateway and the other 10 are child devices that are paired with it. I stopped pairing devices to the gateway once I got a Conbee2 so the rest of my Zigbee devices are paired with that. I just haven’t bothered to remove the remaining 10 devices from the gateway.

I’m pretty sure adding it via YAML was deprecated completely, now it’s configured via the GUI.

Ok got it. I guess than I am out of luck :frowning: anyway gonna ditch the gateway then and either try to use my Sonos or Alexas to play alarm sounds or get a dedicated zigbee indoor siren. Anyhow at least all my Aqara sensors work nicely via deconz. Looking so much forward to the new thread versions and than connecting all via matter later this year.