pvvx / ZigbeeTLc

Custom firmware for Zigbee 3.0 IoT devices on the TLSR825x chip
Other
321 stars 15 forks source link

increasing reporting frequency #80

Closed TomW1605 closed 3 months ago

TomW1605 commented 3 months ago

Hi, is there a way to increase how often the LYWSD03MMC reports temp and humidity? i want to use it in an AC control automation but it updates way too slowly for that to be practical. i understand this will increase battery usage but its just not useful to me as it is now so if we could get that as an option it would be great

pvvx commented 3 months ago

For the Zigbee version there is no such option without changing the program. For BLE, configurable up to 62.5 ms.

TomW1605 commented 3 months ago

if i was to compile the firmware myself could i change this value? or is it a significant change?

pvvx commented 3 months ago

Zigbee uses quarter second transaction steps. That is, if 3 reports were triggered, it takes 3*0.25 seconds to transmit them.

Min:

define READ_SENSOR_TIMER_SEC 1

https://github.com/pvvx/ZigbeeTLc/blob/master/src/app_cfg.h#L85

define DEFAULT_POLL_RATE (READ_SENSOR_TIMER_SEC (4 POLL_RATE_QUARTERSECONDS))

https://github.com/pvvx/ZigbeeTLc/blob/master/src/app_cfg.h#L139 if(rep_uptime_sec >= READ_SENSOR_TIMER_SEC) { https://github.com/pvvx/ZigbeeTLc/blob/master/src/device.c#L273

The Reporting "min interval" settings should be set to 0 sec.

As a result, the coordinator will not have time to receive other devices, the signal from which will be weaker. There will be a limitation on the number of devices processed. Who will displace whom :) Moreover, the total flow, including headers, is usually limited by the UART bus to the Zigbee coordinator chip. Zigbee is a very slow and energy-intensive protocol. Requires at least 8 times more energy and time to transmit the same information compared to BLE.

Since the coordinator may not have time to respond to everyone at such an intensity, the devices will make re-requests. This will increase everyone's consumption. For a thermometer, the average consumption can reach 10 mA. This is up to 10 hours CR2032.

TomW1605 commented 3 months ago

thanks for the info, i dont really need the screen in this room so i might just swap things around.