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

[Question] MAC Address or Serial number possible? #21

Open
Tommatheussen opened this issue Jul 14, 2022 · 10 comments
Open

[Question] MAC Address or Serial number possible? #21

Tommatheussen opened this issue Jul 14, 2022 · 10 comments

Comments

@Tommatheussen
Copy link
Contributor

Tommatheussen commented Jul 14, 2022

Description

I was attempting to add unique IDs to the Home Assistant integration, which would allow configuration from the UI for the entities. The problem seems to be that multiple installations would conflict with their IDs. HA does not allow the use of IP addresses to set unique IDs.

I looked at the protocol, but it doesn't look like we can read the MAC address or serial number, do you know if this is perhaps readable from the ETHM-1 Plus module?

home-assistant/core#74699

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
@c-soft
Copy link
Owner

c-soft commented Jul 14, 2022

This is the API description that I was using while developing the lib (attached).

Unfortunately I can't see MAC or any other proper ID over there.

The only thing that could maybe help somehow would be 0xEE command: read device name. But it needs some playing around: most likely if you change the name of your alarm, the result will be changed...

int-rs_op_int_2020-03-05_4f512412.pdf

@c-soft
Copy link
Owner

c-soft commented Jul 14, 2022

Thinking about it more, the only idea I have is just get "ID" in the configuration.yaml - as described in "last resort" section of docs.

@Tommatheussen
Copy link
Contributor Author

Do you mean we could try to set a ID inside the configuration?
I also thought about migrating to use a config entry, then we could use that one to generate the ID.

@c-soft
Copy link
Owner

c-soft commented Jul 15, 2022

I haven't looked in HomeAssistant dev docs in detail, but quick look tells me that making change so the component accepts some form of "ID" in the configuration.yaml could do the trick. Its not perfect, but will get the job done I guess.
No changes in the library necessary, just HA tree.

@DanielTheCoder
Copy link

DanielTheCoder commented Jan 16, 2023

I think there should be a way to get the mac-address, it is shown in DLOADX.
Was not able to find the correct command via wireshark, I've created a ticket (Ticket ID: 325-58X5-GRN) at Satel asking how to get mac-address.

@pawelgarbacz
Copy link

Having an IP of Integra's ETHM you can resolve MAC address e.g. using this library "get-mac", can't you? Then it shouldn't be very difficult to generate unique IDs.

@DanielTheCoder
Copy link

DanielTheCoder commented Jan 16, 2023

get-mac should not be used by HA as described in the entity registry best practices here https://developers.home-assistant.io/docs/entity_registry_index/#example-acceptable-sources-for-a-unique-id

@pawelgarbacz
Copy link

Then another idea would be hash of IP+integration key - this should be guaranteed unique...

@DanielTheCoder
Copy link

got an answer for my ticket from satel, there is no support for getting the mac-address via the integration protocol, instead they mentioned to use arp command with -a to get the mac.
Not sure if this the way to go as it's like get-mac ...
Asked another question, if it's possible to get a unique id or serial number.
If this is also no option, we may have really to go with the last resort option as described in HA docs, keep you updated.

@DanielTheCoder
Copy link

update from my ticket, support talked to R&D.
They think about it, adding some kind of identification for one of the next firmware updates, but no eta given.

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