working micropython code for a Xbee 3 zigbee unit to interact with z2m and behave mostly as a barrier control device. Credit to https://github.com/jimmo for this python-zcl work that helped simplify decoding the zcl structure. https://github.com/jimmo/python-zcl