zibous / ha-watermeter Goto Github PK
View Code? Open in Web Editor NEWData provider for smartmeter watermeter.
License: GNU General Public License v3.0
Data provider for smartmeter watermeter.
License: GNU General Public License v3.0
Hi, thanks for this project - it is amazing.
I managed to get my Diehl IZAR Watermeter ID and can successfully decode the telegrams.
When I set up the device with the correct id (HEX) I get some data (battery life, alarm, etc..) but when I look at "Wasseruhr Anzeige" it says "NA".
However, when I take the telegram and decode it, I get my current reading correctly decoded.
I am using the ESP Home and HA integration - I get NA on the internal webpage as well as in home assistant.
Do I have to do some extra decoding steps to get those values?
Just checked the logs and see this:
[19:47:03]wMBus-lib: Processing T1 A frame
[19:47:12]wMBus-lib: Processing T1 A frame
[19:47:13]wMBus-lib: Processing T1 A frame
[19:47:13]wMBus-lib: Error during decoding '3 out of 6'
[19:47:13]wMBus-lib: Processing T1 A frame
It pops up every 5th to 10th T1 frame...
Hi Zibous,
thanks for your great work, I was interested to have my water flow meter visible on my domoticz, but no skills to do, you did so thanks for this.
I am near to success but I have this error about conversion or calculation:
pi@PiPortable:~ $ sudo /opt/ha-watermeter/app.py 2021-05-25 07:23:28,524 - INFO: ✔︎ Watermeter data application start (__main__:65) 2021-05-25 07:23:28,525 - DEBUG: ✔︎ Watermeter MQTT Client 192.168.15.207 (__main__:62) 2021-05-25 07:23:28,526 - INFO: ✔︎ Watermeter connect to MQTT Client 192.168.15.207, tele/IZAR/LWT (__main__:65) 2021-05-25 07:23:28,528 - ERROR: An unhandled exception occured: '<=' not supported between instances of 'str' and 'int'. Traceback: [<FrameSummary file /opt/ha-watermeter/app.py, line 151 in <module>>] (__main__:84)
My hardawre is a RPI3, I use Raspbian Buster, python version is 2.7.16
I am not an expert in Python, how can I can solve this issue, please?
Hi Peter,
First of all thanks for your incredible work in describing how gather data from a watermeter.
I successfully receive the data from wmbusmeters and now i try to get ha-watermenter working.
Unfortunately I get an exception when running it. I have traced it back to strptime in line 58 of calculator.py and printed the exception, see below:
time data '2020-11-14 00:53:58.746042' does not match format '%Y-%m-%dT%H:%M:%SZ'
Full log:
2020-11-14 00:54:20,185 - DEBUG: ✔︎ Message Id 5 published. (__main__:62)
2020-11-14 00:54:29,333 - INFO: ✔︎ MQTT Message received topic tele/wasser/verbrauch (__main__:65)
2020-11-14 00:54:29,334 - INFO: ✔︎ MQTT Publish state topic tele/IZAR/wasser/status (__main__:65)
2020-11-14 00:54:29,334 - DEBUG: Init calculator (lib.calculator:62)
2020-11-14 00:54:29,334 - DEBUG: ✔︎ Load previous data (lib.calculator:62)
2020-11-14 00:54:29,334 - INFO: ✔︎ get previous data from /home/pi/ha-watermeter/ha-watermeter/data/28580778.json (lib.calculator:65)
2020-11-14 00:54:29,334 - DEBUG: ✔︎ init previous data, datafile not found! (lib.calculator:62)
2020-11-14 00:54:29,334 - INFO: ✔︎ Start calculation (lib.calculator:65)
time data '2020-11-14 00:53:58.746042' does not match format '%Y-%m-%dT%H:%M:%SZ'
2020-11-14 00:54:29,334 - ERROR: Error on calculation (lib.calculator:71)
2020-11-14 00:54:29,334 - DEBUG: ✔︎ Message Id 6 published. (__main__:62)
Can you please help me fixing this?
Additionally i noticed that wmbusmeters sends json output in UTC time and not in local time. You seem to use the local timezone of the raspberry. In our case of Austria this means it is 1h off.
Isn't this an issue? Or do you convert this somewhere and I have not found it yet?
Thanks!
Hi Zibous,
Your program is really great!
I get the information from REST correctly.
However, I thought that it was possible to send water-meter information with mqtt. Do you have a yaml configuration example for MQTT ? (i'm not using Home Assistant ;))
Mickaël
Hi,
I've successfully installed and wired the Wemos D1 Mini + CC1101 on esphome and the wifi communication gives me some logs.
No error visible.
But I don't get any communication from my water sensor (izar rc 868 i r4, not the PL one, does it make a difference ?).
The water sensor is underground about 50cm, and the D1mini about 20m from it in the house (the closest it can be with wifi connected).
This communication is supposed to be 500m and/or 1500m range, so I guess it's fine even underground ?
Moreover, in the documentation of the wiring (https://github.com/zibous/ha-watermeter/blob/master/esphome/watermeter_d1mini.md), there is an inconsistency for the GD02 -> D1 and GD00 -> D2 which is not the same in the picture wiring (GD02 -> D2 and GD00 -> D1), so which one is right ? I even tried both without success.
Is there any way of checking if the CC1101 is working fine ?
Thanks for your help.
Cédric
Hi, sorry but I'm not clear on how to configure the webserver
Could you help me?
Even one example might suffice
thanks
Has anyone been successful in receiving data from a Diehl 171 meter whith ESPhome? Serial output doesn´t show any meter values.
I was able to read data out of the meter with wmbusmeters on a Raspberry:
Auto driver : hydrus
Best driver : topaseskr 17/19
Using driver : hydrus 00/00
000 : 3e length (62 bytes)
001 : 44 dll-c (from meter SND_NR)
002 : a511 dll-mfct (DME)
004 : 50570371 dll-id (71035750)
008 : 70 dll-version
009 : 07 dll-type (Water meter)
010 : 7a tpl-ci-field (EN 13757-3 Application Layer (short tplh))
011 : eb tpl-acc-field
012 : 00 tpl-sts-field (OK)(OK)
013 : 3005 tpl-cfg 0530 (AES_CBC_IV nb=3 cntn=0 ra=0 hc=0 )
015 : 2f2f already decrypted check bytes
"media":"water",
"meter":"hydrus",
"name":"",
"id":"71035750",
"flow_temperature_c":9.2,
"status":"OK",
"total_m3":11.377,
"total_at_date_m3":5.264,
"at_datetime":"2023-01-31 23:59",
"remaining_battery_life_y":14.039987,
"timestamp":"2023-02-26T11:52:44Z"
So I changed config.yaml, type to "hydrus". Does it load the right module then and if not, is it possible to include it?
sensor:
Thanks,
Gerhard
Hello ,
This project is compatibly with ESP32 SX1276?
Device link: Aliexpress
Also is it possible to confirm that my water meter is compatible?
Water Meter Images:
Best regards,
Paulo
I can see by the degree of code compilation that you are familiar with esphome. Is there any chance to make a universal configuration to select driver type, ID, Key from Home Assistant?
I tried to figure it out functionally from the ESPHome side and something worked, but I don't know how to substitute it for the sensors section (type: id(my_global_string).c_str() - don`t work)
Example for select driver and write ID:
- platform: template
name: "Meter type"
id: meter_type
optimistic: true
options:
- "apator162"
- "apator08"
- "izar"
- "hydrocalm3"
- "mkradio3"
- "mkradio4"
- "ultrimis"
- "unismart"
- "bmeters"
- "amiplus"
- "elf"
- "evo868"
- "fhkvdataiii"
initial_option: "izar"
set_action:
- globals.set:
id: my_global_string
value: !lambda 'return x.c_str();'
- logger.log:
format: "Wybrano licznik: %s"
args: ["x.c_str()"]
globals:
- id: my_global_string
type: std::string
restore_value: no
initial_value: '"izar"'
number:
- platform: template
name: "Meter ID (DEC)"
id: Meter_ID
mode: box
optimistic: true
min_value: 0
max_value: 99999999
step: 1
Hi.
This looks amazing, seem to support quite a lot of products already.
Any chance there is a possibility to add one more?
I have Integra Topas ES KR, which seems to support OMS standard (https://ch.integra-metering.com/product/topas-eskr/).
I would like to help to develop the support, just not sure what devices/HW do I need and how can I support the developers.
Hi,
I am new to ESPhome and found your project. I tried to follow the steps on your repository, but what do you mean with:
Where should I flash this? My ESPhome server is up and running and I copied the files into the docker directory. Maybe I missed there one step...
I also created the secrets file
The ID - I guess - is the Serialnumber of the watermeter DIEHL device, which is readable on the sticker?
What is as host required? the IP from the esphome board?
Thanks a lot for any help to get this running :-)
best regards,
Mark
Hi Zibous,
thanks for the great work on the watermeter.
My watermeter is counting up Wasser/h and Wasser/day.
Is there an issue in calculator.py?
current_dts = datetime.strptime(self.__checkPayload__('timestamp', now.strftime(DATEFORMAT_TIMESTAMP)), DATEFORMAT_TIMESTAMP)
previous_dts = datetime.strptime(self.__checkPayload__('timestamp', now.strftime(DATEFORMAT_TIMESTAMP)), DATEFORMAT_TIMESTAMP)
lastmonth_dts = datetime.strptime(self.__checkPayload__('last_month_measure_date', now.strftime(DATEFORMAT_DAY)), DATEFORMAT_DAY)
if (DEBUG_DATA == True):x
log.logger.warning("✔︎ Date current:{}, prevoius:{},last month:{}, last year:{} ".format(current_dts,previous_dts,lastmonth_dts, previous_dts.strftime(DATEFORMAT_YEAR)))
self.elapsed_time = current_dts - previous_dts`
self.elapsed_time = current_dts - previous_dts is allways "00:00:00"
hello
i have wmbus on pi but i want to make it with esp
thanks for your work all work i can show telegram but i need dme_07 driver for read value ?
Auto driver : dme_07
Best driver : c5isf 06/06
Using driver : dme_07 00/00
000 : 1e length (30 bytes)
001 : 44 dll-c (from meter SND_NR)
002 : a511 dll-mfct (DME)
004 : 31136083 dll-id (83601331)
008 : 7b dll-version
009 : 07 dll-type (Water meter)
010 : 7a tpl-ci-field (EN 13757-3 Application Layer (short tplh))
011 : 28 tpl-acc-field
012 : 00 tpl-sts-field (OK)
013 : 1005 tpl-cfg 0510 (AES_CBC_IV nb=1 cntn=0 ra=0 hc=0 )
015 : 2f2f decrypt check bytes (OK)
017 : 04 dif (32 Bit Integer/Binary Instantaneous value)
018 : 13 vif (Volume l)
019 C!: 43A70600 ("total_m3":436.035)
023 : 02 dif (16 Bit Integer/Binary Instantaneous value)
024 : FD vif (Second extension FD of VIF-codes)
025 : 17 vife (Error flags (binary))
026 C!: 0000 ("status":"OK")
028 : 2F skip
029 : 2F skip
030 : 2F skip
{
"media":"water",
"meter":"dme_07",
"name":"",
"id":"83601331",
"status":"OK",
"total_m3":436.035,
"timestamp":"2023-07-24T08:17:22Z"
}
thanks
Hi,
thanks for putting this together.
I'm trying to use the d1mini version.
I'm having some issues with compiling this.
I use the ESPHome addon in homeassistant and when I try to compile this, I'm getting the following error.
`In file included from /data/esp_wmbus/.piolibdeps/esp_wmbus/wMbus-lib/rf_mbus.cpp:6:
/data/esp_wmbus/.piolibdeps/esp_wmbus/wMbus-lib/tmode_rf_settings.hpp:8:10: fatal error: ELECHOUSE_CC1101_SRC_DRV.h: No such file or directory
8 | #include <ELECHOUSE_CC1101_SRC_DRV.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [/data/esp_wmbus/.pioenvs/esp_wmbus/lib521/wMbus-lib/rf_mbus.cpp.o] Error 1
========================= [FAILED] Took 52.25 seconds =========================`
Can you please help me?
Hi,
I successfully followed your installation instructions and managed to use your recommended solution (ESPHome + AZDelivery ESP32 Dev Kit C V4 + CC1101), to read the consumption of my Diehl IZAR RC I R4 meter.
However I have an issue with reading my IZAR meter, which is located under a cast-iron cover on the road just in front of the house (5 meters).
When the cast-iron cover is open, I can read the meter, but when the cover is closed, no signal is detected by the meter.
What can I do to improve the signal and able to read my water consumption (with the cast-iron cover closed)
Thank you for your help and kind regards.
Hi,
i installed a local esphome in a docker and downloaded files.
i edited secret.yaml (not sure if right)
added 3 times same
then took wm-esp32-test.yaml
tried a lot of flashing options - now local windows tool:
Using 'COM3' as serial port.
Connecting......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting......
Detecting chip type... ESP32
Connecting.....
Chip Info:
- Chip Family: ESP32
- Chip Model: ESP32-D0WD (revision 1)
- Number of Cores: 2
- Max CPU Frequency: 240MHz
- Has Bluetooth: YES
- Has Embedded Flash: NO
- Has Factory-Calibrated ADC: YES
- MAC Address: 94:3C:C6:37:60:F0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
- Flash Size: 4MB
- Flash Mode: dio
- Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Using 'COM3' as serial port.
Writing at 0x000fa45b... (100 %)Wrote 972208 bytes (631308 compressed) at 0x00010000 in 16.3 seconds (effective 477.6 kbit/s)...
Hash of data verified.
Leaving...
Hard Resetting...
Hard resetting via RTS pin...
Done! Flashing is complete!
Showing logs:
[23:35:15]x[23:35:15]configsip: 0, SPIWP:0xee
[23:35:15]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[23:35:15]mode:DIO, clock div:2
[23:35:15]load:0x3fff0018,len:4
[23:35:15]load:0x3fff001c,len:1044
[23:35:15]load:0x40078000,len:8896
[23:35:15]load:0x40080400,len:5828
[23:35:15]entry 0x400806ac
[23:35:15][ 6][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[23:35:15][ 36][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[23:35:16][ 184][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[23:35:16][ 184][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[23:35:21][ 6009][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 3
[23:35:21][ 6009][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:35:28][ 13010][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 129, Status: 0, Results: 2
[23:35:28][ 13011][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:35:35][ 20111][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 130, Status: 0, Results: 3
[23:35:35][ 20112][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:35:43][ 27212][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 131, Status: 0, Results: 3
[23:35:43][ 27213][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:35:50][ 34313][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 132, Status: 0, Results: 3
[23:35:50][ 34314][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:35:57][ 41414][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 133, Status: 0, Results: 3
[23:35:57][ 41415][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:36:04][ 48616][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 134, Status: 0, Results: 6
[23:36:04][ 48616][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[23:36:04][ 48634][V][WiFiGeneric.cpp:341] _arduino_event_cb(): STA Stopped
[23:36:04][ 48635][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 3 - STA_STOP
[23:36:09][ 53744][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[23:36:09][ 53748][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[23:36:09][ 53751][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[23:36:11][ 55933][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 135, Status: 0, Results: 5
[23:36:11][ 55934][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
Hi everyone
I would like to ask you some information
I followed this project.
wmbusmeters hears nothing except 169Mhz telegrams in n mode.
It's probably the electricity meter.
I don't need this meter but I would like to read the water and gas meters.
These meters probably transmit at 430Mhz.
They probably only send a few telegrams monthly.
So I would like to put wmbusmeters to listen to all telegrams transmitted at 430Mhz and send them to MQTT.
Then I write a python job that goes to MQTT and if it finds something it saves these telegrams somewhere, so I can easily check offline.
Is it possible to put wmbusmeters in this generic reading mode?
If so, can you tell me how?
Thanks in advance.
I apologize for my English which is probably not perfect.
Maurizio
Hi @zibous!
Thanks for this work/tuto, this works like a charm!
Actually, this worked like a charm for months... But since I wanted to add a case for everything, the ESP seems to be corrupted. My soldering was quite poor for the external antena and it just broke. I made a new one and then...
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
E (23870) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (23870) task_wdt: - loopTask (CPU 1)
E (23870) task_wdt: Tasks currently running:
E (23870) task_wdt: CPU 0: IDLE
E (23870) task_wdt: CPU 1: loopTask
E (23870) task_wdt: Aborting.
abort() was called at PC 0x40103a48 on core 0
Backtrace:0x40083915:0x3ffbe9cc |<-CORRUPTED
ELF file SHA256: 0000000000000000
Rebooting...
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
It reboots all the time.
I've checked my soldering, made new ones, changes the CC1101.
Interesting point is that when I remove 3v3 for the CC1101, boot loops stop.
Any idea on how to fix this?
Thanks 🙏
Hi @zibous,
Tell me if you want me to open a new issue.
I've received and tested a new E07-900MBL-01 rev v.1.1 to replace the CC1101 cards, tested 2 ESP32, and I still got the corruptions.
After some investigations, they only appear when calling
wmbus:
mosi_pin: GPIO23 ## SI: braun 3: MOSI Attached to Hardware SPI controller MOSI SPI Interface
miso_pin: GPIO19 ## SO: grün 5: MISO Attached to Hardware SPI controller MISO SPI Interface
clk_pin: GPIO18 ## SCLK: violett 4: SCK Attached to Hardware SPI controller CLK
cs_pin: GPIO05 ## CSN: orange 8: CSN Attached to Hardware SPI controller
gdo0_pin: GPIO16 ## GD00: gelb 7: RX Clock output. High Impedance !
gdo2_pin: GPIO17 ## GD02: weiss 6: TX FIFO status signals. High Impedance !
log_unknown: False
I've built the testing code with Web ESP Home and from Docker container, then it can't be related to the compiler.
The pins are good, are I've tested providing power to the network card by the integrated USB or from 3.3V of ESP32.
Cables are all brand new too.
By any chance, may you have another idea?
Originally posted by @Flow76320 in #21 (comment)
Hi,
Thanks for your repo, i have managed to go quite a long way, but I seem to be stuck at the very frustrating last step to send the decoded telegram water volume number to HA.
So i ran the test to find my meter. It was successful, and I identified the following log entry:
[20:36:15][D][wmbus:188]: Meter ID [*0x6426068B*] RSSI: -51 dBm LQI: 129 Mode: T1 not found in configuration T: 1E4424238B06266408497A880010D264831C4D6C4CCD7EBE27703C53B20068 (31)
Which gets decoded successfully on wmbusmeters.org as follows:
Auto driver : hydrus
Best driver : topaseskr 10/10
Using driver : topaseskr 00/00
000 : 1e length (30 bytes)
001 : 44 dll-c (from meter SND_NR)
002 : 2423 dll-mfct (HYD)
004 : 26640849 dll-id (49086426)
008 : 8b dll-version
009 : 06 dll-type (Warm Water (30°C-90°C) meter)
010 : 7a tpl-ci-field (EN 13757-3 Application Layer (short tplh))
011 : 88 tpl-acc-field
012 : 00 tpl-sts-field (OK)
013 : 10d2 tpl-cfg d210 (bidirectional accessibility SPECIFIC_16_31 )
015 : 04 dif (32 Bit Integer/Binary Instantaneous value)
016 : 13 vif (Volume l)
017 C!: A5B10400 ("total_m3":307.621)
021 : 42 dif (16 Bit Integer/Binary Instantaneous value storagenr=1)
022 : 6C vif (Date type G)
023 C!: FF2C ("meter_year_period_start_date":"2023-12-31")
025 : 44 dif (32 Bit Integer/Binary Instantaneous value storagenr=1)
026 : 13 vif (Volume l)
027 C!: 7EAF0400 ("volume_year_period_m3":307.07)
{
"media":"warm water",
"meter":"topaseskr",
"name":"",
"id":"49086426",
"total_m3":307.621,
"volume_year_period_m3":307.07,
"meter_year_period_start_date":"2023-12-31",
"timestamp":"2024-01-04T06:47:02Z"
}
Using: wmbusmeters: 1.14.0-48-gc4b9f0d
c4b9f0d10477cb6bb2472e1f2de5eb08ba42e7c4
Now the MeterID 49086426
is also what is on the sticker of the meter. So I assume it is decimal.
My esphome yaml is as follows:
sensor:
- platform: wmbus
meter_id: 49086426
key: ""
type: topaseskr
add_prefix: false
total_water_m3:
name: "Watermeter display"
id: "waterdisplay"
unit_of_measurement: "m³"
state_class: total_increasing
device_class: "water"
accuracy_decimals: 3
icon: mdi:counter
Now I have tried the same with MeterID: 0x6426068B (From the log above). MeterID: 49086426 (Decimal ID on sticker) and MeterID: 0x2ECFFDA (The Hex conversion of the sticker ID).
I went through https://github.com/SzczepanLeon/esphome-components/issues/6 which made me go through various options.
I have tried drivers topaseskr and hydrus as the two suggeted in wmbusmeters.org which both decode successfully.
But I cannot see why I always get "unknown" for the sensor:
Is there something I am missing, is there something which could be wrong (bug) with the driver or wmbus component for this meter ?
I've done this step:
Install wm-esp32_test.yaml To find the watermeterId you can set the watermeterId to 0 and the log_level: "VERBOSE" to find your meterId.
see log messages to find your watermeterID
but I cannot see watermeterID
in my logs:
NFO ESPHome 2023.8.2
INFO Reading configuration /config/esphome/esphome-web-988b80.yaml...
INFO Updating https://github.com/SzczepanLeon/esphome-components.git@main
INFO Starting log output from water-meter-esp.local using esphome API
INFO Successfully connected to water-meter-esp.local
[19:52:15][I][app:102]: ESPHome version 2023.8.2 compiled on Sep 4 2023, 19:39:45
[19:52:15][I][app:104]: Project Diehl_IZAR_RC_868.Watermeter version 2.0.7
[19:52:15][C][wifi:543]: WiFi:
[19:52:15][C][wifi:379]: Local MAC: redacted
[19:52:15][C][wifi:380]: SSID: [redacted]
[19:52:15][C][wifi:381]: IP Address: redacted
[19:52:15][C][wifi:383]: BSSID: [redacted]
[19:52:15][C][wifi:384]: Hostname: 'water-meter-esp'
[19:52:15][C][wifi:386]: Signal strength: -56 dB ▂▄▆█
[19:52:15][V][wifi:388]: Priority: 1.0
[19:52:15][C][wifi:390]: Channel: redacted
[19:52:15][C][wifi:391]: Subnet: redacted
[19:52:15][C][wifi:392]: Gateway: redacted
[19:52:15][C][wifi:393]: DNS1: redacted
[19:52:15][C][wifi:394]: DNS2: 0.0.0.0
[19:52:15][C][logger:301]: Logger:
[19:52:15][C][logger:302]: Level: VERBOSE
[19:52:15][C][logger:303]: Log Baud Rate: 0
[19:52:15][C][logger:305]: Hardware UART: UART0
[19:52:15][C][logger:309]: Level for 'wmbus': DEBUG
[19:52:15][C][logger:309]: Level for 'wMBus-lib': DEBUG
[19:52:15][C][template.sensor:022]: Template Sensor 'Device Boot counter'
[19:52:15][C][template.sensor:022]: State Class: 'measurement'
[19:52:15][C][template.sensor:022]: Unit of Measurement: ''
[19:52:15][C][template.sensor:022]: Accuracy Decimals: 0
[19:52:15][C][template.sensor:022]: Icon: 'mdi:counter'
[19:52:15][C][template.sensor:023]: Update Interval: 60.0s
[19:52:15][C][template.switch:068]: Template Switch 'Device Boot Counter reset'
[19:52:15][C][template.switch:091]: Restore Mode: always OFF
[19:52:15][C][template.switch:057]: Optimistic: NO
[19:52:16][C][safe_mode_switch:068]: Safe Mode Switch 'Device Restart (Safe Mode)'
[19:52:16][C][safe_mode_switch:070]: Icon: 'mdi:restart-alert'
[19:52:16][C][safe_mode_switch:091]: Restore Mode: always OFF
[19:52:16][C][restart:068]: Restart Switch 'Restart'
[19:52:16][C][restart:070]: Icon: 'mdi:restart'
[19:52:16][C][restart:091]: Restore Mode: always OFF
[19:52:16][C][factory_reset.switch:068]: Factory Reset Switch 'Device Restart Factory'
[19:52:16][C][factory_reset.switch:070]: Icon: 'mdi:restart-alert'
[19:52:16][C][factory_reset.switch:091]: Restore Mode: always OFF
[19:52:16][C][copy.sensor:015]: Copy Sensor 'Device WLAN Signal'
[19:52:16][C][copy.sensor:015]: Device Class: 'signal_strength'
[19:52:16][C][copy.sensor:015]: State Class: 'measurement'
[19:52:16][C][copy.sensor:015]: Unit of Measurement: '%'
[19:52:16][C][copy.sensor:015]: Accuracy Decimals: 0
[19:52:16][C][captive_portal:088]: Captive Portal:
[19:52:16][C][backup:033]: Backup:
[19:52:16][C][backup:034]: URL path is /config.yaml
[19:52:16][C][backup:036]: Basic authentication enabled
[19:52:16][C][web_server:161]: Web Server:
[19:52:16][C][web_server:162]: Address: water-meter-esp.local:80
[19:52:16][C][sntp:053]: SNTP Time:
[19:52:16][C][sntp:054]: Server 1: '0.at.pool.ntp.org'
[19:52:16][C][sntp:055]: Server 2: '0.pool.ntp.org'
[19:52:16][C][sntp:056]: Server 3: '1.pool.ntp.org'
[19:52:16][C][sntp:057]: Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[19:52:16][C][mdns:112]: mDNS:
[19:52:16][C][mdns:113]: Hostname: water-meter-esp
[19:52:16][V][mdns:114]: Services:
[19:52:16][V][mdns:116]: - _esphomelib, _tcp, 6053
[19:52:16][V][mdns:118]: TXT: version = 2023.8.2
[19:52:16][V][mdns:118]: TXT: mac = redacted
[19:52:16][V][mdns:118]: TXT: platform = ESP32
[19:52:16][V][mdns:118]: TXT: board = az-delivery-devkit-v4
[19:52:16][V][mdns:118]: TXT: network = wifi
[19:52:16][V][mdns:118]: TXT: api_encryption = Noise_NNpsk0_25519_ChaChaPoly_SHA256
[19:52:16][V][mdns:118]: TXT: project_name = Diehl_IZAR_RC_868.Watermeter
[19:52:16][V][mdns:118]: TXT: project_version = 2.0.7
[19:52:16][V][mdns:116]: - _http, _tcp, 80
[19:52:16][C][ota:093]: Over-The-Air Updates:
[19:52:16][C][ota:094]: Address: water-meter-esp.local:3232
[19:52:16][C][ota:097]: Using Password.
[19:52:16][C][api:138]: API Server:
[19:52:16][C][api:139]: Address: water-meter-esp.local:6053
[19:52:16][C][api:141]: Using noise encryption: YES
[19:52:16][C][wifi_signal.sensor:009]: WiFi Signal 'wifi_signal_db'
[19:52:16][C][wifi_signal.sensor:009]: Device Class: 'signal_strength'
[19:52:16][C][wifi_signal.sensor:009]: State Class: 'measurement'
[19:52:16][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm'
[19:52:16][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
[19:52:16][V][wifi_signal.sensor:009]: Unique ID: redacted
[19:52:16][C][wmbus:394]: wM-Bus v2.2.29:
[19:52:16][C][wmbus:411]: CC1101 SPI bus:
[19:52:16][C][wmbus:412]: MOSI Pin: GPIO23
[19:52:16][C][wmbus:413]: MISO Pin: GPIO19
[19:52:16][C][wmbus:414]: CLK Pin: GPIO18
[19:52:16][C][wmbus:415]: CS Pin: GPIO5
[19:52:16][C][wmbus:416]: GDO0 Pin: GPIO16
[19:52:16][C][wmbus:417]: GDO2 Pin: GPIO17
[19:52:16][C][wmbus:424]: Available drivers: amiplus, apator08, apator162, apatoreitn, bmeters, c5isf, compact5, dme07, elf, evo868, fhkvdataiii, hydrocalm3, hydrus, iperl, itron, izar, mkradio3, mkradio4, qheat, qwater, sharky774, topaseskr, ultrimis, unismart, vario451
[19:52:16][C][wmbus:442]: Meter:
[19:52:16][C][wmbus:443]: ID: 0 [0x00000000]
[19:52:16][C][wmbus:444]: Type: izar
[19:52:16][C][wmbus:445]: Mode: T1
[19:52:16][C][wmbus:446]: Key: ''
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter current alarm code'
[19:52:16][C][wmbus:448]: State Class: ''
[19:52:16][C][wmbus:448]: Unit of Measurement: ''
[19:52:16][C][wmbus:448]: Accuracy Decimals: 0
[19:52:16][C][wmbus:448]: Icon: 'mdi:alarm-light'
[19:52:16][C][wmbus:448]: Sensor '0x00 Water current month'
[19:52:16][C][wmbus:448]: Device Class: 'water'
[19:52:16][C][wmbus:448]: State Class: 'total_increasing'
[19:52:16][C][wmbus:448]: Unit of Measurement: 'L'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 2
[19:52:16][C][wmbus:448]: Icon: 'mdi:water'
[19:52:16][C][wmbus:448]: Sensor '0x00 Water last month'
[19:52:16][C][wmbus:448]: Device Class: 'water'
[19:52:16][C][wmbus:448]: State Class: 'total_increasing'
[19:52:16][C][wmbus:448]: Unit of Measurement: 'm³'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 3
[19:52:16][C][wmbus:448]: Icon: 'mdi:counter'
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter CC1101 LQI'
[19:52:16][C][wmbus:448]: Device Class: 'signal_strength'
[19:52:16][C][wmbus:448]: State Class: 'measurement'
[19:52:16][C][wmbus:448]: Unit of Measurement: 'lqi'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 0
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter pervious alarm code'
[19:52:16][C][wmbus:448]: State Class: ''
[19:52:16][C][wmbus:448]: Unit of Measurement: ''
[19:52:16][C][wmbus:448]: Accuracy Decimals: 0
[19:52:16][C][wmbus:448]: Icon: 'mdi:alarm-light'
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter Battery Life'
[19:52:16][C][wmbus:448]: State Class: 'measurement'
[19:52:16][C][wmbus:448]: Unit of Measurement: 'Years'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 2
[19:52:16][C][wmbus:448]: Icon: 'mdi:battery'
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter CC1101 RSSI'
[19:52:16][C][wmbus:448]: Device Class: 'signal_strength'
[19:52:16][C][wmbus:448]: State Class: 'measurement'
[19:52:16][C][wmbus:448]: Unit of Measurement: '%'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 0
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter Display'
[19:52:16][C][wmbus:448]: Device Class: 'water'
[19:52:16][C][wmbus:448]: State Class: 'total_increasing'
[19:52:16][C][wmbus:448]: Unit of Measurement: 'm³'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 3
[19:52:16][C][wmbus:448]: Icon: 'mdi:counter'
[19:52:16][C][wmbus:448]: Sensor '0x00 Watermeter transmit periode'
[19:52:16][C][wmbus:448]: State Class: 'measurement'
[19:52:16][C][wmbus:448]: Unit of Measurement: 'sec'
[19:52:16][C][wmbus:448]: Accuracy Decimals: 2
[19:52:16][C][wmbus:448]: Icon: 'mdi:timelapse'
[19:52:42][V][sensor:043]: 'wifi_signal_db': Received new state -56.000000
[19:52:42][D][sensor:094]: 'wifi_signal_db': Sending state -56.00000 dBm with 0 decimals of accuracy
[19:52:42][V][sensor:043]: 'Device WLAN Signal': Received new state -56.000000
[19:52:42][D][sensor:094]: 'Device WLAN Signal': Sending state 88.00000 % with 0 decimals of accuracy
[19:52:42][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[19:52:42][V][json:056]: Size after shrink 80 bytes
[19:53:11][V][sensor:043]: 'Device Boot counter': Received new state 2.000000
[19:53:11][D][sensor:094]: 'Device Boot counter': Sending state 2.00000 with 0 decimals of accuracy
[19:53:11][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[19:53:11][V][json:056]: Size after shrink 80 bytes
[19:53:42][V][sensor:043]: 'wifi_signal_db': Received new state -59.000000
[19:53:42][D][sensor:094]: 'wifi_signal_db': Sending state -59.00000 dBm with 0 decimals of accuracy
[19:53:42][V][sensor:043]: 'Device WLAN Signal': Received new state -59.000000
[19:53:42][D][sensor:094]: 'Device WLAN Signal': Sending state 82.00000 % with 0 decimals of accuracy
[19:53:42][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[19:53:42][V][json:056]: Size after shrink 80 bytes
[19:54:11][V][sensor:043]: 'Device Boot counter': Received new state 2.000000
[19:54:11][D][sensor:094]: 'Device Boot counter': Sending state 2.00000 with 0 decimals of accuracy
[19:54:11][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[19:54:11][V][json:056]: Size after shrink 80 bytes
[19:54:42][V][sensor:043]: 'wifi_signal_db': Received new state -57.000000
[19:54:42][D][sensor:094]: 'wifi_signal_db': Sending state -57.00000 dBm with 0 decimals of accuracy
[19:54:42][V][sensor:043]: 'Device WLAN Signal': Received new state -57.000000
[19:54:42][D][sensor:094]: 'Device WLAN Signal': Sending state 86.00000 % with 0 decimals of accuracy
[19:54:42][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[19:54:42][V][json:056]: Size after shrink 80 bytes
[19:55:11][V][sensor:043]: 'Device Boot counter': Received new state 2.000000
[19:55:11][D][sensor:094]: 'Device Boot counter': Sending state 2.00000 with 0 decimals of accuracy
[19:55:11][V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[19:55:11][V][json:056]: Size after shrink 80 bytes
Any advice of what else I can investigate?
I was wondering if my soldering was correct, can that be verified from the logs?
Perhaps I need to get closer to the water meter?
I am having a few different issues trying to use this project, I am new to using github, sorry if having the issues together is incorrect usage.
I am using Hass.io Home assistant on a Raspberry Pi 3. I have a bunch of devices added to home assistant and it seems to be functioning normally.
I bought the blue dvb-t dongle pictured. Plugged into the PI, the pi can see it is plugged in but lsusb does not identify it:
Bus 001 Device 004: ID 0bda:2838 (nothing displayed after this)
dmesg shows:
Product: RTL2838UHIDIR
Manufacturer: Realtek
I managed to install the development stuff and rtl-sdr and ran into 2 further issues:
Is there any further instructions on how to use a RTL2838 instead of the RTL2832 when using Hass.io version of Home assistant?
Thank you.
Hello,
I cloned the repository and added this YAML file to my ESPHome Docker container in the /config directory:
https://raw.githubusercontent.com/zibous/ha-watermeter/master/esphome/wm-esp32.yaml
Whenever I try to install it and choose the "Plug into this computer" option, during the download preparation, I receive the following output:
INFO ESPHome 2023.10.6
INFO Reading configuration /config/wm-esp32.yaml...
INFO Updating https://github.com/SzczepanLeon/esphome-components.git@main
WARNING GPIO5 is a Strapping PIN and should be avoided.
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
Failed config
script: [source /config/wm-esp32.yaml:532]
- id: set_status_message
then:
- lambda: |-
int msgcode = int(id(cc1101_state));
std::string message = id(cc1101_state_message)[msgcode];
ESP_LOGD("wmbus", "cc1101 state message: %s, error code: %d", message.c_str(), msgcode);
id(watermeter_status_message).publish_state(message);
- id: post_device_state
then:
- if:
condition:
lambda: return "false =='true'";
then:
- logger.log:
tag: system
level: INFO
format: Post new data to the <redacted>water-meter-esp, service enabled: false
- http_request.post:
URL must have a URL scheme and host.
url: <redacted>/water-meter-esp
verify_ssl: False
headers:
Content-Type: application/json
json: |-
root["device"] = "water-meter-esp";
root["waterdisplay"] = id(waterdisplay).state;
root["current"] = id(id(watercurrent)).state;
root["hour"] = id(waterhour).state;
root["day"] = id(waterday).state;
root["yesterday"] = id(wateryesterday).state;
root["week"] = id(waterweek).state;
root["month"] = id(watermonth).state;
root["lastmonth"] = id(waterhour).state;
root["year"] = id(wateryear).state;
root["bootcounter"] = id(bootcounter).state;
root["version"] = "water-meter-esp 2.0.9";
root["time"] = id(time_sntp).now().strftime("%Y-%m-%d %H:%M:%S");
on_response:
then:
- lambda: |-
if (status_code == 200) {
ESP_LOGI ("system", "HTTP POST o.k");
} else {
ESP_LOGI ("system", "HTTP POST failed");
}
How can i solve that, and as i have a cold and warm meter how can i monitor both values?
Current code in the lambda that builds the alarm message (and previous alarm message) is wrong.
int error_code = int(x);
std::string message = id(alarm_error_text)[error_code];
id(watermeter_alarm_message).publish_state(message);
if(error_code==0){
ESP_LOGD("wmbus", "Alarm message: %s, error code: %d", message.c_str(), error_code);
}else{
ESP_LOGW("wmbus", "WARNING Alarm message: %s, error code: %d", message.c_str(), error_code);
id(watermeter_alarm_timestamp).publish_state(id(time_sntp).now().strftime("%Y-%m-%dT%H:%M:%S %Z").c_str());
}
It uses the returned watermeter_current_alarms
directly but this value is built using binary flags (see here) so it can contain multiple errors and, more serious, it values goes from 0 to 1023 which will cause an overflow on the alarm_error_text
array.
Here is the quick fix I applied for my usage:
int error_code = int(x);
std::string message = "";
if(error_code==0){
message = id(alarm_error_text)[error_code];
id(watermeter_alarm_message).publish_state(message);
ESP_LOGD("wmbus", "Alarm message: %s, error code: %d", message, error_code);
}
else{
for (int i = 1; i < 10; ++i) {
if (error_code & (1 << i)) {
if (!message.empty()) {
message += ", ";
}
message += id(alarm_error_text)[i];
}
}
id(watermeter_alarm_message).publish_state(message);
ESP_LOGW("wmbus", "WARNING Alarm message: %s, error code: %d", message.c_str(), error_code);
id(watermeter_alarm_timestamp).publish_state(id(time_sntp).now().strftime("%Y-%m-%dT%H:%M:%S %Z").c_str());
}
Habe nun das Problem, dass alle drei Webserver Versionen nicht richtig klappen.
Oft ist er gar nicht erreichbar, obwohl der ESP Daten zu meinem IOBroker sendet.
Und Werte werden im Webserver gar nicht angezeigt.
Habe die Date Esp32_simple geflascht. Die volle Version klappt nicht. Da scheint irgendwo ein Fehler vorhanden zu sein.
Hallo,
i cannot compile the version 2.0.7:
With the wm-esp32-test i have the following issues:
esphome: None
name: water-meter-esp
comment: |-
Wasserzähler ESP32, CUL - CC1101, IZAR module (Diehl IZAR RC 868 I R4 PL (SzczepanLeon) - all watermeters
project:
name: Diehl_IZAR_RC_868.Watermeter
version: 2.0.7
build_path: ./build/water-meter-esp
on_boot:
- priority: 200.0
then:
- globals.set:
id: boot_counter
value: !lambda |-
return id(boot_counter)+=1;
- globals.set:
Couldn't find ID 'send_millisecond'. Please check you have defined an ID with that name in your configuration.
Do i need to install the regular one (wm-esp32) before?
with this i have the following issue:
/config/esphome/wm-esp32.yaml: In lambda function:
/config/esphome/wm-esp32.yaml:700:14: error: '$' was not declared in this scope
if ( ${service_enabled} == true){
^
/config/esphome/wm-esp32.yaml:700:15: error: expected ')' before '{' token
if ( ${service_enabled} == true){
^
)
Compiling .pioenvs/water-meter-esp/libb0f/WiFiClientSecure/WiFiClientSecure.cpp.o
Compiling .pioenvs/water-meter-esp/libb0f/WiFiClientSecure/esp_crt_bundle.c.o
Compiling .pioenvs/water-meter-esp/libb0f/WiFiClientSecure/ssl_client.cpp.o
Compiling .pioenvs/water-meter-esp/lib2f0/HTTPClient/HTTPClient.cpp.o
*** [.pioenvs/water-meter-esp/src/main.cpp.o] Error 1
And with the simple i have the following issue:
build_path: ./build/water-meter-esp
on_boot:
- priority: -100.0
then:
- globals.set:
id: boot_counter
value: !lambda |-
return id(boot_counter)+=1;
- globals.set:
id: send_millisecond
value: !lambda |-
return millis();
- logger.log:
level: WARN
tag: system
format: BOOTMESSAGE:water-meter-esp API is connected, Device ready!
- component.update: bootcounter
- priority: 800
then:
- logger.log:
level: WARN
tag: system
format: |-
BOOTMESSAGE:water-meter-esp hardware initialization of vital components is executed
-
Unable to find action with the name 'text_sensor.template.publish'.
text_sensor.template.publish:
I added every some credential where necessary, commented out the SYSLOG SERVICE, i deleted the additional WLANs, removed the WIFI domain and updated the Secrets.yaml (with blank wmbusmeters data, service target, and syslog)
I am really new to this stuff, and i am totally clueless,..
Thanks i advance
wasty
Edit:
I added from the wm-esp32 the part with the global "send_millisecond" and it compiled! but i do not get a connection
INFO Resolving IP address of water-meter-esp.local
ERROR Error resolving IP address of water-meter-esp.local. Is it connected to WiFi?
ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips)
ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname
But wifi connection works
Running on latest github version output.json:
"name": "Woda Dom",
"device": "watermeter",
"deviceid": "4113f6d2",
"date": "2022-02-08",
"time": "08:04:10",
"total_m3": 241.298,
"ratio": 1.01,
"m3": {
**"current": 0.0,**
**"hour": 241.298,**
**"day": 241.298,**
"month": 1.31,
"year": 123.568
},
"liter": {
**"current": 0.0,**
**"hour": 241298.0,**
**"day": 241298.0,**
"month": 1310.0,
"year": 123568.0
},
"last_total": {
"hour": "2020-14-09",
"hour_m3": 0.0,
"day": "2020-07-14",
"day_m3": 0.0,
"month": "2022-01",
"month_m3": 239.988,
"year": "2019-12-31",
"year_m3": 117.73
},
"wmbusmeter": {
"media": "water",
"meter": "izar",
"name": "watermeter",
"id": "4113f6d2",
"prefix": "C18SB",
"serial_number": "085586",
"total_m3": 241.298,
"last_month_total_m3": 239.988,
"last_month_measure_date": "2022-01-31",
"remaining_battery_life_y": 7,
"current_alarms": "underflow",
"previous_alarms": "no_alarm",
"transmit_period_s": 8,
"manufacture_year": "2018",
"timestamp": "2022-02-08T08:04:10Z",
"device": "rtlwmbus[00000001]",
"rssi_dbm": 123
},
"alarm": "underflow",
"last_alarm": "no_alarm",
"periode": "2022-02-08",
"month": "2022-02",
"year": "2022-02",
"timestamp": "2022-02-08T08:04:10Z",
"last_update": "2022-02-08 09:04:10.115986",
"elapsed_time": "0:00:00",
"icon": "mdi:billboard",
"unit_of_measurement": "\u33a5",
"last_reset": "1970-01-01T00:00:00+00:00",
"state_class": "measurement",
"device_class": "energy",
"version": "1.0.3",
"attribution": "Data provided by Peter Siebler",
"data_provider": "lejbek1"
}
I'm not python expert but from my understanding code looks OK. Dont know where is an issue...
Config from config,py:
#date and time formats
DATEFORMAT_TIMESTAMP = '%Y-%m-%dT%H:%M:%SZ'
DATEFORMAT_CURRENT = '%Y-%m-%d %H:%M:%S.%f'
DATEFORMAT_HOUR = '%H'
DATEFORMAT_DAY = '%Y-%m-%d'
DATEFORMAT_MONTH = '%Y-%m'
DATEFORMAT_YEAR = '%Y-%m'
TIME_FORMAT = '%H:%M:%S'
#application settings
SMARTMETER_ID = '4113f6d2' # internal used smartmeter identification
SMARTMETER_NAME = 'Woda Dom' # Name of the smartmeter
APPS_VERSION = '1.0.3' # Application version
#Datafile, if defined every hour the data will be stored as csv to this location
DATAFILE = os.path.join(os.path.dirname(file), 'data/' + SMARTMETER_ID + ".json")
#Reportfile, if defined every end of month data will be saved to this location
DAYREPORTFILE = os.path.join(os.path.dirname(file), 'data/' + SMARTMETER_ID + "-day-report.csv")
#Reportfile, if defined every end of month data will be saved to this location
REPORTFILE = os.path.join(os.path.dirname(file), 'data/' + SMARTMETER_ID + "-report.csv")
#all for the mqtt brocker
MQTT_HOST = '192.168.1.192' # mqtt brocker host ! must be a string
MQTT_PORT = 1883 # mqtt brocker port ! must be a number
MQTT_APPID = '' # mqtt brocker user name
MQTT_PASSWORD = '***' # mqtt brocker user password
MQTT_KEEPALIVE = 60 # mqtt brocker keep alive time
#all topic settings
#test: mosquitto_sub -h localhost -p 1883 -u 'pi' -P 'raspberry' -v -t 'tele/wasser/verbrauch'
MQTT_TOPIC = 'tele/wasser/verbrauch' # listen to this wmbusmeters topic
#all application publish topics
MQTT_TOPIC_NAME = 'IZAR'
MQTT_PUBLISH_TOPIC = 'tele/' + MQTT_TOPIC_NAME + '/wasser' # used for publishing new data
MQTT_STATE_TOPIC = 'tele/' + MQTT_TOPIC_NAME + '/wasser/status' # mqtt state topic
MQTT_AVAILABILITY_TOPIC = 'tele/' + MQTT_TOPIC_NAME + '/LWT' # mqtt availability topic Online | Offline
MQTT_ENABLE_LOGGING = False # enable | disable debug logging mqtt
#switch logging
LOG_LEVEL = 10 # DEBUG: 10
#LOG_LEVEL = 20 # INFO: 20
#LOG_LEVEL = 30 # WARNING: 30
#LOG_LEVEL = 40 # ERROR: 40
#LOG_LEVEL = 50 # CRITICAL: 50
#LOG_LEVEL = 100 # DISABLED: 100
LOG_DIR = './logs/'
#write summary data to console
DATALOG_ENABLED = True # enable True | False, writes datalog to console
DATALOG_FILENAME = './logs/data.csv' # output folder for data log
data.csv file doesn't create as well i don't see any datalog on console too
Hello,
i use a Raspberry Pi with Raspbian OS Lite 32bit and followed the steps here to build the wmbusmeters.
But i get the error
src/xmq.c:39:9: fatal error: libxml/tree.h: No such file or directory
39 | #include<libxml/tree.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:151: build/xmq.o] Error 1
Any idea how to fix this build error?
pi@raspberrypi:~/wmbusmeters $ make && make test
New version number generates new build/version.h
Building 1.14.0-37-g6f0773a
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/aes.cc -c -E > build/aes.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/aes.cc -MMD -c -o build/aes.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/aescmac.cc -c -E > build/aescmac.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/aescmac.cc -MMD -c -o build/aescmac.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/bus.cc -c -E > build/bus.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/bus.cc -MMD -c -o build/bus.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/cmdline.cc -c -E > build/cmdline.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/cmdline.cc -MMD -c -o build/cmdline.o
In file included from /usr/include/c++/12/vector:70,
from src/units.h:22,
from src/config.h:21,
from src/cmdline.h:21,
from src/cmdline.cc:18:
/usr/include/c++/12/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {const MeterInfo&}; _Tp = MeterInfo; _Alloc = std::allocator<MeterInfo>]’:
/usr/include/c++/12/bits/vector.tcc:439:7: note: parameter passing for argument of type ‘std::vector<MeterInfo>::iterator’ changed in GCC 7.1
439 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/vector:64:
In member function ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = MeterInfo; _Alloc = std::allocator<MeterInfo>]’,
inlined from ‘std::shared_ptr<Configuration> parseNormalCommandLine(Configuration*, int, char**)’ at src/cmdline.cc:670:28:
/usr/include/c++/12/bits/stl_vector.h:1287:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<MeterInfo*, std::vector<MeterInfo> >’ changed in GCC 7.1
1287 | _M_realloc_insert(end(), __x);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/config.cc -c -E > build/config.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/config.cc -MMD -c -o build/config.o
In file included from /usr/include/c++/12/vector:70,
from src/units.h:22,
from src/config.h:21,
from src/config.cc:18:
/usr/include/c++/12/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {const SpecifiedDevice&}; _Tp = SpecifiedDevice; _Alloc = std::allocator<SpecifiedDevice>]’:
/usr/include/c++/12/bits/vector.tcc:439:7: note: parameter passing for argument of type ‘std::vector<SpecifiedDevice>::iterator’ changed in GCC 7.1
439 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/vector:64:
In member function ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = SpecifiedDevice; _Alloc = std::allocator<SpecifiedDevice>]’,
inlined from ‘bool handleDeviceOrHex(Configuration*, std::string)’ at src/config.cc:386:42:
/usr/include/c++/12/bits/stl_vector.h:1287:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<SpecifiedDevice*, std::vector<SpecifiedDevice> >’ changed in GCC 7.1
1287 | _M_realloc_insert(end(), __x);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/12/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {const MeterInfo&}; _Tp = MeterInfo; _Alloc = std::allocator<MeterInfo>]’:
/usr/include/c++/12/bits/vector.tcc:439:7: note: parameter passing for argument of type ‘std::vector<MeterInfo>::iterator’ changed in GCC 7.1
439 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
In member function ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = MeterInfo; _Alloc = std::allocator<MeterInfo>]’,
inlined from ‘void parseMeterConfig(Configuration*, std::vector<char>&, std::string)’ at src/config.cc:204:28:
/usr/include/c++/12/bits/stl_vector.h:1287:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<MeterInfo*, std::vector<MeterInfo> >’ changed in GCC 7.1
1287 | _M_realloc_insert(end(), __x);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/dvparser.cc -c -E > build/dvparser.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/dvparser.cc -MMD -c -o build/dvparser.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/formula.cc -c -E > build/formula.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/formula.cc -MMD -c -o build/formula.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/mbus_rawtty.cc -c -E > build/mbus_rawtty.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/mbus_rawtty.cc -MMD -c -o build/mbus_rawtty.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/metermanager.cc -c -E > build/metermanager.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/metermanager.cc -MMD -c -o build/metermanager.o
In file included from /usr/include/c++/12/vector:70,
from src/units.h:22,
from src/config.h:21,
from src/bus.h:21,
from src/metermanager.cc:18:
/usr/include/c++/12/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {const MeterInfo&}; _Tp = MeterInfo; _Alloc = std::allocator<MeterInfo>]’:
/usr/include/c++/12/bits/vector.tcc:439:7: note: parameter passing for argument of type ‘std::vector<MeterInfo>::iterator’ changed in GCC 7.1
439 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/vector:64:
In member function ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = MeterInfo; _Alloc = std::allocator<MeterInfo>]’,
inlined from ‘virtual void MeterManagerImplementation::addMeterTemplate(MeterInfo&)’ at src/metermanager.cc:54:35:
/usr/include/c++/12/bits/stl_vector.h:1287:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<MeterInfo*, std::vector<MeterInfo> >’ changed in GCC 7.1
1287 | _M_realloc_insert(end(), __x);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/meters.cc -c -E > build/meters.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/meters.cc -MMD -c -o build/meters.o
In file included from /usr/include/c++/12/vector:63,
from src/units.h:22,
from src/config.h:21,
from src/bus.h:21,
from src/meters.cc:18:
/usr/include/c++/12/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const Translate::Map*, vector<Translate::Map> >; _ForwardIterator = Translate::Map*]’:
/usr/include/c++/12/bits/stl_uninitialized.h:163:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Map*, std::vector<Translate::Map> >’ changed in GCC 7.1
163 | uninitialized_copy(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_uninitialized.h:163:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Map*, std::vector<Translate::Map> >’ changed in GCC 7.1
In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const Translate::Map*, vector<Translate::Map> >; _ForwardIterator = Translate::Map*; _Tp = Translate::Map]’,
inlined from ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = Translate::Map; _Alloc = std::allocator<Translate::Map>]’ at /usr/include/c++/12/bits/stl_vector.h:601:31,
inlined from ‘Translate::Rule::Rule(const Translate::Rule&)’ at src/translatebits.h:86:12:
/usr/include/c++/12/bits/stl_uninitialized.h:372:37: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Map*, std::vector<Translate::Map> >’ changed in GCC 7.1
372 | return std::uninitialized_copy(__first, __last, __result);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const Translate::Map*, vector<Translate::Map> >; _ForwardIterator = Translate::Map*; _Tp = Translate::Map]’,
inlined from ‘std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const Translate::Map*, std::vector<Translate::Map> >; _Tp = Translate::Map; _Alloc = std::allocator<Translate::Map>]’ at /usr/include/c++/12/bits/stl_vector.h:1617:35,
inlined from ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = Translate::Map; _Alloc = std::allocator<Translate::Map>]’ at /usr/include/c++/12/bits/vector.tcc:232:44:
/usr/include/c++/12/bits/stl_uninitialized.h:372:37: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Map*, std::vector<Translate::Map> >’ changed in GCC 7.1
372 | return std::uninitialized_copy(__first, __last, __result);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const Translate::Rule*, vector<Translate::Rule> >; _ForwardIterator = Translate::Rule*]’:
/usr/include/c++/12/bits/stl_uninitialized.h:163:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Rule*, std::vector<Translate::Rule> >’ changed in GCC 7.1
163 | uninitialized_copy(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_uninitialized.h:163:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Rule*, std::vector<Translate::Rule> >’ changed in GCC 7.1
In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const Translate::Rule*, vector<Translate::Rule> >; _ForwardIterator = Translate::Rule*; _Tp = Translate::Rule]’,
inlined from ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = Translate::Rule; _Alloc = std::allocator<Translate::Rule>]’ at /usr/include/c++/12/bits/stl_vector.h:601:31:
/usr/include/c++/12/bits/stl_uninitialized.h:372:37: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Rule*, std::vector<Translate::Rule> >’ changed in GCC 7.1
372 | return std::uninitialized_copy(__first, __last, __result);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const Translate::Rule*, vector<Translate::Rule> >; _ForwardIterator = Translate::Rule*; _Tp = Translate::Rule]’,
inlined from ‘std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const Translate::Rule*, std::vector<Translate::Rule> >; _Tp = Translate::Rule; _Alloc = std::allocator<Translate::Rule>]’ at /usr/include/c++/12/bits/stl_vector.h:1617:35,
inlined from ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = Translate::Rule; _Alloc = std::allocator<Translate::Rule>]’ at /usr/include/c++/12/bits/vector.tcc:232:44:
/usr/include/c++/12/bits/stl_uninitialized.h:372:37: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<const Translate::Rule*, std::vector<Translate::Rule> >’ changed in GCC 7.1
372 | return std::uninitialized_copy(__first, __last, __result);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/map:60,
from src/util.h:25,
from src/config.h:22:
/usr/include/c++/12/bits/stl_tree.h: In member function ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(const_iterator, const key_type&) [with _Key = std::pair<std::__cxx11::basic_string<char>, Unit>; _Val = std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>; _KeyOfValue = std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >; _Compare = std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >; _Alloc = std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >]’:
/usr/include/c++/12/bits/stl_tree.h:2209:5: note: parameter passing for argument of type ‘std::_Rb_tree<std::pair<std::__cxx11::basic_string<char>, Unit>, std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>, std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >, std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >, std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> > >::const_iterator’ changed in GCC 7.1
2209 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_tree.h: In member function ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Unit>&&>, std::tuple<>}; _Key = std::pair<std::__cxx11::basic_string<char>, Unit>; _Val = std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>; _KeyOfValue = std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >; _Compare = std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >; _Alloc = std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >]’:
/usr/include/c++/12/bits/stl_tree.h:2457:7: note: parameter passing for argument of type ‘std::_Rb_tree<std::pair<std::__cxx11::basic_string<char>, Unit>, std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>, std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >, std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >, std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> > >::const_iterator’ changed in GCC 7.1
2457 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/map:61:
/usr/include/c++/12/bits/stl_map.h: In member function ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::pair<std::__cxx11::basic_string<char>, Unit>; _Tp = NumericField; _Compare = std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >; _Alloc = std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >]’:
/usr/include/c++/12/bits/stl_map.h:530:44: note: parameter passing for argument of type ‘std::_Rb_tree<std::pair<std::__cxx11::basic_string<char>, Unit>, std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>, std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >, std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >, std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> > >::const_iterator’ changed in GCC 7.1
530 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
531 | std::forward_as_tuple(std::move(__k)),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532 | std::tuple<>());
| ~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_tree.h: In member function ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple<const std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Unit>&>, std::tuple<>}; _Key = std::pair<std::__cxx11::basic_string<char>, Unit>; _Val = std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>; _KeyOfValue = std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >; _Compare = std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >; _Alloc = std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >]’:
/usr/include/c++/12/bits/stl_tree.h:2457:7: note: parameter passing for argument of type ‘std::_Rb_tree<std::pair<std::__cxx11::basic_string<char>, Unit>, std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>, std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >, std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >, std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> > >::const_iterator’ changed in GCC 7.1
2457 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_map.h: In member function ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<std::__cxx11::basic_string<char>, Unit>; _Tp = NumericField; _Compare = std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >; _Alloc = std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >]’:
/usr/include/c++/12/bits/stl_map.h:511:44: note: parameter passing for argument of type ‘std::_Rb_tree<std::pair<std::__cxx11::basic_string<char>, Unit>, std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField>, std::_Select1st<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> >, std::less<std::pair<std::__cxx11::basic_string<char>, Unit> >, std::allocator<std::pair<const std::pair<std::__cxx11::basic_string<char>, Unit>, NumericField> > >::const_iterator’ changed in GCC 7.1
511 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
512 | std::tuple<const key_type&>(__k),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
513 | std::tuple<>());
| ~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/vector:70:
/usr/include/c++/12/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(iterator, _Args&& ...) [with _Args = {FieldInfo}; _Tp = FieldInfo; _Alloc = std::allocator<FieldInfo>]’:
/usr/include/c++/12/bits/vector.tcc:439:7: note: parameter passing for argument of type ‘std::vector<FieldInfo>::iterator’ changed in GCC 7.1
439 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {FieldInfo}; _Tp = FieldInfo; _Alloc = std::allocator<FieldInfo>]’:
/usr/include/c++/12/bits/vector.tcc:123:28: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<FieldInfo*, std::vector<FieldInfo> >’ changed in GCC 7.1
123 | _M_realloc_insert(end(), std::forward<_Args>(__args)...);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/manufacturer_specificities.cc -c -E > build/manufacturer_specificities.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/manufacturer_specificities.cc -MMD -c -o build/manufacturer_specificities.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/printer.cc -c -E > build/printer.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/printer.cc -MMD -c -o build/printer.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/rtlsdr.cc -c -E > build/rtlsdr.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/rtlsdr.cc -MMD -c -o build/rtlsdr.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/serial.cc -c -E > build/serial.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/serial.cc -MMD -c -o build/serial.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/shell.cc -c -E > build/shell.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/shell.cc -MMD -c -o build/shell.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/sha256.cc -c -E > build/sha256.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/sha256.cc -MMD -c -o build/sha256.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/threads.cc -c -E > build/threads.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/threads.cc -MMD -c -o build/threads.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/translatebits.cc -c -E > build/translatebits.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/translatebits.cc -MMD -c -o build/translatebits.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/util.cc -c -E > build/util.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/util.cc -MMD -c -o build/util.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/units.cc -c -E > build/units.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/units.cc -MMD -c -o build/units.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus.cc -c -E > build/wmbus.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus.cc -MMD -c -o build/wmbus.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_amb8465.cc -c -E > build/wmbus_amb8465.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_amb8465.cc -MMD -c -o build/wmbus_amb8465.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_im871a.cc -c -E > build/wmbus_im871a.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_im871a.cc -MMD -c -o build/wmbus_im871a.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_cul.cc -c -E > build/wmbus_cul.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_cul.cc -MMD -c -o build/wmbus_cul.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rtlwmbus.cc -c -E > build/wmbus_rtlwmbus.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rtlwmbus.cc -MMD -c -o build/wmbus_rtlwmbus.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rtl433.cc -c -E > build/wmbus_rtl433.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rtl433.cc -MMD -c -o build/wmbus_rtl433.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_simulator.cc -c -E > build/wmbus_simulator.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_simulator.cc -MMD -c -o build/wmbus_simulator.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rawtty.cc -c -E > build/wmbus_rawtty.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rawtty.cc -MMD -c -o build/wmbus_rawtty.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rc1180.cc -c -E > build/wmbus_rc1180.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_rc1180.cc -MMD -c -o build/wmbus_rc1180.o
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_utils.cc -c -E > build/wmbus_utils.o.src
g++ -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/wmbus_utils.cc -MMD -c -o build/wmbus_utils.o
g++ -I/usr/include/libxml2 -Os -g -DFUZZING=false -fPIC -std=c++11 -Wall -Werror=format-security -Wno-unused-function -Ibuild src/xmq.c -c -E > build/xmq.o.src
src/xmq.c:39:9: fatal error: libxml/tree.h: No such file or directory
39 | #include<libxml/tree.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:151: build/xmq.o] Error 1
Hi @zibous, thanks for this project, works great! 👏
I was wondering if there was a way to collect data from 2 water meters (with different IDs) with a single ESP32?
I suppose it is but can't find an example.
Other question: have you noticed different data between what's on the physical water meter and the data retreived via RF?
Thanks.
https://www.smart-home-komponente.de/nano-cul/nano-cul-868-extra/
Please not, that you do need the NANO-CUL (mbus) 868 Mhz forwmbusmeters
not for***\*FHEM\****
!! . smart-home-komponente.net can flash the firmware forwmbusmeters
.
Does it mean it won't work out of the box? There is no additional info in wmbusmeters-nano_cul.md besides:
nano CUL 868 mit Externer Magnetfußantenne , see: https://www.smart-home-komponente.de/.
I would like to order the dedicated device for wmbus and I have no idea whether it is enough to order whatever "nano CUL 868" (even from Amazon) or there is a need to flash it with custom firmware to make it work with wmbusmeters and your code.
sudo cp /opt/ha-watermeter/template.service /etc/systemd/system/ha-watermenter.service
sudo cp /opt/ha-watermeter/service.template /etc/systemd/system/ha-watermeter.service
HI,
I'm not very familiar with ESPhome deployement.
I have trie a lot of yaml (wm-esp32-simple, wm-esp32-test, ...) from your gihtub and i cannot get the webserver page to see the value or log information. I must be forgetting something :s
here is the url form the esp after deployment :
here is the yaml used (but i have the same result after a lot of yaml test configuration)
test.yaml.txt
i tried some configuration on webserver : local = true or false, etc. nothing help me. In all the case, i get the webserver with a blanck page and OK 200 text.
here is the last deployment on esp32
logs_test_run.txt
Thanks for your help.
Hi @zibous,
I addressing to you as I haven't find similar issues I face ... and you have made the most explicit tutorials on the matter.
I have this meter:
https://www.diehl.com/metering/en/products-solutions/products-services/water-metering/aries-is-at/
it is stated that it works with R3 radio mode: Frequency | | MHz | 868.95 (R3 mode) and 434.47 (R3 mode)**
** 434 MHz available for DN15/110 Q3=2.5. Other variants on demand.
Now I followed your tutorial here: https://github.com/zibous/ha-watermeter/blob/master/docs/wmbusmeters-with-rtl-sdr.md
Until the part with Configuration rtlwmbus && wmbusmeters
As even at this point, the output was different from what you presented.
So by running the command:
sudo wmbusmeters --debug --t1 rtlwmbus
I get a lot of:
(main) regular reset of rtlwmbus will happen every 82800 seconds (wmbus) no alarm (expected activity) for rtlwmbus (serial) registered regular callback HOT_PLUG_DETECTOR(0) every 2 seconds No meters configured. Printing id:s of all telegrams heard! (serial) waiting for stop (serial) received ascii "T1;1;1;2023-09-13 22:24:58.000;105;123;215091CD;0x1944304ccd9150211404a233130013493c3e0e0290df3aaf95bc<0A>T1;1;1;2023-09-13 22:24:58.000;141;115;215091CD;0x1944304ccd9 ![204155722-9746eb5f-ce6b-455d-bda6-2f8f57cf0a21]x 150211404a233130013493c3e0e0290df3aaf95bc<0A>" (rtlwmbus) checkRTLWMBusFrame "T1;1;1;2023-09-13 22:24:58.000;105;123;215091CD;0x1944304ccd9150211404a233130013493c3e0e0290df3aaf95bc<0A>T1;1;1;2023-09-13 22:24:58.000;141;115;215091CD;0x1944304ccd9150211404a233130013493c3e0e0290df3aaf95bc<0A>" (rtlwmbus) received full frame (meter) no meter handled checking 0 templates. (diehl) preprocess necessary SAP_PRIOS (diehl) Pre-processing: setting device type to water meter for SAP PRIOS (wmbus) parseDLL @0 26 (wmbus) parseELL @10 16 (wmbus) parseNWL @10 16 (wmbus) parseAFL @10 16 (wmbus) parseTPL @10 16 (diehl) preprocess necessary SAP_PRIOS (diehl) Pre-processing: setting device type to water meter for SAP PRIOS (wmbus) parseDLL @0 26 (telegram) DLL L=19 C=44 (from meter SND_NR) M=4c30 (SAP) A=215091cd VER=00 TYPE=07 (Water meter) (driver izar) DEV=rtlwmbus[00000001] RSSI=105 (wmbus) parseELL @10 16 (wmbus) parseNWL @10 16 (wmbus) parseAFL @10 16 (wmbus) parseTPL @10 16 (telegram) TPL CI=a2 Received telegram from: 215091cd manufacturer: (SAP) Sappel (0x4c30) type: Water meter (0x07) ver: 0x00 device: rtlwmbus[00000001] rssi: 105 dBm driver: izar (wmbus) 000 : 19 length (25 bytes) (wmbus) 001 : 44 dll-c (from meter SND_NR) (wmbus) 002 : 304c dll-mfct (SAP) (wmbus) 004 : cd915021 dll-id (215091cd) (wmbus) 008 : 00 dll-version (wmbus) 009 : 07 dll-type (Water meter) (wmbus) 010 : a2 tpl-ci-field (Mfct specific) (wmbus) 011 C?: 33130013493C3E0E0290DF3AAF95BC mfct specific (wmbus) telegram from 215091cd ignored by all configured meters! (rtlwmbus) checkRTLWMBusFrame "T1;1;1;2023-09-13 22:24:58.000;141;115;215091CD;0x1944304ccd9150211404a233130013493c3e0e0290df3aaf95bc<0A>" (rtlwmbus) received full frame (wmbus) skipping already handled telegram leng=26.
I took one telegram 1944304ccd9150211404a233130013493c3e0e0290df3aaf95bc and ran in through the analyzer
See, no information inside the telegram, it is not decoded.
Than I gave a try with ESP 8266 NodeMCU with CC1101 board. The issue here is that the board is strange, it has on it a number, 433 and I assume it is set for 433 MHz.
https://www.sigmanortec.ro/Modul-Transceiver-wireless-CC1101-antena-SMA-p134872844
However, using the Szczepan's code I have built the reader. And the output is like this:
[00:24:38][D][wmbus:179]: Meter ID [0x2150A9F8] RSSI: -86 dBm LQI: 128 Mode: T1 not found in configuration T: 1944304CF8A950211404A203330013017241955F03ABC73A7840 (26)
[00:24:41][D][wmbus:179]: Meter ID [0x216049FD] RSSI: -96 dBm LQI: 132 Mode: T1 not found in configuration T: 1944304CFD4960211404A2731500130D3E27E125F1D92091DC0C (26)
[00:24:41][D][wmbus:179]: Meter ID [0x214FD95F] RSSI: -94 dBm LQI: 129 Mode: T1 not found in configuration T: 1944304C5FD94F211404A25313001378544D9642A77F66128E67 (26)
[00:24:42][D][wmbus:179]: Meter ID [0x215091DC] RSSI: -81 dBm LQI: 128 Mode: T1 not found in configuration T: 1944304CDC9150211404A2231300135EBE4BB1354343F689C8A6 (26)
[00:24:43][D][wmbus:179]: Meter ID [0x214FF95F] RSSI: -90 dBm LQI: 128 Mode: T1 not found in configuration T: 1944304C5FF94F211404A2431300137AEDBDC4D3BBB8C70D0485 (26)
[00:24:44][D][wmbus:179]: Meter ID [0x214FF95E] RSSI: -90 dBm LQI: 134 Mode: T1 not found in configuration T: 1944304C5EF94F211404A2431300136DC8B21D06C59D01299B87 (26)
[00:24:47][D][wmbus:179]: Meter ID [0x214FF7D6] RSSI: -64 dBm LQI: 128 Mode: T1 not found in configuration T: 1944304CD6F74F211404A233130013882B480D2D2B10E9030123 (26)
[00:24:55][D][wmbus:179]: Meter ID [0x21509410] RSSI: -93 dBm LQI: 129 Mode: T1 not found in configuration T: 1944304C109450211404A24313001370E246A22F6BA01C0C02CA (26)
The same output I had using the DVB-T tuner ... and still, the telegrams are not decoded ...
https://wmbusmeters.org/analyze/1944304C109450211404A24313001370E246A22F6BA01C0C02CA
If I take one meter from the list and run: wmbusmeters --logtelegrams --format=json auto:t1 watermeter2 izar 2150918b NOKEY
I get the following: (izar) Decoding PRIOS data failed. Ignoring telegram.
pi@hasspi:~ $ wmbusmeters --logtelegrams --format=json auto:t1 watermeter2 izar 2150918b NOKEY
Started auto rtlwmbus[00000001] listening on t1
telegram=|1944304C8B9150211404A2_431300133B48169B8A3611EC12F4D8|+14
(izar) Decoding PRIOS data failed. Ignoring telegram.
{"media":"water","meter":"izar","name":"watermeter2","id":"2150918b","prefix":"","serial_number":"000000","total_m3":0,"last_month_total_m3":0,"last_month_measure_date":"0-00-00","remaining_battery_life_y":0,"current_alarms":"no_alarm","previous_alarms":"no_alarm","transmit_period_s":0,"manufacture_year":"0","timestamp":"2023-10-19T22:36:26Z","device":"rtlwmbus[00000001]","rssi_dbm":100}
^Cpi@hasspi:~ $ wmbusmeters --logtelegrams --format=json auto:s1 watermeter2 izar 2150918b NOKEY
Started auto rtlwmbus[00000001] listening on s1
telegram=|1944304C8B9150211404A2_531300133B5F39D22117C235C9EDDA|+7
(izar) Decoding PRIOS data failed. Ignoring telegram.
{"media":"water","meter":"izar","name":"watermeter2","id":"2150918b","prefix":"","serial_number":"000000","total_m3":0,"last_month_total_m3":0,"last_month_measure_date":"0-00-00","remaining_battery_life_y":0,"current_alarms":"no_alarm","previous_alarms":"no_alarm","transmit_period_s":0,"manufacture_year":"0","timestamp":"2023-10-19T22:37:02Z","device":"rtlwmbus[00000001]","rssi_dbm":104}
Do you have an idea, where is the issue, in hardware, in R3 mode, in encrypted telegram?
TIA!
Hi again zibous ,
Remember me ? (Some time ago I had troubles collecting data from my multical 21's wireless mbus)
Fredrik (wmbusmeters creator) never found out why I couldn't get the data, so I ended up buying my own Multical 21.
The multical 21 is not installed yet because I will make sure I'm actually able to get the data into HA before I do the installation.
When I start ha-watermeter I'm getting the following output in console:
2021-12-16 10:04:16,404 - ERROR: Error on calculation (lib.calculator:71)
pi@raspberrypi:/opt/ha-watermeter $ sudo python3 app.py
2021-12-16 10:04:05,691 - INFO: ✔︎ Watermeter data application start (__main__:65)
2021-12-16 10:04:05,692 - DEBUG: ✔︎ Watermeter MQTT Client localhost (__main__:62)
2021-12-16 10:04:05,695 - INFO: ✔︎ Watermeter connect to MQTT Client localhost, tele/wasser/connection (__main__:65)
2021-12-16 10:04:05,703 - DEBUG: ✔︎ localhost connected OK, subscribe to topic wmbusmeters/77634443 (__main__:62)
2021-12-16 10:04:05,707 - DEBUG: ✔︎ Message Id 1 published. (__main__:62)
2021-12-16 10:04:16,388 - INFO: ✔︎ MQTT Message received topic wmbusmeters/77634443 (__main__:65)
2021-12-16 10:04:16,390 - INFO: ✔︎ MQTT Publish state topic tele/wasser/wasser/status (__main__:65)
2021-12-16 10:04:16,391 - DEBUG: Init calculator (lib.calculator:62)
2021-12-16 10:04:16,392 - DEBUG: ✔︎ Load previous data (lib.calculator:62)
2021-12-16 10:04:16,393 - INFO: ✔︎ get previous data from /opt/ha-watermeter/data/77634443.json (lib.calculator:65)
2021-12-16 10:04:16,394 - DEBUG: ✔︎ init previous data, datafile not found! (lib.calculator:62)
2021-12-16 10:04:16,395 - INFO: ✔︎ Start calculation (lib.calculator:65)
2021-12-16 10:04:16,404 - ERROR: Error on calculation (lib.calculator:71)
2021-12-16 10:04:16,405 - DEBUG: ✔︎ Message Id 3 published. (__main__:62)
2021-12-16 10:04:47,532 - INFO: ✔︎ MQTT Message received topic wmbusmeters/77634443 (__main__:65)
2021-12-16 10:04:47,534 - INFO: ✔︎ MQTT Publish state topic tele/wasser/wasser/status (__main__:65)
2021-12-16 10:04:47,535 - DEBUG: Init calculator (lib.calculator:62)
2021-12-16 10:04:47,536 - DEBUG: ✔︎ Load previous data (lib.calculator:62)
2021-12-16 10:04:47,536 - INFO: ✔︎ get previous data from /opt/ha-watermeter/data/77634443.json (lib.calculator:65)
2021-12-16 10:04:47,537 - DEBUG: ✔︎ init previous data, datafile not found! (lib.calculator:62)
2021-12-16 10:04:47,538 - INFO: ✔︎ Start calculation (lib.calculator:65)
2021-12-16 10:04:47,538 - ERROR: Error on calculation (lib.calculator:71)
Wmbusmeters is running and its publishing the data like this:
{
"media": "cold water",
"meter": "multical21",
"name": "Multical21",
"id": "77634443",
"total_m3": 0.094,
"target_m3": 0.094,
"max_flow_m3h": 0,
"flow_temperature_c": 127,
"external_temperature_c": 4,
"current_status": "DRY",
"time_dry": "22-31 days",
"time_reversed": "",
"time_leaking": "",
"time_bursting": "",
"timestamp": "2021-12-16T09:11:51Z",
"device": "im871a[00102807]",
"rssi_dbm": -80
}
config.py looks like this:
pi@raspberrypi:/opt/ha-watermeter $ diff config.py config.py.dist | grep -vi password
22,23c22,23
< SMARTMETER_ID = '77634443' # internal used smartmeter identification
< SMARTMETER_NAME = 'Multical21' # Name of the smartmeter
---
> SMARTMETER_ID = '1234556' # internal used smartmeter identification
> SMARTMETER_NAME = 'Wasserzähler Haus' # Name of the smartmeter
38,39c38,39
< MQTT_APPID = 'mqtt' # mqtt brocker user name
---
> MQTT_APPID = 'pi' # mqtt brocker user name
44c44
< MQTT_TOPIC = 'wmbusmeters/77634443' # listen to this wmbusmeters topic
---
> MQTT_TOPIC = 'tele/wasser/verbrauch' # listen to this wmbusmeters topic
47c47
< MQTT_TOPIC_NAME = 'multical21'
---
> MQTT_TOPIC_NAME = 'IZAR'
Any clue ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.