Expandable Zigbee Repeater Solution (With Temperature, Humidity, Pressure and Light sensors)

I have to say, after using one of these for a couple of weeks now; it is rock solid. Technically, a fussy Xiaomi Aqara Motion Sensor is the only child. Yet all the neighbor devices around the repeater seem much more reliable. I have a group of Sengled BR30s and almost daily at least one would become unresponsive. Since adding the repeater, not even once.

1 Like

Hi Mike,

Thanks for the feedback.

You bring up a good point. The module can also be a repeater for devices that is not battery powered. As a zigbee router, it can help relaying messages from device like BR30 even though it is not count as a child. The BR30 should be count as neighbor. In zigbee, a neighboring device can also help in repeating the signal. This is different from WIFI (star architecture).


I just want to update everyone with the latest improvement on the Environment sensor.

In this iteration, I am trying to improve the power management system. It is important for the sensor to be able to operate during short power outage especially since it is double up as a repeater. For those who has Xiaomi devices, one may want to keep them as a child of this sensor.

Here is the new board will look like.

It is a bit bigger compare to previous board to accommodate charging circuit.

I am not finish testing this feature. There are a couple parts that still need to be installed. I have started testing with common toy lipo battery.

This power management is unique for this type of sensor compared to what is available in the market. A lot of DC or AC powered sensor/devices which act as repeater do not have battery backup. In the event of power outage, the battery power the sensor automatically for this sensor.

I am still in the process of testing the power management and making adjustment. I will update again when I am close to have something to share.


That would be a nice enhancement. Your current sensor has already proved its worth as a repeater for Xiaomi devices in my setup; I have 5 Xiaomi buttons, 2 of which were connected directly to the hub and the remaining 3 were repeating through one of your sensors. Recently my hub was offline for several hours (it had locked up for reasons unknown) and it was long enough for the 2 Xiaomi buttons joined to the hub to drop offline and not reconnect when it was restarted. In contrast, the 3 devices using your sensor remained joined to the network (I made sure that all 5 were repeating through your sensor when I got them re-joined).

1 Like

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



Will these function without the battery attached, or is it a required component?

1 Like

Very good question. I forget to mention that it does not require battery to use the module. If the main power is down, it should be understood that the module will stop functioning without battery.

1 Like

I would be interested in getting 1 or 2 of the first variant.

@TonyFleisher, you can send me a PM.

I would also be interested in the first variant, and have some batteries I could use for testing too.

Here is the board ready to ship out. Some of them has already spoken for. PM me if you would like to try one.

1 Like

This is an SOS to any developers who can help with this DTH. The modules themselves are a piece of engineering ingenuity, @iharyadi is definitely a trail blazer and has done an amazing job with these modules. But as he says himself he’s not a developer, and the DTH is lacking, he user has no control of the information generated, i have thousands of 0’s and 1’s spamming my network that are of no use, the DTH really needs to work for me, rather than anything else. Simply, this DTH needs some love, it needs a selective Reporting Option and a Threshold Option, like the Aeon Multi and the Fibaro Motion Sensor, then these Environment Sensors would be perfect.
@ogiewon suggested “just add a call to configure() in the updated() method, save and publish. Then on your phone go into the settings (gear icon) for the device and click SAVE. This will call upated() which will then call configure(). Most DTH’s are written this way.”
Which would be fine if you have one module, but if you have 2, then you need to code 2 DTH’s and it gets messy, then what if you want to move a module somewhere to test something, you need to hack code each time?
I want to leave a module in the kitchen, but don’t want the humidity to be as sensitive as the one in laundry room.
i have capacitive soil sensor which works amazingly well, but it goes dry at 2.60volts, and i get an alert, but goes wet again in 5 seconds, because the numbers are so sensitive they bounce around, back and forth, if it had a 2% threshold, problem solved. the Aeon multi has a .2 decimal threshold for temp, as that also bounces around back and forth. But my heating doesn’t get turned on and off every few seconds.
Which reminds me, i’m using Celsius, but I’m not seeing decimals, so i unfortunately can’t use this sensor for my heating like i would like (because it’s much better than the Aeon), but it does show Temp decimals in the Live Logging.

