Open MindrustUK opened 3 weeks ago
@MindrustUK the websocket api returns a device id in the response wrapper which is the mac address of the hub. It's not the serial number, but it's perfectly valid to use as the unique key for the hub.
You could have something that only allows multiple hubs if using the websocket api. Or if adding a second hub the user is prompted to add an identifier (or use the config entry id which is suggested as a last resort)
I forgot to say that to get the mac address from the websocket response, there would need to be a change in the API
@ocrease Great suggestion! MAC addresses are indeed (or at least supposed to be) unique, this would be great. I'm thinking maybe there's a case to do some ARP cache resolution to resolve the MAC address in the use case that the websocket API isn't used. Equally as suggested this really only comes into play with multiple hubs... it feels wrong to not have this by default, but maybe I'm just obsessing over something ultimately of little value. :thinking:
At present it appears that the Heatmiser API does not report the Hub's serial number in anyway, this feature has been requested here: https://dev.heatmiser.com/t/no-method-to-retrive-serial-nubmer-for-neohub-in-api/1298
In the absence of this feature, there should be a configuration step during the initial config flow / integration setup that prompts the user for a serial number, with an explanation of what it does, being that this is surfaced in the device info as a useful bit of information, but more importantly it plays a critical role in determining unique device ID's.