RobertD502 / home-assistant-iocare

Home Assistant custom component for monitoring and controlling Coway Airmega Purifiers
MIT License
50 stars 8 forks source link

Addon v0.4.0 fails to start due to "Coway API error: Coway server failed to return purifier MCU version." #39

Closed pcmoore closed 5 months ago

pcmoore commented 5 months ago

See the subject line for the error displayed in the tool-tip. Restarting HA, reloading the addon, and rebooting the HA host system did not have any effect. Oddly, downgrading to release v0.3.3, which had been working previously, had no effect, the error persists and my installation remains in a failed/broken state.

Additional HA information: HA core: 2024.4.4 HA supervisor: 2024.04.0 HA OS: 12.2 HA frontend: 20240404.2

Additional Coway information: Airmega 400s (no version info visible in app) Airmega 400s (MCU and WiFi version info visible in app) Airmega 250s (MCU and WiFi version info visible in app)

If you need any additional information please let me know and I'll do my best to get you what you need. Thanks for all your work on this HA addon!

pcmoore commented 5 months ago

Some additional troubleshooting info ...

After the downgrade to v0.3.3 I re-upgraded back to 0.4.0, removed the addon from my integrations, re-added the integration and the error continued.

Any help you can provide would be appreciated.

npawelek commented 5 months ago

Also running into this issue after the upgrade to v0.4.0. Running an Airmega 300s (No MCU info visible) and 400s (MCU info visible).

RobertD502 commented 5 months ago

Given that it is happening in both the old version and the new one, it stems from yet another configuration change that they have made to their API.

The reason this is happening is because the MCU version endpoint is now returning this error: '해당 회원이 등록하지 않은 기기 입니다.' In English: This device has not been registered by the member. The error isn't correct. Hold tight while I implement a fix.

RobertD502 commented 5 months ago

Since none of my devices have an MCU version, the app doesn't even attempt to hit the new MCU endpoint. Hopefully the user that shared their account info with me for the last fix will be able to do so again so that I can grab the new MCU endpoint. In the meantime, if anyone else is open to helping you can reach out to me on Discord (@RobertD502).

Edit: This is specifically for anyone that has a device or devices on their account with MCU versions. Those that don't have such devices on their account will also not be able to hit said endpoint.

pcmoore commented 5 months ago

I'm not on Discord presently and don't have the cycles at the moment to establish an account there and go through all the hoops, but if there is anything other debug info you need please let me know and I'll try to help.

RobertD502 commented 5 months ago

I'm not on Discord presently and don't have the cycles at the moment to establish an account there and go through all the hoops, but if there is anything other debug info you need please let me know and I'll try to help.

Unfortunately, debugging won't reveal what the new endpoint is (I have to MITM the app itself). If you don't have a discord account, you can also reach out to me by email at githubpurrsong at gmail .com (It's an email I use for support on another integration). Discord or email works....just needs to be in a non-public setting since credentials are involved.

RobertD502 commented 5 months ago

0.4.1 has been released which fixes the issue. Although the issue was caused by the MCU endpoint, I went ahead and updated all other endpoints that are used to fetch data about purifiers to use the new API endpoints.

Thank you to user Aardvark for giving me temp access to their account to fix this issue!

pcmoore commented 5 months ago

A quick note to confirm that it is working on my system too - thank you to all involved!