Hubitat with Homemade Temperature, Humidity, Pressure and Light sensor

Thanks for the note on the sensor, I have some experience with this sensor, and typically find it to be accurate. I may load a sketch on my Spark and hook a breakout board to it with this sensor to see if I can replicate your board's results.

Side note, have you considered including eC02? Sparkfun has a breakout that add's a CCS811 chip and uses the BME280 to increase its accuracy ( which could be useful for indoor air quality (turn on ERV/Fans) control.

Either way, great work I and look forward to snapping up the next iteration and continue testing. I nearly handed your boards off to a friend to 3D print a case but even with the offsets and what I consider very accurate temperature readings I don't agree with it's RH calculation.

I have been thinking about case. Please do share with us what you find and your design. Casing will complicate a lot. Unlike your other sensor, this sensor heat can be trapped inside the case. This can influence the reading. This is what you pay when you have the sensor powered all the time. However, you do get the benefit of it becoming a router. At that time, I think the routing capability is very important. I am willing to have a naked sensor rather than having it sleep. Case will be something that I will look into later. You will need to compartmentalize to isolate the sensor from the rest of the system. This is solvable. It is just need some design work.

A battery or sleeping sensor does not have heat issue. They will be sleeping most of the time. Their board and sensor will not heat up.

I have not looked at integrating CCS811. The sensor is expandable. It does not have I2C expansion. I will continue working on improving the expand-ability of the sensor. This is another firmware feature in my list before I can make improvement on the DH.

For now, in my head is to get the battery backup done.

Hi Chris,

I notice that you have expansion pad version.

I have experiment with this sensor.

It work. It may not be accurate. However, it is enough to detect dangerous or not dangerous level of CO2. I do not like the MQ-7 since it will need to be heat up. It is just simply a resistor that when heated change its value depending on some gas detected. It is cheap.

I have one of the first "homemade" temp/humidity/pressure/light sensors. I find the humidity to be about 20+ % low. I've used a BMP280 on a RasPi and found it to be accurate. I've been thinking perhaps small processor cannot do the required calculations.

On the other note: I've tried a CCS811 an could get no useful data from it. It exhibited significant drift. I have A BMP680 but have not had time to try it yet.

I did find the CCS811 required "clock stretching" to communicate with my RasPi. Info from CCS811 tech support and verified by my testing.


I seem to be running 4-5% low somewhat consistently, though I've seen some erratic dips. I too have previously seen success with this sensor on arduino/netduino systems.

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

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.


1 Like

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.

1 Like

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).



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.

1 Like

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.

1 Like

@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?