I've made some changes lately and now I consider it to be production ready.
It was working before, but it could have some latency issues, because all sensors are checked in a loop and 2 of them had long sleep periods (1 second for illuminance reading!!!).
BME680 and TSL2591 were changed to work without any sleep.
Memory footprint has also been improved.
One of the things I like a lot about this framework it that for numeric sensor readings you can reduce or increase the amount of reported values to your liking, avoiding too many or too few reports.
Here is an example:
In this case I'm telling it to report only when the illuminance reading changes 10% or more (compared to the previous report).
It will report at most 1 reading per second, if trigger condition is met, and at least 1 reading per hour (3600s), even if the trigger condition is not met.
When the settings are saved, the configuration is sent to the XBee, so it calculates on the XBee side the triggers.
I plan to share more details of the hardware part as well, but as I said, my time is limited for a while.
For now, here is a picture of my testing table.
And some sample HE logs of an XBee starting:
dev:635 info Status: Restroom Air Quality: 55
dev:636 info Status: Restroom Lux: 66.52
dev:636 info Status: Restroom Lux: 20.05
dev:636 info Status: Restroom Lux: 9.90
dev:635 info Status: Restroom Air Quality: 51
dev:635 info Status: Restroom Air Quality: 42
dev:642 info Device info: Endpoint 9 configured, can now start reporting
dev:636 info Status: Restroom Lux: 65.75
dev:636 info Device info: Endpoint 8 configured, can now start reporting
dev:635 info Status: Restroom Air Quality: 56
dev:635 info Device info: Endpoint 7 configured, can now start reporting
dev:633 info Status: Restroom Humidity: 73.42
dev:633 info Device info: Endpoint 5 configured, can now start reporting
dev:632 info Status: Restroom Temperature: 25.74
dev:632 info Device info: Endpoint 4 configured, can now start reporting
dev:620 info Status: XB3 Restroom: 2.96
dev:620 info Device info: Endpoint 1 configured, can now start reporting
dev:642 info Status: Restroom Proximity: not present
dev:642 info << EP 09 sending 2: {"TO":1,"DI":300}
dev:642 info Configure...
dev:642 info Device request: Send me my config
dev:642 info Device on endpoint 9 started
dev:636 info << EP 08 sending 2: {"OF":0.0,"MI":1,"MA":3600,"AM":10.0,"FI":false}
dev:636 info Configure...
dev:636 info Device on endpoint 8 started
dev:636 info Device request: Send me my config
dev:635 info << EP 07 sending 2: {"OF":0.0,"MI":60,"MA":3600,"AM":5.0,"FI":false}
dev:635 info Configure...
dev:635 info Device request: Send me my config
dev:635 info Device on endpoint 7 started
dev:633 info << EP 05 sending 2: {"OF":0.0,"MI":60,"MA":3600,"AM":1.0,"FI":true}
dev:633 info Configure...
dev:633 info Device request: Send me my config
dev:633 info Device on endpoint 5 started
dev:632 info << EP 04 sending 2: {"OF":0.0,"MI":1,"MA":3600,"AM":0.25,"FI":true,"SC":"C"}
dev:632 info Configure...
dev:632 info Device request: Send me my config
dev:632 info Device on endpoint 4 started
dev:620 info << EP 01 sending 2: {"OF":0.0,"MI":1200,"MA":3600,"AM":0.1,"FI":true,"NA":"XB3 Restroom"}
dev:620 info Configure...
dev:620 info Device request: Send me my config
dev:620 info Device replied: Bluetooth on
dev:620 info Device on endpoint 1 started