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

Zigbee attribute reporting #5

Open
luar123 opened this issue Jun 23, 2024 · 19 comments
Open

Zigbee attribute reporting #5

luar123 opened this issue Jun 23, 2024 · 19 comments

Comments

@luar123
Copy link
Owner

luar123 commented Jun 23, 2024

This came up in #4:

But I found an issue where the delay in sensor data reporting is very high, and it can take from one minute to a few minutes to wait. It can be reported normally in your esphome_zb_sensor project.

There are multiple ways of attribute reporting available:

  1. you can issue a report command, to report the attribute value immediately. This is done with zigbee.report for all attributes that are written with zigbee.setAttr
  2. you can configure reporting based on value change or time interval. This is activated by setting report: true for an attribute with setting: min_interval = 10, max_interval = 0, delta = 0 -> report on every attribute change, but no periodic reporting. This setting is hardcoded at the moment, but can be overwritten by the coordinator (e.g. zigbee2mqtt)

esphome_zb_sensor uses the brute-force method: Whenever the attribute is set, a report command is issued. If you want to replicate this (I won't recommend) run zigbee.report after zigbee.setAttr .

Important: If you use z2m with the default settings and either no custom configuration for your device or using the modern extend functions, reporting settings might get overwritten. E.g. for temperature it is set to an interval between 10s and 1h and a difference of 1°C: https://github.com/Koenkk/zigbee-herdsman-converters/blob/41b26f2025b0627f984ccf0da65ca4051bd404f0/src/lib/modernExtend.ts#L561
You can always change these settings through the web frontend.

@papylhomme
Copy link

Hello, I stumbled onto this issue before opening a new one. For me reporting doesn't seem to work at all, I even added an interval to call the zigbee.report action with no luck. I'm using HA with ZHA (coordinator is a SLZB-06M).

The clusters are configured with report: true, and the interval component is as follow (I can see the execution in the logs)

interval:
  - interval: 1min
    then:
      - logger.log: "Zigbee Report !"
      - zigbee.report: zb

For each report call, there is a Zigbee warning/error from 30s to 1m later :
[15:19:21][I][zigbee:193][Zigbee_main]: ZDO signal: ZDO Device Unavailable (0x3c), status: ESP_OK

However I can successfully read the attributes directly by issuing a command from HA.
image

Any idea how I can investigate this further ?

@luar123
Copy link
Owner Author

luar123 commented Nov 2, 2024

Could you solve this in the meantime?
If not, you could try to get more info from ZHA debug logs or capture the zigbee packets with wireshark: https://www.zigbee2mqtt.io/advanced/zigbee/04_sniff_zigbee_traffic.html
Or use z2m. Maybe there is some compatibility issue with ZHA (I never tried).

@patrickfnielsen
Copy link

patrickfnielsen commented Dec 16, 2024

Hey - I'm not sure if I should post in this issue or create a new one, but I'll start here.

I'm also having trouble getting reporting to work (I use Z2M). I have successfully added the device to Z2M, and Z2M discovers the need clusters/attributes without any issue.

Pressing the "refresh" button, or reading the attributes work, but when I update a value with zigbee.setAttr nothing is reported, though I can see it setting the attribute in the log. The reporting tab in Z2M looks like I would expect (using modern extent).

If I add a zigbee.report: zb as the second action (see example) it does report the value to Z2M, but then I would have to do all filters in the esphome config (delta, etc), and it seems like a workaround?

zigbee:
  id: "zb"
  endpoints:
    - num: 1
      device_type: SIMPLE_SENSOR
      clusters:
        - id: OCCUPANCY_SENSING
          attributes:
            - id: 0x0000
              type: 8BITMAP
              report: true
            - id: 0x0001
              type: 8BIT_ENUM
              value: 0x0
            - id: 0x0002
              type: 8BITMAP
              value: 0x0

        - id: ILLUMINANCE_MEASUREMENT
          attributes:
            - id: 0x0000
              type: U16
              report: true
            - id: 0x0004
              type: U16
              value: 0x0

binary_sensor:
  - platform: LD2412
    has_target:
      name: Presence
      on_state:
        then:
          - zigbee.setAttr:
              id: zb
              endpoint: 1
              cluster: OCCUPANCY_SENSING
              attribute: 0x0000
              value: !lambda "return x;"
          - zigbee.report: zb

sensor:
  - platform: bh1750
    name: Illuminance
    address: 0x23
    update_interval: 10s
    filters: 
      - delta: 8
    on_value: 
      then:
        - zigbee.setAttr:
            id: zb
            endpoint: 1
            cluster: ILLUMINANCE_MEASUREMENT
            attribute: 0x0000
            value: !lambda "return x;"
        - zigbee.report: zb

I'm not sure where to go from here, so any help would be appreciated.

@luar123
Copy link
Owner Author

luar123 commented Dec 16, 2024

Try to add value: 0 to Attribute 0 of illuminance cluster.

If I add a zigbee.report: zb as the second action (see example) it does report the value to Z2M, but then I would have to do all filters in the esphome config (delta, etc), and it seems like a workaround?

Yes, that is only a workaround and would use another reporting mechanism.

Is there anything in the logs?

@patrickfnielsen
Copy link

I just updated to the new syntax (good job with that btw), and get the same behavior as before (with value: 0added):

zigbee:
  id: "zb"
  endpoints:
    - num: 1
      device_type: SIMPLE_SENSOR
      clusters:
        - id: OCCUPANCY_SENSING
          attributes:
            - attribute_id: 0x0000
              type: 8BITMAP
              report: true
              device: occupancy
            - attribute_id: 0x0001
              type: 8BIT_ENUM
              value: 0x0
            - attribute_id: 0x0002
              type: 8BITMAP
              value: 0x0

        - id: ILLUMINANCE_MEASUREMENT
          attributes:
            - attribute_id: 0x0000
              type: U16
              value: 0
              report: true
              device: illuminance
            - attribute_id: 0x0004
              type: U16
              value: 0x0

sensor:
  - platform: bh1750
    id: illuminance
    name: Illuminance
    address: 0x23
    update_interval: 10s
    filters: 
      - delta: 8

binary_sensor:
  - platform: LD2412
    has_target:
      id: occupancy
      name: Presence

Here's the relevant zigbee logs (I think):

[10:50:35][D][esp-idf:000]: E (291) ESP_ZIGBEE_ATTRIBUTE: The requested update attribute ID:0x10 is not found
[10:50:35][D][esp-idf:000]: E (292) ESP_ZIGBEE_ATTRIBUTE: The requested update attribute ID:0x4 is not found
[10:50:36][D][esp-idf:000][Zigbee_main]: E (1153) ESP_ZIGBEE_CLUSTER: The requested update cluster ID (0x   0) is not found
[10:50:36][D][esp-idf:000][Zigbee_main]: E (1154) zigbee_helper: Ignore previous cluster not found error
[10:50:36][D][esp-idf:000][Zigbee_main]: E (1155) ESP_ZIGBEE_CLUSTER: The requested update cluster ID (0x 400) is not found
[10:50:36][D][esp-idf:000][Zigbee_main]: E (1155) zigbee_helper: Ignore previous cluster not found error
[10:50:36][D][esp-idf:000][Zigbee_main]: E (1156) ESP_ZIGBEE_CLUSTER: The requested update cluster ID (0x 406) is not found
[10:50:36][D][esp-idf:000][Zigbee_main]: E (1157) zigbee_helper: Ignore previous cluster not found error
[10:50:36][I][zigbee:356][Zigbee_main]: set reporting for cluster: 1030
[10:50:36][I][zigbee:356][Zigbee_main]: set reporting for cluster: 1024
[10:50:36][I][zigbee:182][Zigbee_main]: ZDO signal: ZDO Config Ready (0x17), status: ESP_FAIL
[10:50:36][I][zigbee:094][Zigbee_main]: SKIP_STARTUP. Device started up in non factory-reset mode
[10:50:36][I][zigbee:096][Zigbee_main]: Initialize Zigbee stack
[10:50:37][D][sensor:093]: 'Illuminance': Sending state 57.95275 lx with 1 decimals of accuracy
[10:50:37][D][zigbee:019]: Attribute set!
[10:50:37][C][zigbee:407]: ZigBee:
[10:50:37][C][zigbee:409]: Endpoint: 1, 12
[10:50:38][D][binary_sensor:036]: 'Presence': Sending state OFF
[10:50:38][D][zigbee:019]: Attribute set!
[10:50:38][I][zigbee:116][Zigbee_main]: Start network steering after reboot
[10:50:38][I][zigbee:133][Zigbee_main]: Joined network successfully (Extended PAN ID: 82:5d:19:42:3d:96:d6:ac, PAN ID: 0xbc7c, Channel:15)
[10:50:38][D][main:109][Zigbee_main]: Joined network
[10:50:38][D][zigbee:080][Zigbee_main]: Bind response from address(0x0), endpoint(1) with status(0)
[10:50:38][D][zigbee:080][Zigbee_main]: Bind response from address(0x0), endpoint(1) with status(0)
[10:52:12][D][binary_sensor:036]: 'Presence': Sending state ON
[10:52:12][D][zigbee:019]: Attribute set!
[10:52:12][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=2.8lx
[10:52:12][D][sensor:093]: 'Illuminance': Sending state 2.82972 lx with 1 decimals of accuracy
[10:52:12][D][zigbee:019]: Attribute set!
[10:52:22][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=60.6lx
[10:52:22][D][sensor:093]: 'Illuminance': Sending state 60.55610 lx with 1 decimals of accuracy
[10:52:22][D][zigbee:019]: Attribute set!

I also see this in the logs at random times:

[10:54:01][I][zigbee:182][Zigbee_main]: ZDO signal: ZDO Device Unavailable (0x3c), status: ESP_OK

@luar123
Copy link
Owner Author

luar123 commented Dec 16, 2024

For illuminance:
I would guess reporting works as intended, but the delta is lower than the threshold configured by z2m. Check the reporting tab in z2m frontend (min rep change).

The main issue is that the zigbee attribute value is not in lux. You need to add a lambda 10000*log10(x)+1. (Your lux value in z2m is probably close to 0.)

I have the same setup working fine. Will add my config once I get back on my PC.

I would also change simple_sensor to light_sensor.

@patrickfnielsen
Copy link

patrickfnielsen commented Dec 16, 2024

Please do share, maybe I've done something stupid.

I tried with light_sensor, and the lambda (before I had a custom extend to handle the lux conversion, I also removed that. It's all default modern extends now), but I still get the same results:

[22:51:04][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=767.6lx
[22:51:04][D][sensor:093]: 'Illuminance': Sending state 767.64758 lx with 1 decimals of accuracy
[22:51:04][D][zigbee:019]: Attribute set!
[22:51:14][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=4.4lx
[22:51:14][D][sensor:093]: 'Illuminance': Sending state 4.41437 lx with 1 decimals of accuracy
[22:51:14][D][zigbee:019]: Attribute set!

Min rep change in Z2M is 5, so that should have been reported right? If I press refresh I do get the correct values.

Update:
I did some more testing, and if I wait long enough I do seem to get some kind of update. It seems to update when [Zigbee_main]: Receive Zigbee default response callback is logged, but it's very slow (1-2 min) and does not seem to correlate with value changes, I have attached logs from Z2M and the C6:

ESP32 Logs:
[09:56:38][D][zigbee:207][Zigbee_main]: Receive Zigbee default response callback
[09:56:47][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=121.9lx
[09:56:47][D][sensor:093]: 'Illuminance': Sending state 121.90452 lx with 1 decimals of accuracy
[09:56:47][D][zigbee:019]: Attribute set!
[09:56:57][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=122.2lx
[09:56:57][D][sensor:093]: 'Illuminance': Sending state 122.24408 lx with 1 decimals of accuracy
[09:56:57][D][zigbee:019]: Attribute set!
[09:57:07][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=122.7lx
[09:57:07][D][sensor:093]: 'Illuminance': Sending state 122.69685 lx with 1 decimals of accuracy
[09:57:07][D][zigbee:019]: Attribute set!
[09:57:17][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=123.0lx
[09:57:17][D][sensor:093]: 'Illuminance': Sending state 123.03641 lx with 1 decimals of accuracy
[09:57:17][D][zigbee:019]: Attribute set!
[09:57:27][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=123.0lx
[09:57:27][D][sensor:093]: 'Illuminance': Sending state 123.03641 lx with 1 decimals of accuracy
[09:57:27][D][zigbee:019]: Attribute set!
[09:57:37][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=123.3lx
[09:57:37][D][sensor:093]: 'Illuminance': Sending state 123.26278 lx with 1 decimals of accuracy
[09:57:37][D][zigbee:019]: Attribute set!
[09:57:47][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=123.5lx
[09:57:47][D][sensor:093]: 'Illuminance': Sending state 123.48917 lx with 1 decimals of accuracy
[09:57:47][D][zigbee:019]: Attribute set!
[09:57:53][D][zigbee:207][Zigbee_main]: Receive Zigbee default response callback
[09:57:57][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:57:57][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:57:57][D][zigbee:019]: Attribute set!
[09:58:07][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:58:07][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:58:07][D][zigbee:019]: Attribute set!
[09:58:17][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:58:17][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:58:17][D][zigbee:019]: Attribute set!
[09:58:27][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:58:27][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:58:27][D][zigbee:019]: Attribute set!
[09:58:37][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:58:37][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:58:37][D][zigbee:019]: Attribute set!
[09:58:47][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:58:47][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:58:47][D][zigbee:019]: Attribute set!
[09:58:57][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:58:57][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:58:57][D][zigbee:019]: Attribute set!
[09:59:07][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:59:07][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:59:07][D][zigbee:019]: Attribute set!
[09:59:08][D][zigbee:207][Zigbee_main]: Receive Zigbee default response callback
[09:59:17][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:59:17][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:59:17][D][zigbee:019]: Attribute set!
[09:59:27][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:59:27][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:59:27][D][zigbee:019]: Attribute set!
[09:59:37][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=1.0lx
[09:59:37][D][sensor:093]: 'Illuminance': Sending state 1.01870 lx with 1 decimals of accuracy
[09:59:37][D][zigbee:019]: Attribute set!
[09:59:47][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=132.8lx
[09:59:47][D][sensor:093]: 'Illuminance': Sending state 132.77066 lx with 1 decimals of accuracy
[09:59:47][D][zigbee:019]: Attribute set!
[09:59:57][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=133.2lx
[09:59:57][D][sensor:093]: 'Illuminance': Sending state 133.22342 lx with 1 decimals of accuracy
[09:59:57][D][zigbee:019]: Attribute set!
[10:00:07][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=133.2lx
[10:00:07][D][sensor:093]: 'Illuminance': Sending state 133.22342 lx with 1 decimals of accuracy
[10:00:07][D][zigbee:019]: Attribute set!
[10:00:17][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=133.4lx
[10:00:17][D][sensor:093]: 'Illuminance': Sending state 133.44978 lx with 1 decimals of accuracy
[10:00:17][D][zigbee:019]: Attribute set!
[10:00:27][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=133.7lx
[10:00:27][D][sensor:093]: 'Illuminance': Sending state 133.67618 lx with 1 decimals of accuracy
[10:00:27][D][zigbee:019]: Attribute set!
[10:00:37][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=134.1lx
[10:00:37][D][sensor:093]: 'Illuminance': Sending state 134.12892 lx with 1 decimals of accuracy
[10:00:37][D][zigbee:019]: Attribute set!
[10:00:47][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=134.2lx
[10:00:47][D][sensor:093]: 'Illuminance': Sending state 134.24211 lx with 1 decimals of accuracy
[10:00:47][D][zigbee:019]: Attribute set!
[10:00:52][D][zigbee:207][Zigbee_main]: Receive Zigbee default response callback
[10:00:57][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=134.0lx
[10:00:57][D][sensor:093]: 'Illuminance': Sending state 134.01573 lx with 1 decimals of accuracy
[10:00:57][D][zigbee:019]: Attribute set!
Z2M logs:
info 2024-12-17 09:56:38z 2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x543204fffe215ca4', payload '{"illuminance":20119,"illuminance_lux":103,"linkquality":54}'
info 2024-12-17 09:57:53z 2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x543204fffe215ca4', payload '{"illuminance":20861,"illuminance_lux":122,"linkquality":51}'
info 2024-12-17 09:59:08z 2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x543204fffe215ca4', payload '{"illuminance":81,"illuminance_lux":1,"linkquality":51}'
info 2024-12-17 10:00:52z 2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x543204fffe215ca4', payload '{"illuminance":21232,"illuminance_lux":133,"linkquality":51}'

@luar123
Copy link
Owner Author

luar123 commented Dec 17, 2024

Thanks for the update/logs.
I posted my config here, but I guess it won't help in your case.

There seems to be a setup specific issue, I also saw some discussions about this in arduino issue reports. You are right [Zigbee_main]: Receive Zigbee default response callback always shows up after reporting, but in your case there seems to be a huge delay.

I will try to investigate and see how they solved it in arduino. Could you provide more information?

  • full esp log from boot, z2m logs with debug log level
  • full yaml
  • hardware setup: coordinator/other devices/routers? You could add a screenshot from the z2m frontend map
  • screenshots from z2m frontend: details/bindings/reports pages

(please remove any sensitive information)

@patrickfnielsen
Copy link

patrickfnielsen commented Dec 18, 2024

Coordinator: Sonoff Dongle-P:
Coordinator type: zStack3x0
Coordinator revision: 20230507

Full ESP config:

esphome:
  name: zigbeetest
  friendly_name: ZigbeeTest

esp32:
  board: esp32-c6-devkitc-1
  flash_size: 4MB
  partitions: partitions_zb.csv
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y

external_components:
  - source: github://luar123/zigbee_esphome
    components: [ zigbee ]

logger:
  level: DEBUG
  hardware_uart: USB_SERIAL_JTAG

i2c:
  sda: GPIO22
  scl: GPIO23
  scan: false

zigbee:
  id: "zb"
  endpoints:
    - num: 1
      device_type: LIGHT_SENSOR
      clusters:
        - id: ILLUMINANCE_MEASUREMENT
          attributes:
            - id: illuminance_attr
              attribute_id: 0x0000
              type: U16
              value: 0x0
              report: true
              #device: illuminance
            - attribute_id: 0x0004
              type: U16
              value: 0x0

  on_join:
    then:
      - logger.log: "Joined network"

sensor:
  - platform: bh1750
    id: illuminance
    name: Illuminance
    address: 0x23
    update_interval: 10s
    on_value: 
      then:
        - zigbee.setAttr:
            id: illuminance_attr
            value: !lambda "return 10000*log10(x)+1;"
        #- zigbee.report: zb

ESP32-C6 boot logs:

[10:14:05]ild:Sep 19 2022
[10:14:05]rst:0x15 (USB_UART_HPSYS),boot:0x1e (SPI_FAST_FLASH_BOOT)
[10:14:05]Saved PC:0x40805030
[10:14:05]SPIWP:0xee
[10:14:05]mode:DIO, clock div:2
[10:14:05]load:0x4086c410,len:0xd58
[10:14:05]load:0x4086e610,len:0x2d44
[10:14:05]load:0x40875728,len:0x17d0
[10:14:05]entry 0x4086c410
[10:14:05]I (24) boot: ESP-IDF 5.1.5 2nd stage bootloader
[10:14:05]I (25) boot: compile time Dec 17 2024 10:17:50
[10:14:05]I (25) boot: chip revision: v0.1
[10:14:05]I (27) boot.esp32c6: SPI Speed      : 80MHz
[10:14:05]I (32) boot.esp32c6: SPI Mode       : DIO
[10:14:05]I (37) boot.esp32c6: SPI Flash Size : 4MB
[10:14:05]I (41) boot: Enabling RNG early entropy source...
[10:14:05]I (47) boot: Partition Table:
[10:14:06]I (50) boot: ## Label            Usage          Type ST Offset   Length
[10:14:06]I (58) boot:  0 otadata          OTA data         01 00 00009000 00002000
[10:14:06]I (65) boot:  1 phy_init         RF data          01 01 0000b000 00001000
[10:14:06]I (73) boot:  2 app0             OTA app          00 10 00010000 001b0000
[10:14:06]I (80) boot:  3 app1             OTA app          00 11 001c0000 001b0000
[10:14:06]I (88) boot:  4 nvs              WiFi data        01 02 00370000 0006d000
[10:14:06]I (95) boot:  5 zb_storage       Unknown data     01 81 003dd000 00004000
[10:14:06]I (103) boot:  6 zb_fct           Unknown data     01 81 003e1000 00000400
[10:14:06]I (110) boot: End of partition table
[10:14:06]I (115) esp_image: segment 0: paddr=00010020 vaddr=42080020 size=11e70h ( 73328) map
[10:14:06]I (138) esp_image: segment 1: paddr=00021e98 vaddr=40800000 size=0ce74h ( 52852) load
[10:14:06]I (151) esp_image: segment 2: paddr=0002ed14 vaddr=4080ce80 size=01304h (  4868) load
[10:14:06]I (153) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=73830h (473136) map
[10:14:06]I (253) esp_image: segment 4: paddr=000a3858 vaddr=4080e184 size=00cf4h (  3316) load
[10:14:06]I (258) boot: Loaded app from partition at offset 0x10000
[10:14:06]I (258) boot: Disabling RNG early entropy source...
[10:14:06]I (262) cpu_start: Unicore app
[10:14:06]I (266) cpu_start: Pro cpu up.
[10:14:06]W (281) clk: esp_perip_clk_init() has not been implemented yet
[10:14:06]I (281) cpu_start: Pro cpu start user code
[10:14:06]I (281) cpu_start: cpu freq: 160000000 Hz
[10:14:06]I (285) cpu_start: Application information:
[10:14:06]I (290) cpu_start: Project name:     zigbeetest
[10:14:06]I (295) cpu_start: App version:      2024.12.0b2
[10:14:06]I (301) cpu_start: Compile time:     Dec 17 2024 10:17:30
[10:14:06]I (307) cpu_start: ELF file SHA256:  c18923035428f57a...
[10:14:06]I (313) cpu_start: ESP-IDF:          5.1.5
[10:14:06]I (317) cpu_start: Min chip rev:     v0.0
[10:14:06]I (322) cpu_start: Max chip rev:     v0.99 
[10:14:06]I (327) cpu_start: Chip rev:         v0.1
[10:14:06]I (332) heap_init: Initializing. RAM available for dynamic allocation:
[10:14:06]I (339) heap_init: At 40813740 len 00068ED0 (419 KiB): D/IRAM
[10:14:06]I (345) heap_init: At 4087C610 len 00002F54 (11 KiB): STACK/DIRAM
[10:14:06]I (352) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM
[10:14:06]I (359) spi_flash: detected chip: generic
[10:14:06]I (363) spi_flash: flash io: dio
[10:14:06]I (367) sleep: Configure to isolate all GPIO pins in sleep state
[10:14:06]I (374) sleep: Enable automatic switching of GPIO sleep configuration
[10:14:06]I (381) coexist: coex firmware version: 27d8387
[10:14:06]I (381) coexist: coexist rom version 5b8dcfa
[10:14:06]I (382) app_start: Starting scheduler on CPU0
[10:14:06]I (386) main_task: Started on CPU0
[10:14:06]I (386) main_task: Calling app_main()
[10:14:06][I][logger:171]: Log initialized
[10:14:06][I][zigbee:266]: Model: zigbeetest
[10:14:06][I][zigbee:267]: Manufacturer: esphome
[10:14:06][I][zigbee:268]: Date: 20241217
[10:14:06][I][zigbee:269]: Area: 
[10:14:06][D][esp-idf:000]: E (487) ESP_ZIGBEE_ATTRIBUTE: The requested update attribute ID:0x4 is not found
[10:14:06]
[10:14:06][I][app:029]: Running through setup()...
[10:14:06][C][i2c.idf:017]: Setting up I2C bus...
[10:14:06][I][i2c.idf:252]: Performing I2C bus recovery
[10:14:06][D][esp-idf:000]: I (489) gpio: GPIO[23]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
[10:14:06]
[10:14:06][D][esp-idf:000]: I (490) gpio: GPIO[22]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
[10:14:06]
[10:14:06][D][esp-idf:000]: I (491) gpio: GPIO[3]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
[10:14:06]
[10:14:06][D][esp-idf:000]: I (492) gpio: GPIO[14]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
[10:14:06]
[10:14:06][D][esp-idf:000][Zigbee_main]: I (494) phy_init: phy_version 310,dde1ba9,Jun  4 2024,16:38:11
[10:14:06]
[10:14:06][D][esp-idf:000][Zigbee_main]: W (531) phy_init: saving new calibration data because of checksum failure, mode(0)
[10:14:06]
[10:14:06][C][bh1750.sensor:041]: Setting up BH1750 'Illuminance'...
[10:14:06][D][esp-idf:000][Zigbee_main]: I (542) phy: libbtbb version: 04952fd, Jun  4 2024, 16:38:26
[10:14:06]
[10:14:06][D][esp-idf:000][Zigbee_main]: E (544) ESP_ZIGBEE_CLUSTER: The requested update cluster ID (0x   0) is not found
[10:14:06]
[10:14:06][D][esp-idf:000][Zigbee_main]: E (545) zigbee_helper: Ignore previous cluster not found error
[10:14:06]
[10:14:06][D][esp-idf:000][Zigbee_main]: E (545) ESP_ZIGBEE_CLUSTER: The requested update cluster ID (0x 400) is not found
[10:14:06]
[10:14:06][D][esp-idf:000][Zigbee_main]: E (546) zigbee_helper: Ignore previous cluster not found error
[10:14:06]
[10:14:06][I][zigbee:356][Zigbee_main]: set reporting for cluster: 1024
[10:14:06][I][app:062]: setup() finished successfully!
[10:14:06][I][app:100]: ESPHome version 2024.12.0b2 compiled on Dec 17 2024, 10:32:56
[10:14:06][C][logger:185]: Logger:
[10:14:06][C][logger:186]:   Level: DEBUG
[10:14:06][C][logger:188]:   Log Baud Rate: 115200
[10:14:06][C][logger:189]:   Hardware UART: USB_SERIAL_JTAG
[10:14:06][C][i2c.idf:075]: I2C Bus:
[10:14:06][C][i2c.idf:076]:   SDA Pin: GPIO22
[10:14:06][C][i2c.idf:077]:   SCL Pin: GPIO23
[10:14:06][C][i2c.idf:078]:   Frequency: 50000 Hz
[10:14:06][C][i2c.idf:084]:   Recovery: bus successfully recovered
[10:14:06][C][gpio.output:010]: GPIO Binary Output:
[10:14:06][C][gpio.output:011]:   Pin: GPIO3
[10:14:06][C][gpio.output:010]: GPIO Binary Output:
[10:14:06][C][gpio.output:011]:   Pin: GPIO14
[10:14:06][C][zigbee:407]: ZigBee:
[10:14:06][C][zigbee:409]: Endpoint: 1, 262
[10:14:06][C][bh1750.sensor:118]: BH1750 'Illuminance'
[10:14:06][C][bh1750.sensor:118]:   Device Class: 'illuminance'
[10:14:06][C][bh1750.sensor:118]:   State Class: 'measurement'
[10:14:06][C][bh1750.sensor:118]:   Unit of Measurement: 'lx'
[10:14:06][C][bh1750.sensor:118]:   Accuracy Decimals: 1
[10:14:06][C][bh1750.sensor:119]:   Address: 0x23
[10:14:06][C][bh1750.sensor:124]:   Update Interval: 10.0s
[10:14:07][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=45.8lx
[10:14:07][D][sensor:093]: 'Illuminance': Sending state 45.84153 lx with 1 decimals of accuracy
[10:14:07][D][zigbee:019]: Attribute set!
[10:14:08][I][zigbee:116][Zigbee_main]: Start network steering after reboot
[10:14:08][I][zigbee:133][Zigbee_main]: Joined network successfully (Extended PAN ID: 82:5d:19:42:3d:96:d6:ac, PAN ID: 0xbc7c, Channel:15)
[10:14:08][D][main:211][Zigbee_main]: Joined network
[10:14:08][D][zigbee:080][Zigbee_main]: Bind response from address(0x0), endpoint(1) with status(0)

Z2M interview logs:
https://pastebin.com/gzf8WjZ1

Z2M receive logs (Let me know if I missed anything):

[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: <-- [254,28,68,129,0,0,0,4,50,243,1,1,0,69,0,229,200,80,0,0,8,8,5,10,0,0,33,123,15,99,251,28,250]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --- parseNext [254,28,68,129,0,0,0,4,50,243,1,1,0,69,0,229,200,80,0,0,8,8,5,10,0,0,33,123,15,99,251,28,250]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --> parsed 28 - 2 - 4 - 129 - [0,0,0,4,50,243,1,1,0,69,0,229,200,80,0,0,8,8,5,10,0,0,33,123,15,99,251,28] - 250
[2024-12-18 10:21:37] debug: 	zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":1024,"srcaddr":62258,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":69,"securityuse":0,"timestamp":5294309,"transseqnumber":0,"len":8,"data":{"type":"Buffer","data":[8,5,10,0,0,33,123,15]}}
[2024-12-18 10:21:37] debug: 	zh:controller: Received payload: clusterID=1024, address=62258, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=69, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":5,"commandIdentifier":10},"payload":[{"attrId":0,"dataType":33,"attrData":3963}],"command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}}
[2024-12-18 10:21:37] debug: 	zh:controller:endpoint: ZCL command 0x543204fffe215ca4/1 msIlluminanceMeasurement.defaultRsp({"cmdId":10,"statusCode":0}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":1,"reservedBits":0,"transactionSequenceNumber":5,"writeUndiv":false})
[2024-12-18 10:21:37] debug: 	zh:zstack: sendZclFrameToEndpointInternal 0x543204fffe215ca4:62258/1 (0,0,1)
[2024-12-18 10:21:37] debug: 	zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":62258,"destendpoint":1,"srcendpoint":1,"clusterid":1024,"transid":123,"options":0,"radius":30,"len":5,"data":{"type":"Buffer","data":[24,5,11,10,0]}}
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:writer: --> frame [254,15,36,1,50,243,1,1,0,4,123,0,30,5,24,5,11,10,0,147]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-12-18 10:21:37] debug: 	z2m: Received Zigbee message from '0x543204fffe215ca4', type 'attributeReport', cluster 'msIlluminanceMeasurement', data '{"measuredValue":3963}' from endpoint 1 with groupID 0
[2024-12-18 10:21:37] info: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x543204fffe215ca4', payload '{"illuminance":3963,"illuminance_lux":2,"linkquality":69}'
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2024-12-18 10:21:37] debug: 	zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,123,189]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,123,189]
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,123] - 189
[2024-12-18 10:21:37] debug: 	zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":123}
[2024-12-18 10:21:37] debug: 	zh:zstack:unpi:parser: --- parseNext []

Screenshots (sorry about the snow, forgot to disable it for the screenshots):
Screenshot 2024-12-18 at 10 24 11
Screenshot 2024-12-18 at 10 24 07
Screenshot 2024-12-18 at 10 24 03
Screenshot 2024-12-18 at 10 23 58
Screenshot 2024-12-18 at 10 28 05

Let me know if I missed anything. As a note I also tried connecting it to the coordinator directly with the same result.

@luar123
Copy link
Owner Author

luar123 commented Dec 20, 2024

Thanks, I will look into this, but could take a while.

@luar123
Copy link
Owner Author

luar123 commented Dec 24, 2024

Please try the latest commit, might or might not help. I don't really know whats wrong, but there are a couple of things we could try.
When testing, please remove the device from z2m and restart z2m and coordinator.

@papylhomme
Copy link

Please try the latest commit, might or might not help. I don't really know whats wrong, but there are a couple of things we could try. When testing, please remove the device from z2m and restart z2m and coordinator.

Hello, I did some tests with Z2M some months ago but the results weren't better than ZHA.
Right now I'm playing with your last changes on a test network with Z2M and it seems really promising for my use case :
reporting set to min:0, max:10, change:0 => I get the report for every sensor update :)

Coordinator: SMLIGHT SLZB-07 - type EZSP v12

Config:

sensor:
  - platform: bme280_i2c
    address: 0x76
    update_interval: 10s
    temperature:
      id: bme280_temperature
      name: "BME280 Temperature"
      oversampling: 16x
    humidity:
      id: bme280_humidity
      name: "BME280 Humidity"
    pressure:
      id: bme280_pressure
      name: "BME280 Pressure"

zigbee:
  id: "zb"
  endpoints:
    - device_type: TEMPERATURE_SENSOR
      num: 1
      clusters:
        - id: REL_HUMIDITY_MEASUREMENT
          attributes:
            - attribute_id: 0
              type: U16
              report: true
              value: 200
              device: bme280_humidity
              scale: 100
        - id: TEMP_MEASUREMENT
          attributes:
            - attribute_id: 0x0
              type: S16
              report: true
              value: 100
              device: bme280_temperature
              scale: 100
        - id: PRESSURE_MEASUREMENT
          attributes:
            - attribute_id: 0x0
              type: S16
              report: true
              value: 100
              device: bme280_pressure

ESP Logs:

[09:33:39][D][sensor:093]: 'BME280 Temperature': Sending state 15.81965 °C with 1 decimals of accuracy
[09:33:39][D][zigbee:019]: Attribute set!
[09:33:39][D][sensor:093]: 'BME280 Pressure': Sending state 1010.58234 hPa with 1 decimals of accuracy
[09:33:39][D][zigbee:019]: Attribute set!
[09:33:39][D][sensor:093]: 'BME280 Humidity': Sending state 44.47461 % with 1 decimals of accuracy
[09:33:39][D][zigbee:019]: Attribute set!
[09:33:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:49][D][sensor:093]: 'BME280 Temperature': Sending state 15.80949 °C with 1 decimals of accuracy
[09:33:49][D][zigbee:019]: Attribute set!
[09:33:49][D][sensor:093]: 'BME280 Pressure': Sending state 1010.57843 hPa with 1 decimals of accuracy
[09:33:49][D][zigbee:019]: Attribute set!
[09:33:49][D][sensor:093]: 'BME280 Humidity': Sending state 44.30762 % with 1 decimals of accuracy
[09:33:49][D][zigbee:019]: Attribute set!
[09:33:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:59][D][sensor:093]: 'BME280 Temperature': Sending state 15.80168 °C with 1 decimals of accuracy
[09:33:59][D][zigbee:019]: Attribute set!
[09:33:59][D][sensor:093]: 'BME280 Pressure': Sending state 1010.57013 hPa with 1 decimals of accuracy
[09:33:59][D][zigbee:019]: Attribute set!
[09:33:59][D][sensor:093]: 'BME280 Humidity': Sending state 44.23047 % with 1 decimals of accuracy
[09:33:59][D][zigbee:019]: Attribute set!
[09:33:59][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:59][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:33:59][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:09][D][sensor:093]: 'BME280 Temperature': Sending state 15.92199 °C with 1 decimals of accuracy
[09:34:09][D][zigbee:019]: Attribute set!
[09:34:09][D][sensor:093]: 'BME280 Pressure': Sending state 1010.57111 hPa with 1 decimals of accuracy
[09:34:09][D][zigbee:019]: Attribute set!
[09:34:09][D][sensor:093]: 'BME280 Humidity': Sending state 54.06348 % with 1 decimals of accuracy
[09:34:09][D][zigbee:019]: Attribute set!
[09:34:09][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:09][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:09][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:19][D][sensor:093]: 'BME280 Temperature': Sending state 15.93488 °C with 1 decimals of accuracy
[09:34:19][D][zigbee:019]: Attribute set!
[09:34:19][D][sensor:093]: 'BME280 Pressure': Sending state 1010.55170 hPa with 1 decimals of accuracy
[09:34:19][D][zigbee:019]: Attribute set!
[09:34:19][D][sensor:093]: 'BME280 Humidity': Sending state 45.05664 % with 1 decimals of accuracy
[09:34:19][D][zigbee:019]: Attribute set!
[09:34:19][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:19][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:19][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:29][D][sensor:093]: 'BME280 Temperature': Sending state 16.00656 °C with 1 decimals of accuracy
[09:34:29][D][zigbee:019]: Attribute set!
[09:34:29][D][sensor:093]: 'BME280 Pressure': Sending state 1010.59711 hPa with 1 decimals of accuracy
[09:34:29][D][zigbee:019]: Attribute set!
[09:34:29][D][sensor:093]: 'BME280 Humidity': Sending state 52.77051 % with 1 decimals of accuracy
[09:34:29][D][zigbee:019]: Attribute set!
[09:34:29][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:29][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:29][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:39][D][sensor:093]: 'BME280 Temperature': Sending state 16.00910 °C with 1 decimals of accuracy
[09:34:39][D][zigbee:019]: Attribute set!
[09:34:39][D][sensor:093]: 'BME280 Pressure': Sending state 1010.58490 hPa with 1 decimals of accuracy
[09:34:39][D][zigbee:019]: Attribute set!
[09:34:39][D][sensor:093]: 'BME280 Humidity': Sending state 45.92188 % with 1 decimals of accuracy
[09:34:39][D][zigbee:019]: Attribute set!
[09:34:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:49][D][sensor:093]: 'BME280 Temperature': Sending state 16.07824 °C with 1 decimals of accuracy
[09:34:49][D][zigbee:019]: Attribute set!
[09:34:49][D][sensor:093]: 'BME280 Pressure': Sending state 1010.56519 hPa with 1 decimals of accuracy
[09:34:49][D][zigbee:019]: Attribute set!
[09:34:49][D][sensor:093]: 'BME280 Humidity': Sending state 48.74023 % with 1 decimals of accuracy
[09:34:49][D][zigbee:019]: Attribute set!
[09:34:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:59][D][sensor:093]: 'BME280 Temperature': Sending state 18.53625 °C with 1 decimals of accuracy
[09:34:59][D][zigbee:019]: Attribute set!
[09:34:59][D][sensor:093]: 'BME280 Pressure': Sending state 1010.51929 hPa with 1 decimals of accuracy
[09:34:59][D][zigbee:019]: Attribute set!
[09:34:59][D][sensor:093]: 'BME280 Humidity': Sending state 86.29688 % with 1 decimals of accuracy
[09:34:59][D][zigbee:019]: Attribute set!
[09:34:59][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:59][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:34:59][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:09][D][sensor:093]: 'BME280 Temperature': Sending state 17.91926 °C with 1 decimals of accuracy
[09:35:09][D][zigbee:019]: Attribute set!
[09:35:09][D][sensor:093]: 'BME280 Pressure': Sending state 1010.59210 hPa with 1 decimals of accuracy
[09:35:09][D][zigbee:019]: Attribute set!
[09:35:09][D][sensor:093]: 'BME280 Humidity': Sending state 87.71582 % with 1 decimals of accuracy
[09:35:09][D][zigbee:019]: Attribute set!
[09:35:09][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:09][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:09][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:19][D][sensor:093]: 'BME280 Temperature': Sending state 16.77453 °C with 1 decimals of accuracy
[09:35:19][D][zigbee:019]: Attribute set!
[09:35:19][D][sensor:093]: 'BME280 Pressure': Sending state 1010.55200 hPa with 1 decimals of accuracy
[09:35:19][D][zigbee:019]: Attribute set!
[09:35:19][D][sensor:093]: 'BME280 Humidity': Sending state 64.45117 % with 1 decimals of accuracy
[09:35:19][D][zigbee:019]: Attribute set!
[09:35:19][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:19][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:19][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:29][D][sensor:093]: 'BME280 Temperature': Sending state 16.64152 °C with 1 decimals of accuracy
[09:35:29][D][zigbee:019]: Attribute set!
[09:35:29][D][sensor:093]: 'BME280 Pressure': Sending state 1010.55975 hPa with 1 decimals of accuracy
[09:35:29][D][zigbee:019]: Attribute set!
[09:35:29][D][sensor:093]: 'BME280 Humidity': Sending state 48.29688 % with 1 decimals of accuracy
[09:35:29][D][zigbee:019]: Attribute set!
[09:35:29][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:29][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:29][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:39][D][sensor:093]: 'BME280 Temperature': Sending state 16.53391 °C with 1 decimals of accuracy
[09:35:39][D][zigbee:019]: Attribute set!
[09:35:39][D][sensor:093]: 'BME280 Pressure': Sending state 1010.57568 hPa with 1 decimals of accuracy
[09:35:39][D][zigbee:019]: Attribute set!
[09:35:39][D][sensor:093]: 'BME280 Humidity': Sending state 45.91016 % with 1 decimals of accuracy
[09:35:39][D][zigbee:019]: Attribute set!
[09:35:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:39][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:49][D][sensor:093]: 'BME280 Temperature': Sending state 16.43410 °C with 1 decimals of accuracy
[09:35:49][D][zigbee:019]: Attribute set!
[09:35:49][D][sensor:093]: 'BME280 Pressure': Sending state 1010.57190 hPa with 1 decimals of accuracy
[09:35:49][D][zigbee:019]: Attribute set!
[09:35:49][D][sensor:093]: 'BME280 Humidity': Sending state 45.01953 % with 1 decimals of accuracy
[09:35:49][D][zigbee:019]: Attribute set!
[09:35:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback
[09:35:49][D][zigbee:264][Zigbee_main]: Receive Zigbee default response callback

Z2M logs:

info 2024-12-26 10:33:39z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":44.96,"linkquality":255,"pressure":101,"temperature":15.81}'
info 2024-12-26 10:33:39z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":44.47,"linkquality":255,"pressure":101,"temperature":15.81}'
info 2024-12-26 10:33:49z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":44.47,"linkquality":255,"pressure":101,"temperature":15.8}'
info 2024-12-26 10:33:49z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":44.3,"linkquality":255,"pressure":101,"temperature":15.8}'
info 2024-12-26 10:33:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":44.23,"linkquality":255,"pressure":101,"temperature":15.8}'
info 2024-12-26 10:34:09z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":44.23,"linkquality":255,"pressure":101,"temperature":15.92}'
info 2024-12-26 10:34:09z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":54.06,"linkquality":255,"pressure":101,"temperature":15.92}'
info 2024-12-26 10:34:19z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":54.06,"linkquality":255,"pressure":101,"temperature":15.93}'
info 2024-12-26 10:34:19z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.05,"linkquality":255,"pressure":101,"temperature":15.93}'
info 2024-12-26 10:34:29z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.05,"linkquality":255,"pressure":101,"temperature":16}'
info 2024-12-26 10:34:29z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":52.77,"linkquality":255,"pressure":101,"temperature":16}'
info 2024-12-26 10:34:39z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.92,"linkquality":255,"pressure":101,"temperature":16}'
info 2024-12-26 10:34:49z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.92,"linkquality":255,"pressure":101,"temperature":16.07}'
info 2024-12-26 10:34:49z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":48.74,"linkquality":255,"pressure":101,"temperature":16.07}'
info 2024-12-26 10:34:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":48.74,"linkquality":255,"pressure":101,"temperature":18.53}'
info 2024-12-26 10:34:59z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":86.29,"linkquality":255,"pressure":101,"temperature":18.53}'
info 2024-12-26 10:35:09z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":86.29,"linkquality":255,"pressure":101,"temperature":17.91}'
info 2024-12-26 10:35:09z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":87.71,"linkquality":255,"pressure":101,"temperature":17.91}'
info 2024-12-26 10:35:19z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":87.71,"linkquality":255,"pressure":101,"temperature":16.77}'
info 2024-12-26 10:35:19z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":64.45,"linkquality":255,"pressure":101,"temperature":16.77}'
info 2024-12-26 10:35:29z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":64.45,"linkquality":255,"pressure":101,"temperature":16.64}'
info 2024-12-26 10:35:29z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":48.29,"linkquality":255,"pressure":101,"temperature":16.64}'
info 2024-12-26 10:35:39z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":48.29,"linkquality":255,"pressure":101,"temperature":16.53}'
info 2024-12-26 10:35:39z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.91,"linkquality":255,"pressure":101,"temperature":16.53}'
info 2024-12-26 10:35:49z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.91,"linkquality":255,"pressure":101,"temperature":16.43}'
info 2024-12-26 10:35:49z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/0x744dbdfffe63761a', payload '{"humidity":45.01,"linkquality":255,"pressure":101,"temperature":16.43}'

I'll try to update one a my "production" board to see if it works with ZHA too.

@patrickfnielsen
Copy link

Sorry for the delayed response.

I just tried again using the new commit, but I still see the same pattern.
To see if it was my zigbee network I also tried coding it using the ESP32 Arduino Zigbee SDK, and everything works as when I use that with the same setup.

@luar123
Copy link
Owner Author

luar123 commented Jan 6, 2025

I want to update to the latest zigbee sdk 1.6.1 (same as arduino uses). If that doesn't help you could send me your Arduino code, then I can compare.

@luar123
Copy link
Owner Author

luar123 commented Jan 11, 2025

@patrickfnielsen: please try esp sdk 1.6.1 version.
As always esphome clean, esptool.py erase_flash and re-interview and remove/add device in z2m is needed.

@patrickfnielsen
Copy link

I tried the latest version, but I cant seem to get over a panic now:

[17:17:11][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=95.5lx
[17:17:11][D][sensor:093]: 'Illuminance': Sending state 95.53149 lx with 1 decimals of accuracy
[17:17:11]Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.

It seems to happen after sending. Same YAML as before.
I did a clean, erase_flash, restarted Z2M + coordinator, but still get crashes everytime

@luar123
Copy link
Owner Author

luar123 commented Jan 19, 2025

Sorry, forgot to test the SetAttr action with the latest changes. Should work now.
Simple esphome run should be enough.

@patrickfnielsen
Copy link

@luar123 I did another test, and it seems to work as expected now! Thanks a lot for the help, and the great project!

@papylhomme
Copy link

Updated to the last version and everything is working fine too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants