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

Balboa Spa creating duplicate entities #64101

Closed
jazzyisj opened this issue Jan 14, 2022 · 11 comments
Closed

Balboa Spa creating duplicate entities #64101

jazzyisj opened this issue Jan 14, 2022 · 11 comments

Comments

@jazzyisj
Copy link

The problem

The Balboa integration is creating duplicate entities for both climate and filters. I think it's happening when the Balboa controller is "offline" during a restart.

image

What version of Home Assistant Core has the issue?

v2012.12.9

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

Balboa Spa Client

Link to integration documentation on our website

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

Example YAML snippet

None.

Anything in the logs that might be useful for us?

Nothing unusual in log.

Additional information

No response

@probot-home-assistant
Copy link

balboa documentation
balboa source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @garbled1, mind taking a look at this issue as it has been labeled with an integration (balboa) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@garbled1
Copy link
Contributor

Are there any balboa log entries at all? I've not seen this happen with mine..

@jazzyisj
Copy link
Author

Yes, all kinds. I guess I should have posted them. I've got them filtered out of the log right now. I think most of them are related to when the Balboa controller is not online (because it cycles). Give me a day or two to leave the system running and I'll pick out all the log entries and post them.

@jazzyisj
Copy link
Author

I've been watching now for a few days and this has not happened again. I had to delete those unknown entities half a dozen times before I posted this issue... ugh. I'm wondering if maybe it had something to do with your custom balboa integration I had installed before the official one was released?

Anyway, closing for now. If it happens again I'll try to catch the log entries and I'll reopen it.

@jazzyisj
Copy link
Author

jazzyisj commented Jan 30, 2022

Sorry, I had to reopen this issue. Happened again. I had both pybalboa.balboa and homeassistant.components.balboa.const set do debug this time though.

2022-01-30 16:19:27 DEBUG (MainThread) [homeassistant.components.balboa.const] Attempting to connect to 192.168.1.125
...
2022-01-30 16:34:36 DEBUG (MainThread) [homeassistant.components.balboa.const] Attempting to connect to 192.168.1.125
2022-01-30 16:47:05 DEBUG (MainThread) [homeassistant.components.balboa.const] Attempting to connect to 192.168.1.125
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e050abf04777e
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e080abf22000001587e
2022-01-30 16:47:05 DEBUG (MainThread) [homeassistant.components.balboa.const] Starting listener and monitor tasks
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e050abf04777e
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e080abf22000001587e
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e080abf22020000897e
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e080abf22040000f47e
2022-01-30 16:47:05 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e080abf22010000347e
2022-01-30 16:47:06 DEBUG (MainThread) [homeassistant.components.balboa.const] Primary update callback triggered
2022-01-30 16:47:07 DEBUG (MainThread) [homeassistant.components.balboa.const] Setting up daily time sync
2022-01-30 16:47:07 DEBUG (MainThread) [homeassistant.components.balboa.const] Syncing time with Home Assistant
2022-01-30 16:47:07 DEBUG (MainThread) [pybalboa.balboa] Sending message: 7e070abf21102faa7e
2022-01-30 16:47:07 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.balboa
2022-01-30 16:47:07 INFO (MainThread) [homeassistant.components.climate] Setting up climate.balboa
2022-01-30 16:47:07 DEBUG (MainThread) [homeassistant.components.balboa.const] Primary update callback triggered

2022-01-30 16:47:07 DEBUG (MainThread) [homeassistant.components.balboa.const] Primary update callback triggered
...
2022-01-30 16:42:55 DEBUG (MainThread) [homeassistant.components.balboa.const] Attempting to connect to 192.168.1.125

image

@jazzyisj jazzyisj reopened this Jan 30, 2022
@jazzyisj
Copy link
Author

Just an update as of v2022.4.1 - this is still happening. It even occasionally creates another set of entities as well as the unknown ones. Absolutely nothing in the logs other than what I've previously posted.

Again, I believe it happens when HA restarts and the Balboa WIFI controller is in the 'disconnected' state, but not always. I've tried to trouble shoot it by turning the tub off and it doesn't always happen.

filtererror

climateerror

@natekspencer
Copy link
Contributor

This appears to happen because the model name is set via a different message than the mac address, but the integration doesn't wait for resolution of the model name before proceeding to create the entities. So most of the time the model message is received in time and gets configured correctly, but occasionally it gets missed and results in an "Unknown" device getting created.

See https://github.com/garbled1/pybalboa/blob/master/pybalboa/balboa.py#L525, https://github.com/garbled1/pybalboa/blob/master/pybalboa/balboa.py#L881 and https://github.com/home-assistant/core/blob/dev/homeassistant/components/balboa/__init__.py#L56

@jazzyisj
Copy link
Author

@natekspencer Thanks for hunting that down! Hopefully it will help resolve the issue (if it can be).

I've since switched back to the custom component because my control panel on the tub died and I needed the entities that are not supported by the built in yet (pump switches, light switch). Interesting to note that the duplicate entity issue has never happened with the custom component.

@garbled1 - If you decided to look into this I'm more than happy to switch back to the built in to test/provide data if it will help.

@jazzyisj
Copy link
Author

jazzyisj commented May 31, 2022

I think this PR may have fixed this issue. I saw the PR in the beta release notes so I reinstalled the core integration to test and so far so good.
#71909

@jazzyisj
Copy link
Author

jazzyisj commented Jun 2, 2022

Been monitoring for several days, v2022.6.0 and no issues. Closing.

@jazzyisj jazzyisj closed this as completed Jun 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants