niemyjski / homeassistant-kohler

Kohler Integration for Home Assistant
Apache License 2.0
14 stars 3 forks source link

Add auto discovery support #10

Open niemyjski opened 2 years ago

dcmeglio commented 1 year ago

Had you put any thought into this yet? As far as I can tell all we could do would be DHCP discovery based on the MAC address. However, that would just tell us it's a Kohler device, nothing more, so it could be any device they make. Could be anything. Doesn't seem the device to use mDNS or SSDP, so I was curious how you planned to autodiscover?

niemyjski commented 1 year ago

I haven't really had a chance to look at discovery. But, if we know it's a Kohler device, we can hit port 80 via the py lib I created and try to get stats/settings. If it's there we know we can add a shower at least. If we detect other Kohler devices, we could eventually prompt or know we need to configure a cloud integration.

On a side note, please feel free to reach out to me via email on my github profile, would be nice to chat on discord if you have it :).

dcmeglio commented 1 year ago

I haven't yet found a way to run code in the auto discovery. So it looks like it just does a MAC filter and, if matched, will say "found a Kohler device." I agree if there is a way to connect to port 80 we could do some magic but I haven't found a way to do that. Autodiscovery looks like it's just controlled by some config in the manifest. https://developers.home-assistant.io/docs/creating_integration_manifest/#dhcp if there's any way to do it though that would definitely work!