petsie
February 2, 2023, 2:45pm
1
I did some experiments with wmbusmeters, DVT SDR_STICK, NANOCUL and ended up with: Wemos D1 Min + CC1101 (esphome).
Wemos D1 Mini + CC1101
(esphome) is the best solution for me because the resource requirement is low.
see:
## ------------------------------------------------------
## Additional infos
## ------------------------------------------------------
## https://github.com/SzczepanLeon/esphome-components
## https://github.com/zdzichu6969/esphome-components
## ------------------------------------------------------
substitutions:
device_name_short: "water-meter"
friendly_name: "Wasserzähler"
update_interval: 60s
log_level: "INFO"
appversion: "1.1.2"
device_description: "Wemos D1 Min, CUL - CC1101, IZAR module (Diehl IZAR RC 868 I R4 PL)"
esphome:
name: "water-meter"
platform: ESP8266
board: d1_mini
esp8266_restore_from_flash: true
This file has been truncated. show original
What I still miss
Only the total_m3
are currently decoded from the telegram. I am still looking for support on how to determine the further information from the telegram:
Alarm (current_alarms, previous_alarms)
Water last month (last_month_total_m3)
Last Month date (last_month_measure_date)
Battery (remaining_battery_life_y)
Periode (transmit_period_s)
I don’t know how to include the necessary libraries or whether there is a
simple solution for decoding the additional information ?
see:
/*
Based on: https://github.com/weetmuts/wmbusmeters/blob/master/src/driver_izar.cc
Copyright (C) 2019 Jacek Tomasiak (gpl-3.0-or-later)
Copyright (C) 2020-2022 Fredrik Öhrström (gpl-3.0-or-later)
Copyright (C) 2021 Vincent Privat (gpl-3.0-or-later)
*/
#pragma once
#include "driver.h"
#define GET_BIT(var, pos) ((var >> pos) & 0x01)
struct Izar : Driver
{
Izar() : Driver(std::string("izar")){};
bool get_value(std::vector<unsigned char> &telegram, float &water_usage) override
{
This file has been truncated. show original
bool get_value(std::vector<unsigned char> &telegram, float &water_usage) override {
//====DECRYPT====
bool ret_val = false;
uint8_t *decoded = reinterpret_cast<uint8_t*>(telegram.data());
uint8_t decoded_len = telegram.size();
uint8_t decrypted[64] = {0};
if ((this->decrypt(decoded, decoded_len, decrypted)) > 0) {
water_usage = (this->uintFromBytesLittleEndian(decrypted + 1)) / 1000.0;
// ??? how to add more here
ret_val = true;
}
return ret_val;
};
2 Likes
@petsie , how’s the project going?
I did found some interesting sources:
https://zewaren.net/wmbus-izar-meter.html
opened 04:59PM - 10 Mar 21 UTC
closed 12:48PM - 04 Jul 21 UTC
I receive this telegram info when i run
wmbusmeters --nodeviceexit auto:c1
St… arted auto rtlwmbus[00000001] listening on c1
No meters configured. Printing id:s of all telegrams heard!
Received telegram from: a132257d
manufacturer: (SAP) Sappel (0x4c30)
type: Water meter (0x07)
ver: 0x00
device: rtlwmbus[00000001]
rssi: 24 dBm
driver: izar
If I try reading to screen i get,
wmbusmeters auto:c1 MyTapWater auto a132257d 00112233445566778899AABBCCDDEEFF
Started auto rtlwmbus[00000001] listening on c1
(izar) Decoding PRIOS data failed. Ignoring telegram.
MyTapWater a132257d 000000 0 m3 0 m3 0-00-00 0 y no_alarm no_alarm 0 s 0 2021-03-10 16:56.21
(izar) Decoding PRIOS data failed. Ignoring telegram.
MyTapWater a132257d 000000 0 m3 0 m3 0-00-00 0 y no_alarm no_alarm 0 s 0 2021-03-10 16:56.46
Is my key wrong, or is my meter unsupported.?
says no meters configured though I have a definition
/etc/wmbusmeters.d/SWWMeter
name=SouthWestWater
id=a132257d
key=00112233445566778899AABBCCDDEEFF
packets from rtl-wmbus (oddly I only see T1)
T1;1;1;2021-03-06 15:05:59.000;21;20;A132257D;0x1944304c7d2532a1b201a2111d001314c2f17ad726f0ea24f41d
I’m also curious about the distance constrains…
do you have a working version with esphome-components 4.0?