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

By default zigbee has this command. This is not something that you call often. You can call it during the configure method.

zigbee.configureReporting(ILLUMINANCE_CLUSTER_ID(), SENSOR_VALUE_ATTRIBUTE(), DataType.UINT16, 15, 300, 300)

That last “300” is the threshold that you want. This tell the sensor not to send any report if the value change less than 300. You can apply them to others (temp, humidity, pressure). You can experiment with different value there.

Please excuse my ignorance.
I found the line 440 in your code to change, I changed the second 300 value to 1000 for test purposes, saved, and “publish for me”. But I don’t see any change. I pressed the refresh tile, and also power cycled the module, is there something specific I need to do to configure these parameters? Like delete the device from ST and re-add it maybe?

The code is in configure method. This method is only called once during configuration.

If you like to remove and re-add the module, that method will be called again.

You can also move the code to refresh method temporarily like I mentioned before for the illumination. Then, run the refresh method.

FYI, Configure method should not be called very often. The module will write the setting to flash storage. This flash storage will last a life time. However, all bet are off if you calling the configurereporting regularly through refresh method. This is why configure method is the best place to do it. Perhaps, if you like, you can call them in update method. I suppose update will be called less regularly.

The current version of expandable board is missing marking for the pins. Future board will have them marked.

Meanwhile, for those who will receive them in the coming days, you can go by the following.

DO = Digital Output pin. You can drive relay and etc.
DI = Digital Input pin. It is a tri-state input. if you are connecting to a switch (device that leave the pin float on one of the state), please use pull up resistor.
AI = Analog Input pin.

They can only tolerate 3.3v level circuit. They cannot tolerate 5v . I heard that they can easily break when they are over voltage. Please be careful. If you have any questions on how to connect 5V sensor, feel free to ask. Just a warning. I am more of a software developer these days. I was train a life time ago as electrical engineer. Some of the things can be over my head by this time. In any case, post or send me PM if you like. Hopefully, other member can help out on the electrical connection side.

You do have access to 3.3v and 5v power to power your sensors.

I am going to publish the DH soon. If you see board like below, I would recommend to use a new DH that I will publish soon. It is called EnvironmentSensorEX .

@Alwas 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.

1 Like

unfortunately i couldn’t use the method @ogiewon suggested, which would of been easiest, as i don’t know what the values mean and where to put them. Thus i’m still having a hard time trying to personalise the parameters. I appreciate this isn’t a commercially available product and it’s USB powered, but my only experience is with the Aeon multi’s and Fibaro sensors where you can enable selective reporting, and change frequency of reporting and the percentage, unit amount etc
in the “def configure() {
state.remove(“tempCelcius”)
log.debug “Configuring Reporting and Bindings.””
I changed some values,
Temp from 100 to 300
Humidity from 100 to 300
Pressure from 1 to 2
Illuminance from 100 to 1000

But i have no idea what these values mean, like Humidity from 100 to 300?
Or temp 100?

So i’m left with this…
def configure() {
state.remove(“tempCelcius”)
log.debug “Configuring Reporting and Bindings.”
List cmds = zigbee.temperatureConfig(5,300)
cmds = cmds + zigbee.configureReporting(HUMIDITY_CLUSTER_ID(), SENSOR_VALUE_ATTRIBUTE(), DataType.UINT16, 5, 300, 300)
cmds = cmds + zigbee.configureReporting(PRESSURE_CLUSTER_ID(), SENSOR_VALUE_ATTRIBUTE(), DataType.UINT16, 5, 300, 2)
cmds = cmds + zigbee.configureReporting(ILLUMINANCE_CLUSTER_ID(), SENSOR_VALUE_ATTRIBUTE(), DataType.UINT16, 15, 300, 1000)
cmds = cmds + refresh();
return cmds
Saved and published, deleted module and re-added it, but i’m still seeing for example illuminance jumping back and forth between 0.11 and 0.01 every few minutes, and humidity jumping by 1%, whereas for this particular sensor a change of 2 or 3% would suffice. Should this be obvious to me? or do i need a coder to do it?

The last three values represent the following.

First, maximum rate in seconds that data will be transferred to ST. (I.e. no matter how fast the sensor data changes, it will not be sent to ST faster than this rate.)

Second, minimum rate in seconds that data will be transferred (I.e. even if the value does not change, it will still be sent at this rate.)

Third, the amount the value must change before being sent to ST. (Note: See exception above.)

1 Like

Thanks to @ogiewon

Specific to this DHT, 300 says that you will get report regardless there is any changes every 300 seconds. You can make this huge value like 0xFFFE. Do not set this value to 0xFFFF. This will stop the reporting for that attribute.

These are more specific to the type of the attribute. Please take a look at Zigbee Cluster Library. I do not have all the information in my head. But, lets take on the temperature.

4.4.2.2.1.1 MeasuredValue Attribute
MeasuredValue = 100 x temperature in degrees Celsius.

This meant that Zigbee reporting temperature with resolution up to 2 decimal. So a value of 100 say 1 degree difference will be reported. A value of 1000 will report changes only when 10 degree of change. I think these two are some sort extreme value that you want to use.

You have to take a look for the other values (humidity and etc).

1 Like

BTW, for configurereporting, please see

2.5.7.1 Configure Reporting Command Frame Format

However, I like @ogiewon description. I read the 2.5.7.1 for about a month before I got some kind of right direction about the meaning of the parameters.

Could you add some more settings to your DTH? For Temperature threshold, Humidity threshold and Luminance threshold, I’d be willing to make a donation, and i’m sure others would benefit too.

I personally think this is not something a user tune-able setting. A developer may want to tune this parameter for their own application.

Is there any concern regarding the current setting other than the value are reporting rather promptly? If I can understand your concern, I will be open to consider this feature. ST should be able to handle the traffic with the current setting. I am running multiple sensors at home. ST hub take all the ZIgbee traffic from the module without skipping a beat. Do you observe the traffic from the sensor impact other sensor ability to send data? I am interested on this kind of information. I am testing them my self at my environment. With the current reporting parameter, the amount of data is not even showing in the radar.

If it is rather cosmetic, let me look for another solution for you rather than tuning the Zigbee reporting.

1 Like

Hi Everyone,

I did not expect that USPS work so fast. Some of you may already received the module with the new board like in post #223.

If you have one of those board, please use this driver.

I have example driver for child devices should you be using your expansion sensor.

They are mq9, switch, contact-sensor and motion-sensor. They are just example. If you need more child device handler, please contact me. The document is lagging. There is not much of it. If I can preemptively post those information I will do so. Otherwise, please do ask question if you need to write your own DTH.

Here is what I have left. I am down to one, perhaps a couple module left on this batch. I am back working on adding features or improving the module. I really appreciate everyone support on this project.

The two Extended Range module is available if you anyone would like to try them.

Thanks
Iman

I’m interested in these

I have a couple left at most. PM me with your radio preference.

The Extended Range radio is the same module except with additional amplifier chip. The normal radio do not have the amplifier chip. Other than that, they function 100% the same.

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

Thanks
Iman

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.

2 Likes

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