See https://github.com/1technophile/OpenMQTTGateway/blob/8537b7498d887da910733da1818720361b585b25/main/ZcommonRF.ino#L208