Changes to the code reviewed in !484 (closed) and after dsm-api meeting (now the groupID bits are recreated by DSM so they are always the same).
I have also reworked the way the zoneID is computed for different groups for the same device (added Device::getGroupZoneID
).