core: Obihai integration states "Invalid credentials", but credentials are correct and sensors are updating

The problem

System logs are flooded with “Invalid credentials” errors, however everything about integration appears to be working. I can verify that:

  1. I’ve enabled the local admin password for my Obi200, and gave it a new password
  2. I can login locally to the webpage via IP with the “admin” credentials and new password
  3. I’ve added the integration via the UI, using the local IP (I’ve only ever used the new UI integration; never the YAML config)
  4. The integration appears to be working, as all sensors are updating properly and as expected.

What version of Home Assistant Core has the issue?

core-2023.4.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

obihai

Link to integration documentation on our website

https://www.home-assistant.io/integrations/obihai

Diagnostics information

home-assistant_obihai_2023-04-19T11-40-17.870Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: pyobihai
Source: components/obihai/sensor.py:161
First occurred: 7:29:58 AM (48 occurrences)
Last logged: 7:39:46 AM

Invalid credentials

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 18 (7 by maintainers)

Most upvoted comments

I initially was using “host” value, but have since deleted it and switched to IP address, and have rebooted both the HA and the Obihai (all before posting the logs). And the log I posted earlier was just a quick debug. Since I posted that latest screenshot, there haven’t been any errors. I think they show up every time it’s reloaded, or I do any upgrades or reboot my HA instance.

OK, good info, and glad it’s working even if only a little bit better… Currently during reload/restarts we run a few extra authentication queries, I’m trying to get some of this cleaned up in a future release. I’m going to leave this bug open, we’ll check back after those changes get merged/released. I think it’s possible we’re just overwhelming your Obihai, and the current query rate is right on the edge of the tolerance. Hopefully reusing the authentication tokens in future releases will eliminate this error message for you.

Do let us know if the behavior changes in any way though.