Hubitat with Homemade Temperature, Humidity, Pressure and Light sensor


Hi John,

BMP280 does not have humidity. It could be a BME280.

These sensor can be configured differently. We are reading the sensor once every 200ms. This will generate a bit different reading based on the datasheet section 3.5. Purely, for environment sensor, the sensor need to be read only "1 sample per minute" (see section 3.5.1). I am not willing to go this low yet as there are other application that may want to read the reading rather quickly(for example indoor navigation or game). I have to pick one that is reasonable and calibrate the value at DH.

ps. Bosch 280 data sheet for reference

Particle Photon DH and Apps

Yes the BMP280 was a typo on my part.

I had abandon this issue thinking I received a fluke, however when I read others were reading low it piqued my interest again. I realize there are optimal and non-optimal operating modes but the sensor I have is literally low by about 20%. Well out of the realm of "wrong mode" error.

As for the driver "calibration" capability, I don't think I have a typical case.


I have one of @iharyadi's sensors on my screen porch. It seems to track Relative Humidity pretty closely to Weather Underground's data after I applied a +15% offset.

I also have an AM2320 sensor attached to one of my custom boards running HubDuino in my attic. I see this attic sensor consistently tracking lower. Hard to tell if it is due to increased attic temperatures, or just the fact that I don't have an offset applied to it?

In general, I find RH to be a fairly noisy signal, with a lot of variability from sensor to sensor. Since temperature factors into the relative humidity calculation, it make sense that it would be somewhat noisy.


I just want to update everyone on the battery backup feature.

I am watting on one chip that handle battery protection. There is bit of setback on the shipment. The original order that I make one month ago seems to be missing. I have ordered the part again from separate channel in China. I did hope to arrived before Thanksgiving. However, it seems that it also running late on the shipment. I hope to get this out before Thanksgiving. However, it seems more like before Christmas more likely.

I have went ahead test the module without battery protection chip. It has been working as expected. The battery backup work well in my testing.

I hope this help for those who are waiting to get the module.



Hi Iman, I'd be interested in buying a few of your newest sensors as well, when they are ready. I'm interested in utilizing the sensor and repeater features. Thanks.


I will post an update here when they are close to ship out. I have placed the components as much as possible. However, I am still waiting for one component.


Hi Everyone,

The build for battery backup is completed. I am testing the unit at this moment. It will support one cell lithium polymer and lithium ion battery only. These typically translate to 3.7v lipo battery that you find in toys. It supports unprotected battery. My recommendation is to use unprotected battery. The module has under and over voltage protection. It should also work with protected battery.

Here they are.

The first variant is just like the old module with battery attachment.

The second variant use thinner pcb but extend all the way to cover the antenna. I would like to try if we can make lighter board. The board is slightly larger to help with the structure to compensate for the thin board.

The last variant is much bigger board to test using 18650 cell. I probably will not make this variant anymore. The cost of battery holder is expensive. I also do not know how to ship them yet. I want to give you guys a try so that I can get some feedback. If this variant is really useful, I would have to think about how to source the battery holder better.

Battery selections is interesting. I design it as a backup power. It is not an alternate power source. In my mind the backup power is only needed temporarily. Therefore, a small battery is making sense. As an example, the battery on the second picture can last about 1 to 2 hours. This should be enough to cover power outage in home that has generator backup. The battery will cover that short time before the generator kick in in the event the main power goes out. This is my personal choice. The battery on the first image can last about 4 to 5 hours. The module that can fit 18650 battery cell can last much longer. These cells come with variety of capacity. It is hard to say how long it will last. I use Panasonic 18650 NCR18650B to test. This should give you about 18 hours of backup time.

The module will use approximately 150 milliamps. You can approximate how long it will last with the battery you use.

I typically build one or two modules and test them quite a bit. Then, I build the rest of the modules(set of 10). I smoke test them before I send them out. Now, it is hard to smoke test the battery functionality. It will take a very long time to charge and discharge the battery and test each one before I ship them out. Therefore, I will not smoke test the battery functionality. I will smoke test the other functionality before shipping.

At this time, all modules is fitted with all sensors. If you are interested, pm me. I do request $28 donation for each module to recover the hardware cost. If you interested on variant that hold 18650, I may need additional help to cover the shipping cost. I will do some research and get back to to you next week if you interested on this variant (the third picture).

I expect to ship them out this week especially the smaller module(picture 1 and picture 2).


Xiaomi devices - are they pairing / staying connected for you?

I forget to mention. Battery is optional. The module will work without battery. Without battery, the module will stop functioning when the main power is down.


This looks great! And I think you're right about the battery--a few hours is probably more than enough for most cases (and really, if another Zigbee router is in range, most devices should find that and automatically switch their routing, so even completely going down isn't a problem unless you're truly out or range--or using Xiaomi devices that seem hesitant to switch their routing and seem to require their hourly checkin or they'll "fall off," so this would be great for avoiding that problem during a power outage!).

For the sensor with a battery, is the battery able to be temporarily disconnected? I'm just thinking that sometimes, you may want devices to join to the hub directly (or maybe try to join through a specific router--Xiaomi, I'm looking at you), and sometimes removing a specific repeater from your network temporarily is the best way to try to make that happen.


The battery is optional. The connection can be unplugged temporarily. This is also needed to factory reset the module with the reset button.

