Dzień dobry
walczę ostatnio z odczytem z licznika i jakoś cos mi nie wychodzi proszę zobaczcie bo ja już nie wiem co robię źle… z góry dzięki za pomoc
INFO ESPHome 2024.9.2
INFO Reading configuration /config/esphome/esphome-web-191d42.yaml...
INFO Detected timezone 'Europe/Warsaw'
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing nodemcu-wmbus (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- PubSubClient @ 2.8.0
|-- SPI @ 2.0.0
|-- SmartRC-CC1101-Driver-Lib @ 2.5.7
Compiling .pioenvs/nodemcu-wmbus/src/main.cpp.o
Linking .pioenvs/nodemcu-wmbus/firmware.elf
RAM: [= ] 13.9% (used 45596 bytes from 327680 bytes)
Flash: [======= ] 66.8% (used 1224953 bytes from 1835008 bytes)
Building .pioenvs/nodemcu-wmbus/firmware.bin
Creating esp32 image...
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs/nodemcu-wmbus/firmware.bin"], [".pioenvs/nodemcu-wmbus/firmware.elf"])
Wrote 0x13c780 bytes to file /data/build/nodemcu-wmbus/.pioenvs/nodemcu-wmbus/firmware.factory.bin, ready to flash to offset 0x0
esp32_copy_ota_bin([".pioenvs/nodemcu-wmbus/firmware.bin"], [".pioenvs/nodemcu-wmbus/firmware.elf"])
========================= [SUCCESS] Took 21.33 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.0.117
INFO Uploading /data/build/nodemcu-wmbus/.pioenvs/nodemcu-wmbus/firmware.bin (1230720 bytes)
Uploading: [============================================================] 100% Done...
INFO Upload took 13.83 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.0.117 using esphome API
INFO Successfully connected to nodemcu-wmbus @ 192.168.0.117 in 11.329s
INFO Successful handshake with nodemcu-wmbus @ 192.168.0.117 in 0.168s
[09:27:00][I][app:100]: ESPHome version 2024.9.2 compiled on Nov 14 2024, 09:26:16
[09:27:01][C][logger:185]: Logger:
[09:27:01][C][logger:186]: Level: VERBOSE
[09:27:01][C][logger:188]: Log Baud Rate: 115200
[09:27:01][C][logger:189]: Hardware UART: UART0
[09:27:01][C][restart.button:017]: Restart Button 'Restart ESP'
[09:27:01][C][restart.button:017]: Icon: 'mdi:restart'
[09:27:01][C][captive_portal:089]: Captive Portal:
[09:27:01][C][web_server:145]: Web Server:
[09:27:01][C][web_server:146]: Address: nodemcu-wmbus.local:80
[09:27:01][C][sntp:048]: SNTP Time:
[09:27:01][C][sntp:049]: Server 1: '0.pool.ntp.org'
[09:27:01][C][sntp:050]: Server 2: '1.pool.ntp.org'
[09:27:01][C][sntp:051]: Server 3: '2.pool.ntp.org'
[09:27:01][C][sntp:052]: Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[09:27:01][C][mdns:116]: mDNS:
[09:27:01][C][mdns:117]: Hostname: nodemcu-wmbus
[09:27:01][V][mdns:118]: Services:
[09:27:01][V][mdns:120]: - _esphomelib, _tcp, 6053
[09:27:01][V][mdns:122]: TXT: version = 2024.9.2
[09:27:01][V][mdns:122]: TXT: mac = d48afc9dec70
[09:27:01][V][mdns:122]: TXT: platform = ESP32
[09:27:01][V][mdns:122]: TXT: board = nodemcu-32s
[09:27:01][V][mdns:122]: TXT: network = wifi
[09:27:01][V][mdns:120]: - _http, _tcp, 80
[09:27:01][C][esphome.ota:073]: Over-The-Air updates:
[09:27:01][C][esphome.ota:074]: Address: nodemcu-wmbus.local:3232
[09:27:01][C][esphome.ota:075]: Version: 2
[09:27:01][C][safe_mode:018]: Safe Mode:
[09:27:01][C][safe_mode:020]: Boot considered successful after 60 seconds
[09:27:01][C][safe_mode:021]: Invoke after 10 boot attempts
[09:27:01][C][safe_mode:023]: Remain in safe mode for 300 seconds
[09:27:01][C][api:139]: API Server:
[09:27:01][C][api:140]: Address: nodemcu-wmbus.local:6053
[09:27:01][C][api:144]: Using noise encryption: NO
[09:27:01][C][wifi_info:012]: WifiInfo SSID 'ESP w sieci'
[09:27:01][C][wifi_info:012]: Icon: 'mdi:wifi-strength-2'
[09:27:01][V][wifi_info:012]: Unique ID: 'd48afc9dec70-wifiinfo-ssid'
[09:27:01][C][wifi_info:010]: WifiInfo IPAddress 'Adress IP ESP'
[09:27:01][C][wifi_info:010]: Icon: 'mdi:wifi'
[09:27:01][V][wifi_info:010]: Unique ID: 'd48afc9dec70-wifiinfo-ip'
[09:27:01][C][wmbus:338]: wM-Bus v4.1.0-1.17.1-b8f4a945:
[09:27:01][C][wmbus:356]: MAC: 9DFC8AD4
[09:27:01][C][wmbus:358]: CC1101 frequency: 868.950 MHz
[09:27:01][C][wmbus:359]: CC1101 SPI bus:
[09:27:01][C][wmbus:363]: MOSI Pin: GPIO23
[09:27:01][C][wmbus:364]: MISO Pin: GPIO19
[09:27:01][C][wmbus:365]: CLK Pin: GPIO18
[09:27:01][C][wmbus:366]: CS Pin: GPIO5
[09:27:01][C][wmbus:367]: GDO0 Pin: GPIO21
[09:27:01][C][wmbus:368]: GDO2 Pin: GPIO22
[09:27:01][C][wmbus:374]: Available drivers: unknown, apator162
[09:27:01][C][wmbus:388]: Meter:
[09:27:01][C][wmbus:389]: ID: 120881779 [0x07348273]
[09:27:01][C][wmbus:390]: Type: apator162
[09:27:01][C][wmbus:391]: Key: ''
[09:27:01][C][wmbus:393]: Field: 'rssi'
[09:27:01][C][wmbus:394]: Name: 'RSSI glowny'
[09:27:01][C][wmbus:394]: Device Class: 'signal_strength'
[09:27:01][C][wmbus:394]: State Class: 'measurement'
[09:27:01][C][wmbus:394]: Unit of Measurement: 'dBm'
[09:27:01][C][wmbus:394]: Accuracy Decimals: 0
[09:27:01][C][wmbus:393]: Field: 'total'
[09:27:01][C][wmbus:394]: Name: 'ESP_wodomierz_glowny'
[09:27:01][C][wmbus:394]: Device Class: 'water'
[09:27:01][C][wmbus:394]: State Class: 'total_increasing'
[09:27:01][C][wmbus:394]: Unit of Measurement: 'm3'
[09:27:01][C][wmbus:394]: Accuracy Decimals: 3
[09:27:01][C][wmbus:394]: Icon: 'mdi:water'
[09:27:02][V][json:038][async_tcp]: Attempting to allocate 512 bytes for JSON serialization
[09:27:02][V][json:058][async_tcp]: Size after shrink 96 bytes
[09:27:02][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:02][V][json:058]: Size after shrink 156 bytes
[09:27:02][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:02][V][json:058]: Size after shrink 172 bytes
[09:27:02][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:02][V][json:058]: Size after shrink 112 bytes
[09:27:02][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:02][V][json:058]: Size after shrink 164 bytes
[09:27:02][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:02][V][json:058]: Size after shrink 164 bytes
[09:27:24][V][json:038][async_tcp]: Attempting to allocate 512 bytes for JSON serialization
[09:27:24][V][json:058][async_tcp]: Size after shrink 96 bytes
[09:27:24][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:24][V][json:058]: Size after shrink 156 bytes
[09:27:24][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:24][V][json:058]: Size after shrink 172 bytes
[09:27:24][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:24][V][json:058]: Size after shrink 112 bytes
[09:27:24][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:24][V][json:058]: Size after shrink 164 bytes
[09:27:24][V][json:038]: Attempting to allocate 512 bytes for JSON serialization
[09:27:24][V][json:058]: Size after shrink 164 bytes
[09:27:43][D][esp32.preferences:114]: Saving 1 preferences to flash...
[09:27:43][V][esp32.preferences:163]: nvs_get_blob('1355795339'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[09:27:43][V][esp32.preferences:126]: sync: key: 1355795339, len: 7
[09:27:43][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[09:27:48][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[09:27:48][D][esp32.preferences:114]: Saving 1 preferences to flash...
[09:27:48][V][esp32.preferences:126]: sync: key: 233825507, len: 4
[09:27:48][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[09:28:23][V][rxLoop:167]: Have 110 bytes from CC1101 Rx, RSSI: -48 dBm LQI: 128
[09:28:23][D][mbus:035]: Received T1 A frame
[09:28:23][V][mbus:046]: Frame: 2F271C58D59A4CB95A59C58B59959368BCA64E63A55962D6B196662DC58BD1A663C5364E696C9667238D716B3434EB293A69538D98F25AC674C9ACB4B26C4B4D99656938CB2DA6A6653C592D97258DCA56A5A68ED296A659A674B299B236C5A535C96934B3B42DAD0BC8B5A67345 (110) [RAW]
[09:28:23][V][mbus:053]: Frame: 3E44010673960403050763EA7A290030855A3403C65BD75260E05E21408C128F2A97B5BE085CE6EC8AD3759967B3366A57D53549B4F0F662CF6A065C8FAE1809149F132C36C3E30A4C (73) [with CRC]
[09:28:23][V][mbus:096]: Validating CRC for Block1
[09:28:23][V][crc:031]: calculated: 0x63EA, read: 0x63EA
[09:28:23][V][mbus:116]: Validating CRC for Block2
[09:28:23][V][crc:031]: calculated: 0x408C, read: 0x408C
[09:28:23][V][mbus:116]: Validating CRC for Block3
[09:28:23][V][crc:031]: calculated: 0x366A, read: 0x366A
[09:28:23][V][mbus:116]: Validating CRC for Block4
[09:28:23][V][crc:031]: calculated: 0x149F, read: 0x149F
[09:28:23][V][mbus:116]: Validating CRC for Block5
[09:28:23][V][crc:031]: calculated: 0x0A4C, read: 0x0A4C
[09:28:23][V][mbus:063]: Frame: 3E4401067396040305077A290030855A3403C65BD75260E05E21128F2A97B5BE085CE6EC8AD3759967B357D53549B4F0F662CF6A065C8FAE1809132C36C3E3 (63) [without CRC]
[09:28:23][V][Telegram.cpp:1131]: (wmbus) parseDLL @0 63
[09:28:23][V][Telegram.cpp:1178]: (wmbus) parseELL @10 53
[09:28:23][V][Telegram.cpp:1333]: (wmbus) parseNWL @10 53
[09:28:23][V][Telegram.cpp:1391]: (wmbus) parseAFL @10 53
[09:28:23][V][Telegram.cpp:2078]: (wmbus) parseTPL @10 53
[09:28:23][W][component:237]: Component wmbus took a long time for an operation (162 ms).
[09:28:23][W][component:238]: Components should block for at most 30 ms.
[09:30:28][V][rxLoop:167]: Have 110 bytes from CC1101 Rx, RSSI: -48 dBm LQI: 128
[09:30:28][D][mbus:035]: Received T1 A frame
[09:30:28][V][mbus:046]: Frame: 2F271C58D59A4CB95A59C58B59959368BCA64E63A35962D6B19C63C7495365996CC9370EB16D1964DC72359C4E3A36B1A56A698CECA9B1959C963A7264DD236963935B4D2C95695CA592DC8D32E639659C959D0D5A3956D31C53993A6C68D70E34E94D34D8CBD32956A71369A745 (110) [RAW]
[09:30:28][V][mbus:053]: Frame: 3E44010673960403050763EA7A2B003085DBDC975598E74280C551DE15D22B6DF0FFB2EF85049BFE51CB60270CC89094F534B73A200495C10B90CDD7A7F86142129111B3CE90FD1FFC (73) [with CRC]
[09:30:28][V][mbus:096]: Validating CRC for Block1
[09:30:28][V][crc:031]: calculated: 0x63EA, read: 0x63EA
[09:30:28][V][mbus:116]: Validating CRC for Block2
[09:30:28][V][crc:031]: calculated: 0x15D2, read: 0x15D2
[09:30:28][V][mbus:116]: Validating CRC for Block3
[09:30:28][V][crc:031]: calculated: 0x9094, read: 0x9094
[09:30:28][V][mbus:116]: Validating CRC for Block4
[09:30:28][V][crc:031]: calculated: 0x1291, read: 0x1291
[09:30:28][V][mbus:116]: Validating CRC for Block5
[09:30:28][V][crc:031]: calculated: 0x1FFC, read: 0x1FFC
[09:30:28][V][mbus:063]: Frame: 3E4401067396040305077A2B003085DBDC975598E74280C551DE2B6DF0FFB2EF85049BFE51CB60270CC8F534B73A200495C10B90CDD7A7F8614211B3CE90FD (63) [without CRC]
[09:30:28][V][Telegram.cpp:1131]: (wmbus) parseDLL @0 63
[09:30:28][V][Telegram.cpp:1178]: (wmbus) parseELL @10 53
[09:30:28][V][Telegram.cpp:1333]: (wmbus) parseNWL @10 53
[09:30:28][V][Telegram.cpp:1391]: (wmbus) parseAFL @10 53
[09:30:28][V][Telegram.cpp:2078]: (wmbus) parseTPL @10 53
[09:30:28][W][component:237]: Component wmbus took a long time for an operation (150 ms).
[09:30:28][W][component:238]: Components should block for at most 30 ms.
[09:31:34][V][rxLoop:167]: Have 110 bytes from CC1101 Rx, RSSI: -48 dBm LQI: 128
[09:31:34][D][mbus:035]: Received T1 A frame
[09:31:34][V][mbus:046]: Frame: 2F271C58D59A4CB95A59C58B59959368BCA64E63B45962D6B196718F19B47134DAA5A2CB8CBC56CAC9A6C4B2D68EC6A694B72598B9657263934D65993A55B234DB1C2F19A998E38B9A55B2A5CA5A365A56393C66C998E52E939358B5A68DA6692F2D196532CB39A5A92EC39638D5 (110) [RAW]
[09:31:34][V][mbus:053]: Frame: 3E44010673960403050763EA7A2C0030855DBDAC4776F633B3D0E8AAD330B86A9349A3994A277005290E11843DAFA223A90EF4F619F027DAE5B93F27030AB65F3EC55733260F382021 (73) [with CRC]
[09:31:34][V][mbus:096]: Validating CRC for Block1
[09:31:34][V][crc:031]: calculated: 0x63EA, read: 0x63EA
[09:31:34][V][mbus:116]: Validating CRC for Block2
[09:31:34][V][crc:031]: calculated: 0xD330, read: 0xD330
[09:31:34][V][mbus:116]: Validating CRC for Block3
[09:31:34][V][crc:031]: calculated: 0xA223, read: 0xA223
[09:31:34][V][mbus:116]: Validating CRC for Block4
[09:31:34][V][crc:031]: calculated: 0x3EC5, read: 0x3EC5
[09:31:34][V][mbus:116]: Validating CRC for Block5
[09:31:34][V][crc:031]: calculated: 0x2021, read: 0x2021
[09:31:34][V][mbus:063]: Frame: 3E4401067396040305077A2C0030855DBDAC4776F633B3D0E8AAB86A9349A3994A277005290E11843DAFA90EF4F619F027DAE5B93F27030AB65F5733260F38 (63) [without CRC]
[09:31:34][V][Telegram.cpp:1131]: (wmbus) parseDLL @0 63
[09:31:34][V][Telegram.cpp:1178]: (wmbus) parseELL @10 53
[09:31:34][V][Telegram.cpp:1333]: (wmbus) parseNWL @10 53
[09:31:34][V][Telegram.cpp:1391]: (wmbus) parseAFL @10 53
[09:31:34][V][Telegram.cpp:2078]: (wmbus) parseTPL @10 53
[09:31:34][W][component:237]: Component wmbus took a long time for an operation (156 ms).
[09:31:34][W][component:238]: Components should block for at most 30 ms.
a oto config
esphome:
name: nodemcu-wmbus
esp32:
board: nodemcu-32s
framework:
type: arduino
time:
- platform: sntp
id: time_sntp
external_components:
- source: github://SzczepanLeon/esphome-components@main
components: [ wmbus ]
# Logi systemowe dostępne opcje 'NONE', 'ERROR', 'WARN', 'INFO', 'DEBUG', 'VERBOSE', 'VERY_VERBOSE'.
logger:
level: VERBOSE
web_server:
port: 80
api:
reboot_timeout: 36000s
ota:
platform: esphome
# Konfiguracja sieci LAN
wifi:
ssid: "wifi"
password: "password"
fast_connect: true
reboot_timeout: 15min
captive_portal:
wmbus:
mosi_pin: GPIO23 #d7 #GPIO23
miso_pin: GPIO19 #d6 #GPIO19
clk_pin: GPIO18 #d5 #GPIO18
cs_pin: GPIO05 #d4 #GPIO5
gdo0_pin: GPIO21 #d1 #GPIO21
gdo2_pin: GPIO22 #D2 #GPIO22
led_blink_time: "1s"
#frequency: 868.950
# all_drivers: true
# sync_mode: True
# log_all: True
#########################################################################################################
mqtt:
broker: 192.168.100.194
port: 1883
username: otgw
password: password
sensor:
- platform: wmbus
meter_id: 0x7348273
#add_prefix: false
type: apator162
key: "00000000000000000000000000000000"
sensors:
- name: "RSSI glowny"
field: "rssi"
accuracy_decimals: 0
unit_of_measurement: "dBm"
device_class: "signal_strength"
state_class: "measurement"
entity_category: "diagnostic"
- name: "ESP_wodomierz_glowny"
field: "total"
accuracy_decimals: 3
unit_of_measurement: "m3"
device_class: "water"
state_class: "total_increasing"
icon: "mdi:water"
text_sensor:
- platform: wifi_info
ip_address:
name: 'Adress IP ESP'
icon: mdi:wifi
ssid:
name: 'ESP w sieci'
icon: mdi:wifi-strength-2
button:
- platform: restart
name: "Restart ESP"