# Xiaomi TH sensors

**URL:** <https://discourse.nodered.org/t/xiaomi-th-sensors/7865>\
**Category:** General\
**Created:** [12 February 2019 08:03 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865 "2019-02-12T08:03:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 08:03 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/1 "2019-02-12T08:03:49Z")

</div>

Hi,

I have quite a few temperature sensors in node and they all show different temperature to the native Xiaomi app.  
Humidity is spot on.

TIA

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 February 2019 08:23 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/2 "2019-02-12T08:23:29Z")

</div>

Is this a statement or is there a question?

If it is a question, how are you getting the data into Node-RED?  
If you are using a node, what is it's full name?  
What does the debug show?  
What does it show in the Xiaomi app?

---

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 08:46 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/3 "2019-02-12T08:46:07Z")

</div>

It meant to be a question.  
I am using node-red-contrib-xiaomi-miio and temperature is showing via node 2-4 degrees lower than app.

that's debug:  
{"voltage":2995,"temperature":19.48,"humidity":41.47,"atmosphericPressure":"98280"}

no errors being reported.

---

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 09:00 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/4 "2019-02-12T09:00:01Z")

</div>

Ok, the issue has been found.  
I have installed different Xiaomi node and all the values are good.

Do not use the miiO node!

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 February 2019 09:10 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/5 "2019-02-12T09:10:03Z")

</div>

you can rate the node on [flows.nodered.org](http://flows.nodered.org) if you sign in with your github ID.  
But you should also open an issue on the nodes github page to notify the author so the issue can be fixed.  
[https://github.com/aformusatii/node-red-contrib-xiaomi-miio](https://github.com/aformusatii/node-red-contrib-xiaomi-miio)

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [12 February 2019 10:47 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/6 "2019-02-12T10:47:09Z")

</div>

> [@cismarine](#):
>
> I have installed different Xiaomi node and all the values are good.

Which contrib node?

As an alternative see also [xiaomi-mqtt](https://github.com/cflurin/xiaomi-mqtt)

---

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 10:52 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/7 "2019-02-12T10:52:54Z")

</div>

node-red-contrib-mi-devices, but again it is not working correctly.  
I've added few th sensors and the whole thing flipped out...

TypeError: Cannot read property 'status' of null  
at RED.nodes.eachNode (/home/pi/.node-red/node\_modules/node-red-contrib-mi-devices/node-red-contrib-xiaomi-gateway/xiaomi-gateway.js:103:41)  
at Object.eachNode (/usr/lib/node\_modules/node-red/red/runtime/nodes/flows/index.js:196:13)

I will try Xiaomi-mqtt

Thanks

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 February 2019 11:12 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/8 "2019-02-12T11:12:28Z")

</div>

But again, it’s worth opening an issue against the node so that the author is aware of the problems you experienced and can hopefully improve the node

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [12 February 2019 11:22 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/9 "2019-02-12T11:22:43Z")

</div>

@cismarine

I've tested several xiaomi contrib-nodes without success and I also asked the authors for help.  
The problem is that using `dgram` (in and out) isn't easy to do in node-red.  
In my opinion the best is to use an external app/package.

---

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 11:22 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/10 "2019-02-12T11:22:57Z")

</div>

I did post ongithub

---

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 11:24 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/11 "2019-02-12T11:24:01Z")

</div>

what have you settled on?

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [12 February 2019 11:27 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/12 "2019-02-12T11:27:34Z")

</div>

I did build [xiaomi-mqtt](https://github.com/cflurin/xiaomi-mqtt/blob/master/index.js) 😉

---

<div class="post-metadata">

**Author:** ![cismarine](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@cismarine](https://discourse.nodered.org/u/cismarine)\
**Post date:** [12 February 2019 11:49 UTC](https://discourse.nodered.org/t/xiaomi-th-sensors/7865/13 "2019-02-12T11:49:16Z")

</div>

ahhh ok. I will try it.
