# Dev module xiaomi v4

**URL:** <https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803>\
**Category:** Développement\
**Created:** [July 2, 2019, 6:36pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803 "2019-07-02T18:36:29Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [August 29, 2020, 8:58am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/130 "2020-08-29T08:58:10Z")

</div>

Hello @link39,

I plan to buy several Xiaomi switches and sensors, but without the gateway.

All of those that interest me are supported by the zigbee2mqtt project.

I wanted to check with you if you have been able to correctly use Gladys with your switches in particular?

---

<div class="post-metadata">

**Author:** ![link39](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/link39/32/3756_2.png) [@link39](https://community.gladysassistant.com/u/link39)\
**Post date:** [September 10, 2020, 5:56am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/131 "2020-09-10T05:56:06Z")

</div>

Hello.

I’m going through the xiaomi gateway. During my last tests, the sensors were working but not the switches. Just a small function was missing in the code.

---

<div class="post-metadata">

**Author:** ![jerome](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/jerome/32/7030_2.png) [@jerome](https://community.gladysassistant.com/u/jerome)\
**Post date:** [September 19, 2020, 9:24pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/132 "2020-09-19T21:24:01Z")

</div>

Hello @link39

Is the issue resolved for the switches?

Thank you

---

<div class="post-metadata">

**Author:** ![Hamtaro](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/hamtaro/32/2373_2.png) [@Hamtaro](https://community.gladysassistant.com/u/Hamtaro)\
**Post date:** [November 8, 2020, 10:17am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/133 "2020-11-08T10:17:35Z")

</div>

Yop!

I’m bringing back the topic to help a developer if needed.  
I have my two gateways at home with wired switches (with and without neutral) available to finally integrate the control functions into Gladys. 😉  
All the equipment is recognized but @pierre-gilles didn’t have time to finish the code I think 😉

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [November 9, 2020, 9:04am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/134 "2020-11-09T09:04:59Z")

</div>

I’m responding to @Hamtaro’s message; we’re looking for a Xiaomi developer to help finish this integration 🙂

No need for huge skills to help, it’s just Node.js!

---

<div class="post-metadata">

**Author:** ![damalgos](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@damalgos](https://community.gladysassistant.com/u/damalgos)\
**Post date:** [November 9, 2020, 3:29pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/135 "2020-11-09T15:29:32Z")

</div>

Hello,

Not much presence these days, just no time. But it’s starting to free up 😃

So I’d be happy to help with the Xiaomi part, especially since I helped at the beginning of the development.

@Hamtaro I’m installing everything, taking a look, and will come back to you to ask you questions to integrate your devices.

---

<div class="post-metadata">

**Author:** ![damalgos](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@damalgos](https://community.gladysassistant.com/u/damalgos)\
**Post date:** [November 9, 2020, 3:57pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/136 "2020-11-09T15:57:34Z")

</div>

Hop on will go directly here.

The information I need is stored in the gladys logs. Normally you should see something like:

```bash
Xiaomi device "${message.model}" not handled yet!

```

With of course the ${message.model} which is the «&nbsp;model&nbsp;» of the object.

You can do a `docker logs gladys 2>&1 | grep 'Xiaomi device'` to find the information 🙂

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [November 9, 2020, 4:12pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/137 "2020-11-09T16:12:42Z")

</div>

@damalgos I edited the grep because it’s a bit special with Docker logs 😉

---

<div class="post-metadata">

**Author:** ![damalgos](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@damalgos](https://community.gladysassistant.com/u/damalgos)\
**Post date:** [November 9, 2020, 4:13pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/138 "2020-11-09T16:13:41Z")

</div>

Yep you did well it’s an oversight ahah

---

<div class="post-metadata">

**Author:** ![Hamtaro](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/hamtaro/32/2373_2.png) [@Hamtaro](https://community.gladysassistant.com/u/Hamtaro)\
**Post date:** [November 9, 2020, 7:19pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/139 "2020-11-09T19:19:03Z")

</div>

Logs with grep 😉

---

<div class="post-metadata">

**Author:** ![damalgos](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/e274bd/32.png) [@damalgos](https://community.gladysassistant.com/u/damalgos)\
**Post date:** [November 9, 2020, 7:20pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/140 "2020-11-09T19:20:05Z")

</div>

Yes, that makes sense, it is actually supported! Normally, at least. You need to configure the gateway key, but I’m not very familiar with that part.

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [November 12, 2020, 8:48am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/141 "2020-11-12T08:48:45Z")

</div>

Hello,  
Thank you for the work you do. I also have a gateway configured on the Chinese server, with two sensors, one «&nbsp;temperature&nbsp;» sensor and the other, «&nbsp;presence sensor&nbsp;». Gladys recognizes all three. The temperature displays well on the dashboard, I have integrated the motion sensor into a scene, it works well, the gateway appears on the dashboard, but I have no action on it (On/Off, color). Is this normal? Or is it because it’s not developed? I can also help with testing if needed.

---

<div class="post-metadata">

**Author:** ![Hamtaro](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/hamtaro/32/2373_2.png) [@Hamtaro](https://community.gladysassistant.com/u/Hamtaro)\
**Post date:** [November 12, 2020, 2:41pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/142 "2020-11-12T14:41:39Z")

</div>

Yes, that’s normal. The entire command part for Xiaomi devices is not coded.

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [November 12, 2020, 7:53pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/143 "2020-11-12T19:53:48Z")

</div>

Ah, thank you for the reply, I’ll wait 🙂

---

<div class="post-metadata">

**Author:** ![Exilon62](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/exilon62/32/6003_2.png) [@Exilon62](https://community.gladysassistant.com/u/Exilon62)\
**Post date:** [November 13, 2020, 8:29am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/145 "2020-11-13T08:29:57Z")

</div>

Hello,  
you can follow this tutorial: [Xiaomi Home | Gladys Assistant](https://gladysassistant.com/fr/docs/integrations/xiaomi) to then see your devices. You will then need to associate each detected device with a room in your home.

Have a nice day

---

<div class="post-metadata">

**Author:** ![Exilon62](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/exilon62/32/6003_2.png) [@Exilon62](https://community.gladysassistant.com/u/Exilon62)\
**Post date:** [November 13, 2020, 10:23am UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/147 "2020-11-13T10:23:18Z")

</div>

Have you already linked your sensors with the Xiaomi mobile app? Your sensors need to be visible to your gateway so that Gladys can detect them later.

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [November 13, 2020, 2:47pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/149 "2020-11-13T14:47:07Z")

</div>

What password?  
Just need to pass the gateway in developer mode (as written in the doc)

What is the model of your gateway?

@Hamtaro if you pass by 🙂

---

<div class="post-metadata">

**Author:** ![Hamtaro](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/hamtaro/32/2373_2.png) [@Hamtaro](https://community.gladysassistant.com/u/Hamtaro)\
**Post date:** [November 13, 2020, 2:52pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/150 "2020-11-13T14:52:35Z")

</div>

Indeed, there is confusion.  
The password will only be used when the command function code is developed.  
Otherwise, everything is done in read-only mode, just by passing the gateway in developer mode.

You just need to make sure you have a Xiaomi gateway compatible with the library used. I’m not up to date on that anymore…

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [November 13, 2020, 2:53pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/151 "2020-11-13T14:53:55Z")

</div>

> [@Hamtaro](#):
>
> I’m not really up to date on this…

Naughty! You’re the Xiaomi expert 😃

---

<div class="post-metadata">

**Author:** ![Hamtaro](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/hamtaro/32/2373_2.png) [@Hamtaro](https://community.gladysassistant.com/u/Hamtaro)\
**Post date:** [November 13, 2020, 4:32pm UTC](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803/153 "2020-11-13T16:32:29Z")

</div>

What equipment do you have?

You need to wait for information to transit to see the different sensors appear.

[Previous page](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803.md?page=5)

[Next page](https://community.gladysassistant.com/t/dev-module-xiaomi-v4/4803.md?page=7)
