SzczepanLeon / esphome-components

116 stars 40 forks source link

Wmbus component v2.x doesn't list telegrams in log #29

Closed MarcinJanCiesielski closed 1 year ago

MarcinJanCiesielski commented 1 year ago

Hi. After update to version 2.X there is no sign of devices' telegrams.

Below is log from version 1.5.1 of wmbus

[21:45:48][I][app:102]: ESPHome version 2023.4.4 compiled on May 9 2023, 16:25:16

[21:45:48][C][wifi:363]: Local MAC: A0:20:A6:09:B4:77 [21:45:48][C][wifi:364]: SSID: [redacted] [21:45:48][C][wifi:365]: IP Address: 192.168.1.160 [21:45:48][C][wifi:366]: BSSID: [redacted]

[21:45:48][C][wifi:370]: Signal strength: -41 dB ▂▄▆█ [21:45:48][C][wifi:374]: Channel: 8 [21:45:48][C][wifi:375]: Subnet: 255.255.255.0 [21:45:48][C][wifi:376]: Gateway: 192.168.1.1 [21:45:48][C][wifi:377]: DNS1: 192.168.1.1 [21:45:48][C][wifi:378]: DNS2: 0.0.0.0

[21:45:48][C][logger:295]: Level: DEBUG [21:45:48][C][logger:296]: Log Baud Rate: 115200 [21:45:48][C][logger:297]: Hardware UART: UART0 [21:45:48][C][uptime.sensor:031]: Uptime Sensor '0_wmbus_uptime' [21:45:48][C][uptime.sensor:031]: Device Class: 'duration' [21:45:48][C][uptime.sensor:031]: State Class: 'total_increasing' [21:45:48][C][uptime.sensor:031]: Unit of Measurement: 's' [21:45:48][C][uptime.sensor:031]: Accuracy Decimals: 0

[21:45:48][C][template.text_sensor:021]: Template Sensor '0_wmbus_id'

[21:45:48][C][homeassistant.time:010]: Home Assistant Time:

[21:45:48][C][restart.button:017]: Restart Button '0_wmbus_restart' [21:45:48][C][safe_mode.button:022]: Safe Mode Button '0_wmbus_safemode'

[21:45:48][C][wmbus_sensor:016]: wM-Bus Sensor '0_wmbus_water' [21:45:48][C][wmbus_sensor:016]: Device Class: 'water' [21:45:48][C][wmbus_sensor:016]: State Class: 'total' [21:45:48][C][wmbus_sensor:016]: Unit of Measurement: 'l' [21:45:48][C][wmbus_sensor:016]: Accuracy Decimals: 0

[21:45:48][C][wmbus_sensor:023]: Type: mkradio4 [21:45:48][C][wmbus_sensor:024]: ID: 2492994353 [0x94981331] [21:45:48][C][version.text_sensor:021]: Version Text Sensor '0_wmbus_version'

[21:45:48][C][wifi_info:013]: WifiInfo Mac Address '0_wmbus_mac'

[21:45:48][C][captive_portal:088]: Captive Portal: [21:45:48][C][web_server:151]: Web Server: [21:45:48][C][web_server:152]: Address: 0_wmbus.local:80

