MAC Adress instead IP
mega-hz opened this issue · comments
Hi Martin,
can you manage it one can use instead of IP-Adress of ModbusTCP to use the MAC Adress?
In secrets.yaml ?
The reason i recommend this :
When Fritzbox DHCP give new IP Adresses to some Devices and Sungrow becomes a different one,
the whole Integration won't work anymore.
Another option could be to let search for AC:19:9F:::** so it would find it itself?
regards,
Wolfram.
maybe HA can scan for the MAC-Adress and change it in secrets.yaml?
BTW: wird die secrets.yaml nur einmal eingelesen oder regelmäßig?
hi,
the YAML is only parsed on HA startup (or if you select the restart option to only parse yaml).
The modbus integration does not support devices by mac address. So unfortunately, there is no way to make the MAC <> IP mapping by Home assistant.
For finding devices in my network, I often use the freeware "Zenmap" (a GUI for nmap)
A MAC address is not a replacement for an IP address, they work on different levels of the networking stack.
Scanning for MAC addresses, resolving them (ARP), and using the result could work, but only on the same network segment.
That would be far beyond the scope of a YAML-configuration-based integration like this and would require quite a bit of extra logic.
If your router does not offer an option to always assign the same IP address to a device (odd, haven't heard of Fritz!Box models that don't have this option), you can go the other way:
Configure your inverter to use a static IP address instead of DHCP.
I think the way to do that is to connect to the local WiFi hotspot the WiNet-S dongle provides, log into the interface there (admin / pw8888) and change the inverter's network configuration to a fixed address.
Ideally, make sure this address is outside of the IP range the router uses for DHCP. You can change that range on Fritz!Boxes.
(Also: maybe that particular Fritz!Box is on an older Fritz!OS version and you first need to activate the advanced mode in the UI? I'm not sure if that particular setting is hidden behind that mode. Maybe check the vendor documentation.)