Wąż w kieszeni kąsał jak zwykle, więc sam zakupiłem moduł, podłączyłem do NodeMCU i jest jak zwykle:
INFO Successfully connected to 192.168.1.10
[15:52:20][I][app:102]: ESPHome version 2023.9.0 compiled on Sep 27 2023, 23:46:20
[15:52:20][C][wifi:546]: WiFi:
[15:52:20][C][wifi:382]: Local MAC: 44:17:93:10:E9:7F
[15:52:20][C][wifi:383]: SSID: [redacted]
[15:52:20][C][wifi:384]: IP Address: 192.168.1.10
[15:52:20][C][wifi:385]: BSSID: [redacted]
[15:52:20][C][wifi:387]: Hostname: 'liczniki'
[15:52:20][C][wifi:389]: Signal strength: -81 dB ▂▄▆█
[15:52:20][C][wifi:393]: Channel: 7
[15:52:20][C][wifi:394]: Subnet: 255.255.255.0
[15:52:20][C][wifi:395]: Gateway: 192.168.1.1
[15:52:20][C][wifi:396]: DNS1: 0.0.0.0
[15:52:20][C][wifi:397]: DNS2: 0.0.0.0
[15:52:20][C][logger:357]: Logger:
[15:52:20][C][logger:358]: Level: DEBUG
[15:52:20][C][logger:359]: Log Baud Rate: 115200
[15:52:20][C][logger:361]: Hardware UART: UART0
[15:52:20][C][captive_portal:088]: Captive Portal:
[15:52:20][C][sntp:053]: SNTP Time:
[15:52:20][C][sntp:054]: Server 1: '0.pool.ntp.org'
[15:52:20][C][sntp:055]: Server 2: '1.pool.ntp.org'
[15:52:20][C][sntp:056]: Server 3: '2.pool.ntp.org'
[15:52:20][C][sntp:057]: Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[15:52:20][C][mdns:115]: mDNS:
[15:52:20][C][mdns:116]: Hostname: liczniki
[15:52:20][C][ota:097]: Over-The-Air Updates:
[15:52:20][C][ota:098]: Address: 192.168.1.10:8266
[15:52:20][C][ota:101]: Using Password.
[15:52:20][C][api:138]: API Server:
[15:52:20][C][api:139]: Address: 192.168.1.10:6053
[15:52:21][C][api:141]: Using noise encryption: YES
[15:52:21][C][wmbus:394]: wM-Bus v2.2.30:
[15:52:21][C][wmbus:396]: Clients:
[15:52:21][C][wmbus:398]: wmbusmeters: 10.0.0.1:7227 TCP [rtl-wmbus]
[15:52:21][C][wmbus:407]: LED:
[15:52:21][C][wmbus:408]: Pin: GPIO0
[15:52:21][C][wmbus:409]: Duration: 1000 ms
[15:52:21][C][wmbus:411]: CC1101 SPI bus:
[15:52:21][C][wmbus:412]: MOSI Pin: GPIO13
[15:52:21][C][wmbus:413]: MISO Pin: GPIO12
[15:52:21][C][wmbus:414]: CLK Pin: GPIO14
[15:52:21][C][wmbus:415]: CS Pin: GPIO2
[15:52:21][C][wmbus:416]: GDO0 Pin: GPIO5
[15:52:21][C][wmbus:417]: GDO2 Pin: GPIO4
[15:52:21][E][wmbus:430]: Check connection to CC1101!
Mój yaml:
esphome:
name: liczniki
friendly_name: Liczniki
includes:
- custom_components/apator.h
libraries:
- SPI
- "https://github.com/bblanchon/ArduinoJson.git"
- "https://github.com/LSatan/SmartRC-CC1101-Driver-Lib.git"
- "https://github.com/SzczepanLeon/wMbus-lib.git"
- "https://github.com/MariuszWoszczynski/Apator-meter-reader-core.git"
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "TKmoZKO4fPg0CvyA84LvM3aVb7H7F0ivMnYA76xt1qA="
ota:
password: "4a4fc227bc5245c40642d2980704aeff"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.10
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Probny-Do-Bramy Fallback Hotspot"
password: "XMshNmOGC04y"
captive_portal:
text_sensor:
- platform: custom
lambda: |-
auto textsensor = new MyTextSensor();
App.register_component(textsensor);
return {textsensor->my_text_sensor};
text_sensors:
- name: Meter ID #text
filters:
- to_upper:
sensor:
- platform: custom
lambda: |-
auto sensor = new MySensor();
App.register_component(sensor);
return {sensor->my_sensor_state};
sensors:
- name: Water meter state #float value
unit_of_measurement: L
accuracy_decimals: 0
# int ApatorID = 0x4829838;
Podpięte mam wszystko jak na poniższych obrazkach:
Sprawdziłem napięcia w kilku miejscach CC1101 i są miejsca gdzie napięcie jest inne niż zasilające więc moduł chyba działa.
Jako dodatek korzystam z tego https://github.com/SzczepanLeon/esphome-components#22-wmbus bo to od Mariusza (GitHub - MariuszWoszczynski/ESPhome-APATOR-2-meters-reader) mi nie działa (już nie pamiętam po czym to stwierdziłem).
Gdzie może być pies pogrzebany?