[21:45:48][C][mdns:109]: Hostname: 0_wmbus [21:45:48][C][ota:093]: Over-The-Air Updates: [21:45:48][C][ota:094]: Address: 0_wmbus.local:8266 [21:45:48][C][ota:097]: Using Password. [21:45:48][C][api:138]: API Server: [21:45:48][C][api:139]: Address: 0_wmbus.local:6053 [21:45:48][C][api:141]: Using noise encryption: YES [21:45:48][C][wifi_signal.sensor:009]: WiFi Signal '0_wmbus_linkquality' [21:45:48][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [21:45:48][C][wifi_signal.sensor:009]: State Class: 'measurement' [21:45:48][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [21:45:48][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [21:45:48][C][debug:048]: Debug component: [21:45:48][D][debug:060]: ESPHome version 2023.4.4 [21:45:48][D][debug:064]: Free Heap Size: 15544 bytes [21:45:48][D][debug:092]: Flash Chip: Size=4096kB Speed=40MHz Mode=DOUT [21:45:48][D][debug:248]: Chip ID: 0x0009B477 [21:45:48][D][debug:249]: SDK Version: 2.2.2-dev(38a443e) [21:45:48][D][debug:250]: Core Version: 3.0.2 [21:45:48][D][debug:251]: Boot Version=31 Mode=1 [21:45:48][D][debug:252]: CPU Frequency: 80 [21:45:48][D][debug:253]: Flash Chip ID=0x0016405E [21:45:48][D][debug:254]: Reset Reason: External System [21:45:48][D][debug:255]: Reset Info: External System [21:45:48][C][wmbus:312]: wM-Bus v1.5.1: [21:45:48][C][wmbus:329]: CC1101 SPI bus: [21:45:48][C][wmbus:330]: MOSI Pin: GPIO13 [21:45:48][C][wmbus:331]: MISO Pin: GPIO12 [21:45:48][C][wmbus:332]: CLK Pin: GPIO14 [21:45:48][C][wmbus:333]: CS Pin: GPIO15 [21:45:48][C][wmbus:334]: GDO0 Pin: GPIO5 [21:45:48][C][wmbus:335]: GDO2 Pin: GPIO4 [21:45:48][C][wmbus:342]: Available drivers: amiplus, apator08, apator162, apatoreitn, bmeters, elf, evo868, fhkvdataiii, hydrocalm3, itron, izar, mkradio3, mkradio4, qheat, qwater, ultrimis, unismart, vario451 21:46:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -40.00000 dBm with 0 decimals of accuracy 21:47:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 150.51601 s with 0 decimals of accuracy 21:47:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -39.00000 dBm with 0 decimals of accuracy 21:48:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 210.51601 s with 0 decimals of accuracy 21:48:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -39.00000 dBm with 0 decimals of accuracy 21:49:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 270.51599 s with 0 decimals of accuracy 21:49:40 [D] [wmbus:158] Meter ID [0x94981213] RSSI: -66 dBm LQI: 135 not found in configuration T: 2F446850131298949572A2069F2D2D09902A490100001626262A2826251F2A27292624282B2223262626262328283029 (48) 21:50:40 [I] [ota:113]
Boot seems successful, resetting boot loop counter. 21:51:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -41.00000 dBm with 0 decimals of accuracy 21:52:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 330.51599 s with 0 decimals of accuracy 21:52:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -40.00000 dBm with 0 decimals of accuracy 21:53:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 390.51599 s with 0 decimals of accuracy 21:53:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -40.00000 dBm with 0 decimals of accuracy 21:54:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 450.51599 s with 0 decimals of accuracy 21:54:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -38.00000 dBm with 0 decimals of accuracy 21:55:11 [D] [sensor:109]
'0_wmbus_uptime': Sending state 510.51599 s with 0 decimals of accuracy 21:55:39 [D] [wmbus:158] Meter ID [0x94981213] RSSI: -56 dBm LQI: 128 not found in configuration T: 2F446850131298949572A2069F2D2D09902A490100001626262A2826251F2A27292624282B2223262626262328283029 (48) 21:56:45 [D] [sensor:109]
'0_wmbus_linkquality': Sending state -40.00000 dBm with 0 decimals of accuracy

There are two telegrams from water meters.

Decode of last telegram is in link: https://wmbusmeters.org/analyze/2F446850131298949572A2069F2D2D09902A490100001626262A2826251F2A27292624282B2223262626262328283029

The water meters are Techem Radio4

After updating wmbus component to version 2.x no telegram is printed out.

Today I did experiment. I download version 1.5.1 and I built ESPHome fw - this version listed telegrams, and after that I prepared fw base on latest version 2.1.11 - no sign of telegrams. Experiment was conducted on the same device and the same spot. I even try your development branch (wmbus_c1) but also any luck with telegrams.

Below is ma testing ESPhome yaml (in each attempt I commented out part of it to fit proper version of component)


substitutions:
  hostname: 0_wmbus
  idprefix: wmbus

esphome:
  name: ${hostname}
  platform: ESP8266
  board: d1_mini

external_components:
# v2
  # - source: github://SzczepanLeon/esphome-components@main
  #   components: [ wmbus ]
# v1
  - source: _components
    components: [ wmbus ]

packages:
  wifi: !include _includes/esphome_wifi.yaml
  device_base: !include _includes/esphome_base.yaml

wmbus:
  mosi_pin: GPIO13
  miso_pin: GPIO12
  clk_pin:  GPIO14
  cs_pin:   GPIO15
  gdo0_pin: GPIO5
  gdo2_pin: GPIO4

sensor:
# v2
  # - platform: wmbus
  #   meter_id: 0x94981331
  #   type: mkradio4
  #   key: "00000000000000000000000000000000"
  #   add_prefix: false
  #   lqi:
  #     name: ${hostname}_lqi
  #   rssi:
  #     name: ${hostname}_rssi
  #   total_water_m3:
  #     name: ${hostname}_water
  #     accuracy_decimals: 0
  #     force_update: true
  #     icon: "mdi:water-sync"
  #     unit_of_measurement: "l"
  #     state_class: "total"
  #     device_class: "water"
  #     filters:
  #       - multiply: 1000
# v1
  - platform: wmbus
    name: ${hostname}_water
    meter_id: "0x94981331"
    type: "mkradio4"
    key: "00000000000000000000000000000000"
    accuracy_decimals: 0
    force_update: true
    icon: "mdi:water-sync"
    unit_of_measurement: "l"
    state_class: "total"
    device_class: "water"
    filters:
      - multiply: 1000
SzczepanLeon commented 1 year ago

Try option: log_unknown: True

MarcinJanCiesielski commented 1 year ago

You was right - after adjust configuration telegrams are listed. Now I also get 'T1 not found in configuration'. Is it because the telegram is probably C1 and wmbus cannot cope with it yet?

SzczepanLeon commented 1 year ago

Now I also get 'T1 not found in configuration'. Is it because the telegram is probably C1 and wmbus cannot cope with it yet?

No, it is T1 but you don't have sensor with that ID defined.

btw. log_unknown from v2.1.13 is True by default.

MarcinJanCiesielski commented 1 year ago

OK. Thank you.