Open ronaldt80 opened 3 years ago
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.
I raised the issue initially on the original implementation. Your former development branch however solved my issues and works with 2 machines. I have had it run consistently for almost a year. Does indeed not work with coap though but betaboon has found a different solution, will try to reverse engineer this. Otherwise perhaps use a random number generator instead? Or link it to the last digits of the IP address?
On Sun, 11 Apr 2021, 11:55 Georgi Gardev, @.***> wrote:
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 work.
If you want to change the entity id, you can set the name property.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GeorgeSG/ha-philips-airpurifier/issues/5#issuecomment-817280716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXEM3A3F6WSTKVWDQOGHMDTIFW2XANCNFSM42XNRMHQ .
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.
Also, I'm planning to convert this to config flow to be future proof.
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.
Is there any update on this?
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?