mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-13 05:46:30 +00:00
Zigbee improved message when coordinator failed to start (#23525)
* Zigbee improved message when coordinator failed to start * Faster fail
This commit is contained in:
parent
76a39f7597
commit
7c2eabcd94
@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Berry change number parser for json to reuse same parser as lexer (#23505)
|
||||
- Berry increase web hooks from 16 to 32 (#23507)
|
||||
- ESP32 LVGL library from v9.2.2 to v9.3.0 (#23518)
|
||||
- Zigbee improved message when coordinator failed to start
|
||||
|
||||
### Fixed
|
||||
- Haspmota `haspmota.parse()` page parsing (#23403)
|
||||
|
@ -269,7 +269,7 @@ ZBR(ZBS_WNV_ZNPHC, Z_SREQ | Z_SYS, SYS_OSAL_NV_WRITE, Z_B0(ZNP_HAS_CONFIGURED),
|
||||
// Z_ZDO:startupFromApp
|
||||
ZBM(ZBS_STARTUPFROMAPP, Z_SREQ | Z_ZDO, ZDO_STARTUP_FROM_APP, 100, 0 /* delay */) // 25406400
|
||||
ZBM(ZBR_STARTUPFROMAPP, Z_SRSP | Z_ZDO, ZDO_STARTUP_FROM_APP ) // 6540 + 01 for new network, 00 for exisitng network, 02 for error
|
||||
ZBM(AREQ_STARTUPFROMAPP, Z_AREQ | Z_ZDO, ZDO_STATE_CHANGE_IND ) // 45C00xx - state change
|
||||
ZBM(AREQ_STARTUPFROMAPP, Z_AREQ | Z_ZDO, ZDO_STATE_CHANGE_IND ) // 45C0xx - state change
|
||||
ZBM(AREQ_STARTUPFROMAPP_COORD, Z_AREQ | Z_ZDO, ZDO_STATE_CHANGE_IND, ZDO_DEV_ZB_COORD ) // 45C009 + 08 = starting, 09 = started
|
||||
ZBM(AREQ_STARTUPFROMAPP_ROUTER, Z_AREQ | Z_ZDO, ZDO_STATE_CHANGE_IND, ZDO_DEV_ROUTER ) // 45C009 + 02 = looking PanID, 07 = started
|
||||
ZBM(AREQ_STARTUPFROMAPP_DEVICE, Z_AREQ | Z_ZDO, ZDO_STATE_CHANGE_IND, ZDO_DEV_END_DEVICE ) // 45C009 + 02 = looking PanID, 06 = started
|
||||
|
@ -884,7 +884,6 @@ int32_t ZNP_DataConfirm(int32_t res, const SBuffer &buf) {
|
||||
int32_t ZNP_ReceiveStateChange(int32_t res, const SBuffer &buf) {
|
||||
uint8_t state = buf.get8(2);
|
||||
const char * msg = nullptr;
|
||||
|
||||
switch (state) {
|
||||
case ZDO_DEV_NWK_DISC: // 0x02
|
||||
msg = PSTR("Scanning Zigbee network");
|
||||
@ -908,6 +907,9 @@ int32_t ZNP_ReceiveStateChange(int32_t res, const SBuffer &buf) {
|
||||
case ZDO_DEV_NWK_ORPHAN: // 0x0A
|
||||
msg = PSTR("Device has lost its parent");
|
||||
break;
|
||||
case ZDO_DEV_HOLD:
|
||||
msg = PSTR("Failed to start in coordinator mode, try changing PanID");
|
||||
break;
|
||||
};
|
||||
|
||||
if (msg) {
|
||||
@ -921,6 +923,8 @@ int32_t ZNP_ReceiveStateChange(int32_t res, const SBuffer &buf) {
|
||||
|
||||
if ((ZDO_DEV_END_DEVICE == state) || (ZDO_DEV_ROUTER == state) || (ZDO_DEV_ZB_COORD == state)) {
|
||||
return 0; // device sucessfully started
|
||||
} else if (ZDO_DEV_HOLD == state) {
|
||||
return -2; // device failed to start, try changing PanID
|
||||
} else {
|
||||
return -1; // ignore
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user