11:51:32: info description is temperature: 22.31

I’ve tried looking at the code Temperature Sensor (Celcius with one decimal)

to change something but it’s beyond me
“input “tempOffset”, “decimal”, title: “Degrees”, "
" > def getTemperature(value) { > log.debug “Temperature raw: $value” > def celsius = Integer.parseInt(value, 16).shortValue() / 100 > > if(getTemperatureScale() == “C”){ > return Math.round(celsius) > } else { > return Math.round(celsiusToFahrenheit(celsius)) > } > }”

But i really can’t get my head around it.
If someone can point me in the direction of someone interested, clearly paid, in having a look at this DTH, and what it would involve to get it easily user configurable for EACH sensor from the DTH itself, not editing code on the fly, i’d be very grateful.

Hi @Alwas

I remember that we have a talk about the frequency of update the sensor is sending. I understand that you are looking to control the sensitivity of the sensor reporting. The sensor reporting is configurable at zigbee level. This is a valuable request and can be done. I just want to make sure that we are doing so correctly.

The sensor sensitivity is why I think a sensor like this would be useful. I have seen and been a user of some sensor on the other spectrum where it report only once a minute, day or even month. I am trying to avoid this. As a user, I prefer my sensor be sensitive and prompt on reporting changes. Battery powered sensor like Aeon Multi and the Fibaro Motion Sensor use battery where they have to restrict the reporting interval. We run on DC power. I suppose that we want to take advantage of it. In addition, We use probably the most sensitive sensor available BME280. It would be waste not to take advantage of it. I have tested multiple sensors (in the tens) with one ST router. The amount of data is reasonable with current reporting configuration. It is not causing any problems with the hub or flooding its zigbee network. Is there any reason to make the sensor less sensitive at DTH level?

I can see the sensitivity can be an issue for some scenario. Lets look at them and see what is the proper solution without dumb down the sensor. The scenario with with your capacitive soil sensor is a good one to look at. Working with analog sensors and translating them to do one or the other (Boolean action) will have the issue that you see. This is a well understood problem. We may want to add hysteresis in the logic for Water sensor. At simplest form, the hysteresis use two threshold values. A higher threshold value to set the sensor to wet. It is common to do this with analog sensor. Do you need help to modify the DTH for water sensor for this? I think if you make the sensor report less or less sensitive, you may still see the issue. It will be just rarer to see the flip between wet and dry.



When do you want to get the alert? I don’t think Changing sensitivity (how much change is required for a report) would have any impact on alerts based on absolute value thresholds.

Hi @iharyadi and @TonyFleisher, I don’t think I explained myself clearly. I don’t want to “dumb down” the sensor or make it less sensitive, i would like the user to have full control of the reporting thresholds, thereby in some cases making the module even more sensitive as the case may be.
You’ve set the reporting values as a happy medium, which is perfectly reasonable, but a user may want to expose more sensitivity from a particular sensor as they see fit, have a play, like using illuminance as a motion detector. As you mention below. At the moment it’s very hard (impossible unless you’re a coder) to change the reporting values, and it’s a shame the user can’t harness each sensors values to their own needs.

I have one of your superb modules in the garden, using illuminance to control lighting, which i’m very happy i got (considering $weather Underground will stop in a few weeks). But i have another sensor inside that i don’t want spamming my network unnecessarily. Same with the Pressure, 2 modules sitting next to each other spamming the same info. With regards the capacitive soil sensor, i get an alert at 2.6 volts, the problem is the sensor is SO sensitive, it jumps back to 2.59 becomes wet, the back to 2.6 dry, this can go on for an hour or more. How did Aeon solve this? i have a Aeon Multi plugged in to usb, using as thermostat, initially, it would reach 22.1 degrees, my heating would go off, it would jump back to 22, heating would come on, so i put a reporting threshold of .2 degrees, problem solved.
I have a sensor in the laundry room, and I would prefer to use your DTH but i took advice from another user further up this thread to use the SmartSense humidity temp sensor, just because of the noise/spamming. humidity jumping back and forth forth 44%43%44%43%44% why not have Humidity threshold “Threshold change in humidity to induce an automatic report”? And have a threshold report for each sensor, Illuminance,Pressure,Temperature,Humidity etc etc ,I think the user should be in control, and have the ability to play as they see fit. I’d love a big commercial company to take on and mass produce your modules, and the first thing they would do is make the DTH more user tunable/friendly. I’m not sure you’re able to do the changes, because I think you would of done this before, I’ll ask someone like ercom to have a look at it, and see if they can do a pull request.

P.S. Can you please at least update the code so I can see Degrees Celsius in decimals please like I can see in the Live Logging, e.g. 22.24 Degrees. at the moment all I see are decimals of 10, i.e. 22 Degrees, 23 Degrees. Thanks very much.

1 Like

I agreed with this issue is a concern. It is a concern when using analog value to decide between on/off or wet/dry regardless the sensor you use. Digital IO has this issue as well. An input voltage will fluctuate. It could go up and down a hundred mili volt easily. If you have only one threshold, the gpio may fluctuate to high and low. This is commonly solve by using hysteresis. In your example with temperature, temperature carry high momentum (in addition, a room retains heat). This masked the issue where the temperature cross the threshold rapidly. For temperature, the more common solution is to smooth the reading using filter. We already have that preference that you can set if you use temperature reading.

The moisture sensor, that you bought, is fluctuating. This is normal in electronic circuit as I mention above with gpio. Making the sensor less may help but may come with other side effect. Implementing hysteresis is probably better solution.

I did look at my logs for humidity. I do not have any issue for end user to be able to adjust the reporting configuration of their Zigbee Device. My sensor is DC powered. It should have no issue with different reading setup especially when you slow it down. I am concern whether I am spamming our user hub with my default configuration. I am happy you are bringing up the concern. Lets take a look at a real data of my humidity with existing configuration report.

