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

Errors in logs 'msg': 'dispatch_event: mqtt_publish...' after updating from v3.3.6 to v4.0.x #1325

Open
xkansler opened this issue Apr 8, 2024 · 7 comments · May be fixed by #1360
Open
Assignees
Labels
bug Something isn't working

Comments

@xkansler
Copy link

xkansler commented Apr 8, 2024

After upgrade from v3.3.6 to v4.0.0/v4.0.1/v4.0.2

After upgrade upgrade from v3.3.6 to v4.0.0/v4.0.1/v4.0.2 there are constant messages in the logs


Log details (ERROR):
This error originated from a custom integration.

Logger: custom_components.xiaomi_gateway3.gate.192.168.10.23
Source: custom_components/xiaomi_gateway3/core/gate/base.py:91
integration: Xiaomi Gateway 3 (documentation, issues)
First occurred: 16:19:58 (12 occurrences)
Last logged: 16:24:58

    {'msg': 'dispatch_event: mqtt_publish (<custom_components.xiaomi_gateway3.core.mini_mqtt.MQTTMessage object at 0x7f0bd095d3a0>,) {}'}
    {'msg': 'dispatch_event: mqtt_publish (<custom_components.xiaomi_gateway3.core.mini_mqtt.MQTTMessage object at 0x7f0bef3831a0>,) {}'}
    {'msg': 'dispatch_event: mqtt_publish (<custom_components.xiaomi_gateway3.core.mini_mqtt.MQTTMessage object at 0x7f0bf2a00500>,) {}'}
    {'msg': 'dispatch_event: mqtt_publish (<custom_components.xiaomi_gateway3.core.mini_mqtt.MQTTMessage object at 0x7f0bec09c0e0>,) {}'}
    {'msg': 'dispatch_event: mqtt_publish (<custom_components.xiaomi_gateway3.core.mini_mqtt.MQTTMessage object at 0x7f0bbfdd4440>,) {}'}

Traceback (most recent call last):
  File "/config/custom_components/xiaomi_gateway3/core/gate/base.py", line 91, in dispatch_event
    handler(*args, **kwargs)
  File "/config/custom_components/xiaomi_gateway3/core/gate/miot.py", line 26, in miot_on_mqtt_publish
    self.miot_process_properties(result, from_cache=True)
  File "/config/custom_components/xiaomi_gateway3/core/gate/miot.py", line 60, in miot_process_properties
    device.dispatch({device.type: ts})
  File "/config/custom_components/xiaomi_gateway3/core/device.py", line 211, in dispatch
    handler(data)
asyncio.exceptions.InvalidStateError: invalid state

System composition:

  • Home Assistant core-2024.4.2 / supervisor-2024.04.0
  • 5pcs. Xiaomi Multimode Gateway (CN) ZNDMWG03LM
  • All Gateway have firmware 1.5.6_0001
@AlexxIT AlexxIT added the bug Something isn't working label Apr 8, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 8, 2024

I think this is fixed in latest master version. Do you have Mesh groups?

@xkansler
Copy link
Author

xkansler commented Apr 8, 2024

Yes. I am using a Gateway ZNDMWG03LM only for BT-Mesh and BLE. Zigbee not used.
For zigbee i'm use SLZB-06p-PoE
Mesh Group are visible in HA and they are controlled normally.

3pcs. Mesh Downlight M2 YLTS02YL

extra:
  childs:
  - '1042024241'
  - '1042020721'
  - '1041898691'
  did: group.1714582109592899584
  market_brand: Xiaomi
  market_model: mijia.light.group3
  market_name: Light Group
  type: group
last_request_ts: 1m3s
last_seen: {}
listeners: 2
model: 68286
params: {}
ttl: 0s

9pcs. Mesh Bulb MJDP09YL

extra:
  childs:
  - '1041713326'
  - '1040940836'
  - '1041709199'
  - '1040875274'
  - '1041639973'
  - '1040888111'
  - '1040909449'
  - '1041640027'
  - '1041826648'
  did: group.1714576400012693504
  market_brand: Xiaomi
  market_model: mijia.light.group3
  market_name: Light Group
  type: group
last_request_ts: 16s
last_seen: {}
listeners: 2
model: 68286

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 9, 2024

For log, my issues:

Traceback (most recent call last):
  File "/config/custom_components/xiaomi_gateway3/core/gate/base.py", line 91, in dispatch_event
    handler(*args, **kwargs)
  File "/config/custom_components/xiaomi_gateway3/core/gate/miot.py", line 15, in miot_on_mqtt_publish
    self.miot_process_properties(msg.json["params"], from_cache=False)
  File "/config/custom_components/xiaomi_gateway3/core/gate/miot.py", line 60, in miot_process_properties
    device.dispatch({device.type: ts})
  File "/config/custom_components/xiaomi_gateway3/core/device.py", line 211, in dispatch
    handler(data)
  File "/config/custom_components/xiaomi_gateway3/light.py", line 151, in forward_child_update
    self.device.dispatch(data)
  File "/config/custom_components/xiaomi_gateway3/core/device.py", line 211, in dispatch
    handler(data)
asyncio.exceptions.InvalidStateError: invalid state
Traceback (most recent call last):
  File "/config/custom_components/xiaomi_gateway3/core/gate/base.py", line 91, in dispatch_event
    handler(*args, **kwargs)
  File "/config/custom_components/xiaomi_gateway3/core/gate/miot.py", line 26, in miot_on_mqtt_publish
    self.miot_process_properties(result, from_cache=True)
  File "/config/custom_components/xiaomi_gateway3/core/gate/miot.py", line 60, in miot_process_properties
    device.dispatch({device.type: ts})
  File "/config/custom_components/xiaomi_gateway3/core/device.py", line 211, in dispatch
    handler(data)
asyncio.exceptions.InvalidStateError: invalid state

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 9, 2024

Do you have enabled statistics sensors?

@xkansler
Copy link
Author

xkansler commented Apr 9, 2024

Yes enabled statistics sensors.
The configuration is the same on all five gateways.
config_gateway

P.S.
With the help of XiaomiGateway3, is it possible to turn off zigbee and not clog channels?
Maybe there is a way to disable the onboard zigbee chip?

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 9, 2024

Maybe there is a way to disable the onboard zigbee chip?

I don't see any sense in it

@SpawnBkAngel
Copy link

Same errors with v4.0.3.
Errors disappear when statistics sensors are disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants