Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.31k stars 1.61k forks source link

Entity 'homeassistant/sensor' is unknown #22258

Closed BWFCGUIXT closed 3 weeks ago

BWFCGUIXT commented 1 month ago

What happened?

Not sure when this started but for a while I keep getting:

Entity 'homeassistant/sensor' is unknown

Multiple times on startup of Zigbee2Mqtt

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.36.1-dev commit: d9628df

Adapter firmware version

6.10.3.0 build 297

Adapter

EZSP v8

Setup

Docker

Debug log

No response

moster11 commented 1 month ago

I can confirm these errors happening in my instance, too. No idea what this means, though.

Screenshot 2024-04-19 180821

antst commented 1 month ago

By coincidence, I was debugging this issue just minutes ago, as I see it also for some time, and it is very annoying. So, story here is simple. If HA integration is enable and something else, beside Z2M published to topics "homeassistant/sensor/XXZ", where XXZ is not z2m entity (in my case HA itself is publishing this, as in MQTT I have enabled "mqtt_statestream"), then we get this message (in lib/extension/publish.ts:137), although topic is reported wrongly, as it reports parsed topic, and because entity is unknown, result of parsing isn't very clear to understand :)

@Koenkk, I think this part needs some redesign. We can't expect that Z2M to be sole publisher to "homeassistant/".

antst commented 1 month ago

as a short term solution, I suggest to change this one from logger.error to logger.warn

Koenkk commented 1 month ago

Could you provide your z2m configuration.yaml and the debug log of this?

See this on how to enable debug logging.

antst commented 1 month ago

I can do better, I can give repro :) just publish anything to the topic homeassistant/sensor/bla-bla-bla when z2m config has:

homeassistant:
  legacy_entity_attributes: false
  legacy_triggers: true

the only requirement is that "bla-bla-bla" should not be name of any existent z2m entity.

Koenkk commented 1 month ago

I cannot reproduce it, debug logging when I do it:

[2024-04-25 21:56:46] debug:    z2m: Received MQTT message on 'homeassistant/sensor/bla-bla-bla' with data ''

Can you provide your debug log?

See this on how to enable debug logging.

timmo65 commented 1 month ago

I have also had this for some time - keep trying to ignore it but it bugs me ....

image
ytugarev commented 1 month ago

+1

aperezva commented 1 month ago

The same error, and persits

Koenkk commented 1 month ago

Please provide the info as requested in https://github.com/Koenkk/zigbee2mqtt/issues/22258#issuecomment-2078070547 , otherwise I cannot help

BWFCGUIXT commented 1 month ago

@Koenkk Hope this helps :) log.txt

theDiverDK commented 1 month ago

I see the same error in 1.37.1

sebastienserre commented 1 month ago

Please provide the info as requested in #22258 (comment) , otherwise I cannot help

Same issue here but adding

advanced:
  log_debug_to_mqtt_frontend: true

issue this in HA: Integration error: advanced - Integration 'advanced' not found.

theDiverDK commented 1 month ago

Here is my log.txt fil, hope it helps.

log.txt

dingausmwald commented 1 month ago

same for me with switch, not sensor

ytugarev commented 1 month ago

In my setup this error appears to be related to thermostat valves (both Bosch and Danfoss) , after homeassistant/sensor/valve address/setpoint_change_source/config'. Attaching the log log.log

BWFCGUIXT commented 1 month ago

@ytugarev can confirm that I also have Danfoss in my home, so maybe it's somehow related.

theDiverDK commented 1 month ago

@BWFCGUIXT and @ytugarev

I also have Danfoss Ally thermostats.

I have 8 of them.

And i get 8 times the error within same second, and 2 seconds later i get another 8 times the same error.

So you might be on to something.

sebastienserre commented 1 month ago

No Danfoss but Aqara SRTS-A01 on my side.

aperezva commented 1 month ago

The same, Aqara on my side

timmo65 commented 1 month ago

I posted earlier and have 6x that error message and also have 6x Trvs - 3 are Hive (rebranded Danfoss) and 3 Sonoff TRVSBs - so looks like that might be where to look.

mainmind83 commented 4 weeks ago

Same problem after restore full backup HassOS:

[2024-05-16 15:16:25] error:    z2m: Entity 'homeassistant/number' is unknown
[2024-05-16 15:16:25] error:    z2m: Entity 'homeassistant/number' is unknown

Core 2024.5.3 Supervisor 2024.05.1 Operating System 12.3 Frontend 20240501.1 Zigbee2MQTT 1.37.1-1

difrost commented 3 weeks ago

Same issue here with Aqara SRTS-A01, four errors returned for two devices:

z2m: Received MQTT message on 'homeassistant/binary_sensor/0x54ef4410007f622a/setup/config' with data '{"availability":[
{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410007f622a"],"manufacturer":"Aqara","model
":"Smart radiator thermostat E1 (SRTS-A01)","name":"SalonTRV","sw_version":"0.0.0_1030","via_device":"zigbee2mqtt_bridge_0xe0798dfffeeafb62"},"device_class":"running","
entity_category":"diagnostic","object_id":"salontrv_setup","origin":{"name":"Zigbee2MQTT","sw":"1.37.0","url":"https://www.zigbee2mqtt.io"},"payload_off":false,"payload
_on":true,"state_topic":"zigbee2mqtt/SalonTRV","unique_id":"0x54ef4410007f622a_setup_zigbee2mqtt","value_template":"{{ value_json.setup }}"}'
z2m: Entity 'homeassistant/binary_sensor' is unknown
z2m: Received MQTT message on 'homeassistant/binary_sensor/0x54ef4410007f300c/setup/config' with data '{"availability":[
{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410007f300c"],"manufacturer":"Aqara","model
":"Smart radiator thermostat E1 (SRTS-A01)","name":"AntresolaTRV","sw_version":"0.0.0_1030","via_device":"zigbee2mqtt_bridge_0xe0798dfffeeafb62"},"device_class":"runnin
g","entity_category":"diagnostic","object_id":"antresolatrv_setup","origin":{"name":"Zigbee2MQTT","sw":"1.37.0","url":"https://www.zigbee2mqtt.io"},"payload_off":false,
"payload_on":true,"state_topic":"zigbee2mqtt/AntresolaTRV","unique_id":"0x54ef4410007f300c_setup_zigbee2mqtt","value_template":"{{ value_json.setup }}"}'
z2m: Entity 'homeassistant/binary_sensor' is unknown
z2m: Received MQTT message on 'homeassistant/binary_sensor/0x54ef4410007f622a/setup/config' with data '{"availability":[
{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410007f622a"],"manufacturer":"Aqara","model
":"Smart radiator thermostat E1 (SRTS-A01)","name":"SalonTRV","sw_version":"0.0.0_1030","via_device":"zigbee2mqtt_bridge_0xe0798dfffeeafb62"},"device_class":"running","
entity_category":"diagnostic","object_id":"salontrv_setup","origin":{"name":"Zigbee2MQTT","sw":"1.37.0","url":"https://www.zigbee2mqtt.io"},"payload_off":false,"payload
_on":true,"state_topic":"zigbee2mqtt/SalonTRV","unique_id":"0x54ef4410007f622a_setup_zigbee2mqtt","value_template":"{{ value_json.setup }}"}'
z2m: Entity 'homeassistant/binary_sensor' is unknown
z2m: Received MQTT message on 'homeassistant/binary_sensor/0x54ef4410007f300c/setup/config' with data '{"availability":[
{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"device":{"identifiers":["zigbee2mqtt_0x54ef4410007f300c"],"manufacturer":"Aqara","model
":"Smart radiator thermostat E1 (SRTS-A01)","name":"AntresolaTRV","sw_version":"0.0.0_1030","via_device":"zigbee2mqtt_bridge_0xe0798dfffeeafb62"},"device_class":"runnin
g","entity_category":"diagnostic","object_id":"antresolatrv_setup","origin":{"name":"Zigbee2MQTT","sw":"1.37.0","url":"https://www.zigbee2mqtt.io"},"payload_off":false,
"payload_on":true,"state_topic":"zigbee2mqtt/AntresolaTRV","unique_id":"0x54ef4410007f300c_setup_zigbee2mqtt","value_template":"{{ value_json.setup }}"}'
z2m: Entity 'homeassistant/binary_sensor' is unknown
jeleniain commented 3 weeks ago

Having the same errors with my Aqara TRVs: [2024-05-19 20:13:35] error: z2m: Entity 'homeassistant/binary_sensor' is unknown [2024-05-19 20:13:35] error: z2m: Entity 'homeassistant/binary_sensor' is unknown

and

[2024-05-19 20:13:51] error: z2m: Publish 'set' 'sensor' to 'Office_Radiator' failed: 'Error: ZCL command 0x54ef44100067368c/1 manuSpecificLumi.write({"65522":{"value":[170,113,52,68,19,90,2,65,49,102,74,65,79,61,5,84,239,68,16,0,103,54,140,0,21,141,0,1,157,27,152,8,0,7,253,22,10,2,10,201,232,177,184,212,218,207,223,192,235,0,0,0,0,0,1,61,4,101],"type":65}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'

Please let me know if more information is needed. Thanks!

Koenkk commented 3 weeks ago

Fixed!

Changes will be available in the dev branch in a few hours from now.