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

Groups becomes unavailable on HA. #18360

Closed
antibill51 opened this issue Jul 19, 2023 · 5 comments
Closed

Groups becomes unavailable on HA. #18360

antibill51 opened this issue Jul 19, 2023 · 5 comments
Labels
problem Something isn't working stale Stale issues

Comments

@antibill51
Copy link

What happened?

I have a similar problem than#9629 but only concerns groups.
Sometimes groups become unavailable on the HA side.

optimistic: true/false
retain: true/false
in groups.yaml don't change anything.

Home Assistant 2023.7.2
Supervisor 2023.07.1
Operating System 10.3

Z2M 1.32.1-dev

What did you expect to happen?

When restarting Z2M or HA, the discovery message should be sent for groups as well, not just for individual entities.

How to reproduce it (minimal and precise)

create a group (of lights for example).
It is logically visible on the HA side.
Restarting the MQTT brocker. (OBLIGATORY?)
Restarting HA.
The group becomes unavailable.

The only way have found is to add an entity to each group that is already part of it so that the group entity reappears on the HA side.

Zigbee2MQTT version

1.32.1-dev commit: 313865b

Adapter firmware version

20220219

Adapter

HamGeek CC2652P Tech

Debug log

No response

@antibill51 antibill51 added the problem Something isn't working label Jul 19, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Aug 19, 2023
@antibill51
Copy link
Author

By adding
availability: false
for each group, the problem has not reoccurred for approximately 2 weeks.

Is it normal to have to go through this?
Thanks

@github-actions github-actions bot removed the stale Stale issues label Aug 22, 2023
@rccoleman
Copy link
Sponsor

rccoleman commented Aug 27, 2023

I've just been struggling with a similar issue where some groups have an availability state of offline, when I do not have availability enabled anywhere. It only affected a subset of my groups, with no obvious commonality between the ones that were affected and the ones that were not. I have availability: false at the bottom of my configuration.yaml (not put there explicitly, but I think it was automatic as the default), but I just added it to each group definition to see if it helps.

I noticed that if I created a group and left it empty, an availability subtopic would be created with state: online, but as soon as I added a device, it would quickly switch to offline, even though I could toggle the device right from the panel in the group definition. When I would restart Z2M, I would also often see that group definition have no members in the UI, but they would all appear when I added one of the existing members back in. I think there's something weird going on with group definitions.

Here are my Zigbee2MQTT versions:

Zigbee2MQTT version
1.32.2-dev commit: [4949a54](https://github.com/Koenkk/zigbee2mqtt/commit/4949a54)
Coordinator type
zStack3x0
Coordinator revision
20221226
Coordinator IEEE Address
xxx
Frontend version
0.6.134

I also see these pretty reliability when I change the members in a group in HA, but is probably unrelated:

2023-08-27 10:04:03.511 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'zigbee2mqttp/Kit Light Group': ''
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 44, in wrapper
    msg_callback(msg)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 351, in state_received
    values = json_loads_object(msg.payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/json.py", line 52, in json_loads_object
    value: JsonValueType = json_loads(__obj)
                           ^^^^^^^^^^^^^^^^^
orjson.JSONDecodeError: Input is a zero-length, empty document: line 1 column 1 (char 0)

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added stale Stale issues and removed stale Stale issues labels Sep 27, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Oct 28, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

No branches or pull requests

2 participants