|2018-12-05 6:27 AM PST - 33 minutes ago|humidity|38 %|%|
|2018-12-05 6:21 AM PST - 39 minutes ago|humidity|39 %|%|
|2018-12-05 6:17 AM PST - 43 minutes ago|humidity|38 %|%|
|2018-12-05 6:12 AM PST - 48 minutes ago|humidity|39 %|%|
|2018-12-05 6:09 AM PST - 51 minutes ago|humidity|38 %|%|
|2018-12-05 6:08 AM PST - 52 minutes ago|humidity|36 %|%|
|2018-12-05 6:08 AM PST - 52 minutes ago|humidity|37 %|%|
|2018-12-05 6:00 AM PST - 1 hour ago|humidity|36 %|%|
|2018-12-05 6:00 AM PST - 1 hour ago|humidity|37 %|%|
|2018-12-05 5:59 AM PST - 1 hour ago|humidity|36 %|%|
|2018-12-05 5:58 AM PST - 1 hour ago|humidity|37 %|%|
|2018-12-05 5:57 AM PST - 1 hour ago|humidity|36 %|%|
|2018-12-05 5:57 AM PST - 1 hour ago|humidity|37 %|%|
|2018-12-05 5:57 AM PST - 1 hour ago|humidity|36 %|%|
|2018-12-05 5:47 AM PST - 1 hour ago|humidity|37 %|%|
|2018-12-05 5:42 AM PST - 1 hour ago|humidity|38 %|%|
|2018-12-05 5:38 AM PST - 1 hour ago|humidity|39 %|%|
|2018-12-05 5:38 AM PST - 1 hour ago|humidity|40 %|%|
|2018-12-05 5:37 AM PST - 1 hour ago|humidity|41 %|%|
|2018-12-05 5:36 AM PST - 1 hour ago|humidity|40 %|%|
|2018-12-05 5:36 AM PST - 1 hour ago|humidity|39 %|%|
|2018-12-05 5:35 AM PST - 1 hour ago|humidity|40 %|%|
|2018-12-05 4:25 AM PST - 3 hours ago|humidity|41 %|%|
|2018-12-05 4:20 AM PST - 3 hours ago|humidity|42 %|%|
|2018-12-05 4:15 AM PST - 3 hours ago|humidity|41 %|%|
|2018-12-05 4:05 AM PST - 3 hours ago|humidity|42 %|%|
|2018-12-05 3:55 AM PST - 3 hours ago|humidity|41 %|%|
|2018-12-05 3:50 AM PST - 3 hours ago|humidity|42 %|%|
|2018-12-05 3:45 AM PST - 3 hours ago|humidity|41 %|%|
|2018-12-05 3:35 AM PST - 3 hours ago|humidity|42 %|%|
|2018-12-05 3:25 AM PST - 4 hours ago|humidity|41 %|%|
|2018-12-05 3:20 AM PST - 4 hours ago|humidity|42 %|%|
|2018-12-05 3:00 AM PST - 4 hours ago|humidity|41 %|%|
|2018-12-05 2:55 AM PST - 4 hours ago|humidity|42 %|%|
|2018-12-05 2:50 AM PST - 4 hours ago|humidity|41 %|%|
|2018-12-05 2:45 AM PST - 4 hours ago|humidity|42 %|%|
|2018-12-05 2:40 AM PST - 4 hours ago|humidity|41 %|%|
|2018-12-05 2:25 AM PST - 5 hours ago|humidity|42 %|%|
|2018-12-05 2:00 AM PST - 5 hours ago|humidity|41 %|%|
|2018-12-05 1:55 AM PST - 5 hours ago|humidity|42 %|%|
|2018-12-05 1:52 AM PST - 5 hours ago|humidity|41 %|%|
|2018-12-05 1:47 AM PST - 5 hours ago|humidity|42 %|%|
|2018-12-05 1:42 AM PST - 5 hours ago|humidity|41 %|%|
|2018-12-05 1:17 AM PST - 6 hours ago|humidity|42 %|%|
|2018-12-05 1:12 AM PST - 6 hours ago|humidity|41 %|%|

Between 1 AM to 5 AM, the sensor send changes about 5 minutes. This is when it hit the zigbee reporting max time period and the value change round up to 1 degree. By all mean, this is not spamming.

Then after 5 am. My heater goes on. Things get drier (humidity are changing). You can see the humidity start to go down faster than 5 minute interval. It is still not spamming the hub. I want to make sure that my default configuration in DTW do not cause issues for everyone.

As a bonus with this kind of data, one can probably push them to AI and do a lot of cool stuff. As human, I can interpret these kind data and correlate them to something else happen in my home.

I want to make sure that we are aware of this benefit. The BME280 is $7 a pop here. We want to expose the full advantage of it.

As a user, I fully agree with you that I want to have the freedom how I interpret the data. @Alwas, I can assure you that we can change the DTH to adjust the reporting. If this is something common for everyone, I will be happy to make changes for everyone in my github. If this is only for your consumption, I will be more than happy to help you or anyone helping you to make sure that you have the adjustment that you want in your IDE.

This is easy to do. Again, I can send the code to you for your private code in IDE.

Btw @Alwas, thanks for bringing this up. It is a good discussion. Lets see if the adjustment is more of your specific need or more of a global need. It is my own interest to make things better and a higher priority if this is a common need.


1 Like

@Alwas, I just looked at the code. The temperature display is not controlled by my code. ST parsed the value and round the value before display. I do not want to take over the parsing of the code with my own just because we want to see the 2 decimal value on the temperature. Perhaps, you can enter a suggestion to ST team for your request. Other driver may parse temperature manually where they can control the decimal value. ST has few attributes that it parse and display for us developer. Some other attributes are left to us to parse. For this attributes that we parse, changing the format is very easy.

How can we get these? I’m interested to use it as a repeater for Xiaomi devices and also as Temperature / Humidity sensor.
Please advise, and thank you very much for this great invention!

PM me, I can give you my paypal in PM. Please let me know where you would like to have the module shipped in the PM.