Thank you for bringing it up.


@bertabcd1234, This is really a good point to bring up. I really appreciate it. I just want to share why battery backup become important to me.

Initially, yes, the reason is that it is a hassle to re-pair Xiaomi devices when its favorite router went out. I experience this myself when I move around my module. I then realize that unplugging the power to the module I risk to loose some my Xiaomi devices. I have to repair them again. What a hassle!!

Another scenario where you can experience issue during power outage with a non xiaomi devices. A Zigbee device will look for another parent in theory. It is just the parent sometime has very limited count of number of child it can support. A parent (is coordinator or router) has a limit on the end device (especially sleeping one) it can connect to. In the case of power outage (especially partial power outage like fuse tripped), the functioning parents may be overwhelm by the battery powered children on houses with huge count of battery powered sensors. These end devices, yes the non Xiaomi, can give up and dropped from the mesh.

Zigbee router is not like wifi mesh router. Wifi mesh router has much higher count of child support. Zigbee router typically a small MCU with very little RAM. They are just not build to handle large number of clients.

Battery backup is not high in my list initially. However, I did experience some strange problem after power outage even with non Xiaomi devices. I decided that I battery backup is rather high in my priority to get myself a better Zigbee network. Making the battery backup feature is worth the time and effort for long term of the project.


Here are all the modules available.

1/2 of the first 3 rows has been shipped out or spoken for.



If you have one with the expansion header I will take one. I want to put the ultrasonic distance sensor on it so I can detect my garbage can. Good sensor for a take the garbage out reminder.


All of them has expansion, there are many ultrasonic sensor. If you get the one that generate analog output that should work.

PM me know if you want it.


Hi Iamn, I received my sensor but having difficulty in pairing. I've loaded the driver from Github. The LED is illuminated on the device, so power is good. I never see the sensor try to join at all. Usually with tough to pair devices I can see a new 16 bit address showup in the zigbee logs, and I'm not seeing that with the sensor.
It also never shows in my xbee scan, as some xiaomi devices do when pairing.
What else to try?


@Rxich, It is really strange. I tested your sensor before I ship it out. There is no issue pairing.

Can you share with me the Zigbee channel that you use? Do you also have a way to check if there are interference with near by wifi? There is a free Wifi Analyzer that I use if there are strong wifi signal which overlap with my zigbee network.

Once we double check that this is not an issue with interference. I think the first thing to do is to reset the module. Please unplug the module from power and battery. Without the battery and the sensor is unplugged, press the button on the back. Plug the sensor back to USB power (without the battery) and keep pressing the button for 5 second and then release it. During this troubleshooting time, please try to reset the sensor when you are having issue.

Please make sure the sensor oriented sideway (not upside down). You can also try to pair the sensor close to the hub temporarily.

Once paired, you do not need to do reset like above and can move the sensor to any locations.

Please let me know. I am really interested to get this sort out.


Hi Iman, I tried again after resetting, no success. I even tried to pair to my smartthings hub and again nothing.
My hubitat channel is 25 and ST channel is 19 and neither hub can find sensor.
As a test, right after sensor fail to pair, I added a new Xiaomi vibration sensor and that was found easily in same environment. My WiFi is way down at channel 1 to avoid interference, and hubs at opposite ends of house.
I used this driver;


I check the link it is not the correct driver.

The correct driver is

Here is the ST DTH

If the driver is not found, it should show up literary as a "device" in hubitat. It should show up as "thing" in ST.

I have the same ST and Hubitat hub as well. I tested the module in the same environment. They paired just fine. In some rare occasions, ST hub steal devices during paring. I experience this myself at some time. I do not see them now days. Please check if you see any devices in your ST shows up as "thing".

I think channel 25 should be fine. However, I do have some note that it mention issue with channel above 24. If you are fine about changing your hubitat zigbee channel to test, this is something that you can try.

As last resort, you can send me back the module. I can send another one. I do not want to waste our time by sending back and fort modules until we get to the bottom of it. It is possible that the module is broken during shipment. In this case, the broken module is valuable to me to learn the weak link. I am open to do this as well. I am really curious with the pairing issues.

In previous revision, I heard some small paring issue. Typically, they are intermittent. It was unlikely a hardware issue.


This morning also test the pairing for the modules again with what I have left here. They went and paired just fine.

deviceJoin New ZigBee device joined 1325 2018-12-09 10:27:21.917 AM PST
deviceJoin New ZigBee device joined 1324 2018-12-09 10:14:06.684 AM PST
deviceJoin New ZigBee device joined 1323 2018-12-09 10:12:37.047 AM PST
deviceJoin New ZigBee device joined 1322 2018-12-09 10:11:47.168 AM PST


Hi Iman, I tried again after resetting, no success. I even tried to pair to my smartthings hub and again nothing.
My hubitat channel is 25 and ST channel is 19 and neither hub can find sensor.
As a test, right after sensor failed to pair, I added a new Xiaomi zigbee vibration sensor to hubitat, and that was found easily in same environment. My WiFi is way down at channel 1 to avoid interference, and hubs at opposite ends of house. Neighbor WiFi is low signal and don't believe is causing issue, as I regularly pair zigbee devices and don't have issues.
What would you recommend at this point?
EDIT- I see your prior response. If I have no sucess by morning, I will securely pack and return ship to you for "autopsy"