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

Unique ID #5

Open
ronaldt80 opened this issue Apr 11, 2021 · 7 comments
Open

Unique ID #5

ronaldt80 opened this issue Apr 11, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@ronaldt80
Copy link
Contributor

George, any particular reason why you removed the unique id from this component? If not, mind if I launch a PR incorporating this once more?

@GeorgeSG
Copy link
Owner

GeorgeSG commented Apr 11, 2021

Yeah, I removed it because it was not working consistently. It depended on acquiring the Mac address of the device via the API. I don't know if it will even work over COAP.

People used to have issues adding multiple devices, which was also due to the unique_id implementation. This may have been a bug, but it was hard for me to debug it (no 2nd device), and I know the current approach w/o unique_id works.

If you want to change the entity id, you can set the name property.

If you can implement it in a stable way and verify that it works, I'm not against reintroducing unique_id.

@ronaldt80
Copy link
Contributor Author

ronaldt80 commented Apr 11, 2021 via email

@GeorgeSG
Copy link
Owner

I'm not sure about using random numbers. I think the guidelines are to use something tied to the device, and if the device has an IP, use the mac address.

There's a good discussion here.

Also, I see that betaboon's component uses their own custom python package. Please try implementing this via py-air-control, I'd like to stick to that if possible.

@GeorgeSG
Copy link
Owner

Also, I'm planning to convert this to config flow to be future proof.

@ronaldt80
Copy link
Contributor Author

Also, I see that betaboon's component uses their own custom python package. Please try implementing this via py-air-control, I'd like to stick to that if possible.

I tried the py-aircrtl implementation of COAP; it is flawed and does not work well with the newer machines. The purifier crashes as a consequence of the continuous polling by HA.

I made it working based on your component, using the COAP client instead of HTTP; behavior was erratic - device was turning unavailable after 20 seconds and reappearing after a minute or so. The pyairctrl output (CLI) is not much better.

There are quite some discussions on the HA community forum on this.

@GeorgeSG GeorgeSG added the enhancement New feature or request label Apr 15, 2021
@d4g
Copy link

d4g commented Jun 8, 2024

Is there any update on this?

@ronaldt80
Copy link
Contributor Author

Is there any update on this?

you can check my fork - I implemented the unique id based on Mac Address. Works fine for me. It's a requirement to have a unique ID to expose the purifier to voice assistants.

BTW - don't use my complete fork unless you have the AC3259; I hard coded the sleep mode specifically for the API of this model.

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

No branches or pull requests

3 participants