zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Optimize firmwares for larger networks

Open Koenkk opened this issue 8 years ago β€’ 45 comments

According to http://www.ti.com/lit/an/swra427c/swra427c.pdf (4 Z-Stack Knobs) there are a few parameters which can be tuned to improve the stability of larger networks.

I found MAX_RTG_SRC_ENTRIES the most interesting one. This parameter determines how much routes are saved. By default it only saves 12 routers, that means if having more than 12 devices, the coordinator has to rediscover routers to devices using the AODV mechanism.

@ptvoinfo @kirovilya I think some of the parameters can also be used to optimize the router firmwares.

Koenkk avatar Oct 24 '18 19:10 Koenkk

For those wanting to test the new firmware: https://drive.google.com/open?id=1xcGP5tGBBeAaU8VNQG7BiE70H2Bty5pe

I've currently migrated my production zigbee network to this firmware.

First impression: bulbs respond better

Note: advised to be used with the latest dev branch.

Koenkk avatar Oct 25 '18 18:10 Koenkk

@Koenkk What do you think it optimizes? Allows you to add more routers?

ptvoinfo avatar Oct 26 '18 04:10 ptvoinfo

The coordinator can now keep more paths to other devices, which avoid rediscovery of paths.

Koenkk avatar Oct 26 '18 06:10 Koenkk

@Koenkk would you be able to provide a cc2530+cc2591 firmware with hardware flow control disabled please ? :-) In the mean time, it might be the time I start compiling my own firmware :-)

lolorc avatar Oct 26 '18 13:10 lolorc

@lolorc Yes please do!

I think many users have raised issues with cc2531's short range, and cc2530 + cc2591 looks like a nice cost effective replacement. But for us non-technical people, we really need a good tutorial (covering the right equipment and firmware) like the one for the cc2531.

HKC001 avatar Oct 28 '18 02:10 HKC001

Just pushed the instructions to https://github.com/Koenkk/Z-Stack-firmware/tree/optimize/coordinator/CC2531. Will try this week if I can also compile it for CC2530+CC2591.

Koenkk avatar Oct 28 '18 11:10 Koenkk

@HKC001 will try, but I'm not a windows user, I wish this could compiled on linux with a "free" compiler

lolorc avatar Oct 29 '18 11:10 lolorc

for people who don't have a debugger, i compiled a .bin that works with TI's SerialBootTool.

See comment here: https://github.com/Koenkk/zigbee2mqtt/issues/543#issuecomment-433951590

Chrischi- avatar Oct 29 '18 15:10 Chrischi-

Please compile cc2530 (w/o cc2591) firmware too.

layanto avatar Oct 30 '18 01:10 layanto

Is the max number of ZigBee end devices without any router still 15 with this firmware?

layanto avatar Oct 30 '18 01:10 layanto

@layanto the number has been increased to 20

Koenkk avatar Oct 30 '18 13:10 Koenkk

#Koenkk when you migrate your network, do you have a method for backup / restore of devices or are you manually repairing everything?

ben423423n32j14e avatar Oct 30 '18 19:10 ben423423n32j14e

@ben423423n32j14e you have to manually pair it again.

Koenkk avatar Oct 30 '18 20:10 Koenkk

@lolorc the CC2530_CC2591 is up: https://github.com/Koenkk/Z-Stack-firmware/tree/optimize/coordinator/CC2530_CC2591

Koenkk avatar Oct 30 '18 20:10 Koenkk

@Koenkk Could you please update the simple CC2530, too?

cbu99 avatar Oct 31 '18 07:10 cbu99

Is there a chance that this optimization will remedy the occasional error 205 (No network route) on some bulbs? Network with 32 devices, mostly routers (TrΓ₯dfri-bulbs).

Skeletorjus avatar Nov 01 '18 10:11 Skeletorjus

@Skeletorjus yes

Koenkk avatar Nov 01 '18 11:11 Koenkk

Requesting that @ptvoinfo consider if this will enhance his very useful CC2531 Router firmware and update if necessary. :)

HKC001 avatar Nov 01 '18 12:11 HKC001

This is great work but isn't there Z-Stack 3 in progress which supports even more devices?

ben423423n32j14e avatar Nov 01 '18 13:11 ben423423n32j14e

@Koenkk The document in the first message says that MAX_RTG_SRC_ENTRIES is related to concentrators (coordinators). Do you think it may help on routers too? What value do you use in your firmware?

ptvoinfo avatar Nov 01 '18 13:11 ptvoinfo