Conbee II sur raspberry Pi Zero 2W (succède à un Zero de première génération). Matériel Domotique actif.
Raspberry Pi 4 raspdomo, SMlight SLZB-MRW10
Raspberry PI 3B+ Homeassistant sur SonOff dongle E, flashed with multiprotocol firmware.
So far so good.
Raspberry Pi 5 (foreseen to replace raspdomo) sur clé SOnOff P, zigbee2mqtt.
NucPC G3 N150 proxmox LXC (Z2M) HA (ZHA) sur clé Dongle Banggood Clone SOnOff P (réserved). Le test du linux container n’est pas très satisfaisant (pas super stable).
When implementing the weather statio I realized that, unlike TCP/IP NTM, there was no zigbeenetwork time reference, so if one of the zigbee devices need to get the time, a kind of time server needs to be installed, as ZCL foresee an endpoint with the time as solution is possible.
From github article, I found out some methods for the time Cluster on End Point Devices (EP) . The source code is available here Example to be found (here)[https://github.com/AndroidCrypto/ESP32_C6_Zigbee_Coordinator/blob/main/Esp32_C6_Zigbee_ED_Time_Cluster_OLED_v05/Esp32_C6_Zigbee_ED_Time_Cluster_OLED_v05.ino]
// Set time
bool addTimeCluster(tm time = {}, int32_t gmt_offset = 0); // gmt offset in seconds
bool setTime(tm time);
bool setTimezone(int32_t gmt_offset);
// Get time from Coordinator or specific endpoint (blocking until response)
struct tm getTime(uint8_t endpoint = 1, int32_t short_addr = 0x0000, esp_zb_ieee_addr_t ieee_addr = {0});
int32_t getTimezone(uint8_t endpoint = 1, int32_t short_addr = 0x0000, esp_zb_ieee_addr_t ieee_addr = {0}); // gmt offset in seconds
So A time cluster can be added to a zigbee End-Point, for example a temperature sensor:
#define TEMP_SENSOR_ENDPOINT_NUMBER 10
ZigbeeTempSensor zbTempSensor = ZigbeeTempSensor(TEMP_SENSOR_ENDPOINT_NUMBER);
In the setup before zigbee.begin
// timeinfo is an initialized struct tm
struct tm timeinfo = {};
// initialize timeinfo structure January 13, 2025 13:30:30 CET
timeinfo.tm_year = 2025 - 1900; // = 2025
timeinfo.tm_mon = 0; // January
timeinfo.tm_mday = 13; // 13th
timeinfo.tm_hour = 12; // 12 hours - 1 hour (CET)
timeinfo.tm_min = 30; // 30 minutes
timeinfo.tm_sec = 30; // 30 seconds
timeinfo.tm_isdst = -1;
zbTempSensor.addTimeCluster(timeinfo, 3600); //bool addTimeCluster(tm time = {}, int32_t gmt_offset = 0); // gmt offset in seconds
// Set time
void addTimeCluster(tm time = {0}, int32_t gmt_offset = 0); // gmt offset in seconds
void setTime(tm time);
void setTimezone(int32_t gmt_offset);
// Get time from Coordinator or specific endpoint (blocking until response)
struct tm getTime(uint8_t endpoint = 1, int32_t short_addr = 0x0000, esp_zb_ieee_addr_t ieee_addr = {0});
int32_t getTimezone(uint8_t endpoint = 1, int32_t short_addr = 0x0000, esp_zb_ieee_addr_t ieee_addr = {0}); // gmt offset in seconds