Closed frenck closed 4 years ago
A device has to be uniquely identifiable on the network, you have some ways to get it
As sonoff device uses the mDNS protocol to discover the device, without the mDNS, how do you find the device in the network?
hostname & IP addresses are not properties of the device and therefore not a unique identifier of the device. For example, I can log in to my router, and change the IP address & hostname via the DHCP configuration. In conclusion, it is not a device identification, but a network identification of the device, which is not what I requested.
The ID is the TXT record is only available via mDNS, which is not a reliable source for home automation in general, for several reasons:
In conclusion of the above, hostname & IP are not device identifiers but network properties. The device ID is currently only available via mDNS, which is not guaranteed to be available.
Hence, I'm looking for a reliable fallback method to obtain a unique device ID and thus request it to add a method to obtain it via the HTTP API.
As sonoff device uses the mDNS protocol to discover the device, without the mDNS, how do you find the device in the network?
Asking the user for it? We are talking about a DIY mode here, not about an app on a phone. A home automation platform can try to discover things on the network, but should also be able to accept manually configured devices by a user in case auto-discovery failed.
Hi Frenck,
the New DIY Mode has been released, the deviceid has been added in zeroconf/info.
Daniel
Great, that close this issue 👍
Currently, the
deviceid
is only published via mDNS, there is no way to get it via the API. Hence, without mDNS, there is no way to uniquely identify the device.This causes problems for platforms, like Home Assistant, to manage multiple devices on a single network. A device has to be uniquely identifiable on the network, even without mDNS.
Suggestion: Add
deviceid
to thezeroconf/info
response.