Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAC Adress instead IP #245

Open
mega-hz opened this issue Jan 31, 2024 · 6 comments
Open

MAC Adress instead IP #245

mega-hz opened this issue Jan 31, 2024 · 6 comments

Comments

@mega-hz
Copy link

mega-hz commented Jan 31, 2024

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.

@jhegewald
Copy link

jhegewald commented Jan 31, 2024 via email

@mega-hz
Copy link
Author

mega-hz commented Jan 31, 2024 via email

@mega-hz
Copy link
Author

mega-hz commented Feb 2, 2024

maybe HA can scan for the MAC-Adress and change it in secrets.yaml?

@mega-hz
Copy link
Author

mega-hz commented Feb 2, 2024

BTW: wird die secrets.yaml nur einmal eingelesen oder regelmäßig?

@mkaiser
Copy link
Owner

mkaiser commented Feb 11, 2024

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)

@Gnarfoz
Copy link

Gnarfoz commented May 14, 2024

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants