Apator Otus 3 - problem z odczytanymi danymi

Cześć,

próbowałem kilku sposobów, ale żaden z nich nie jest zadowalający.

Na podstawie danych wejściowych:
de4401065443925601027a9b00d0056c7cad097e9106867c6f5ada8ab80741664ebabd0b10fc583352894fed68e631440ff77d4bb9b67e54b9cb3e65098658340a51dd1e5de22758a0f5951e02e01b1ea5d1b2b3a5425d056c4f409f5ea5d116885e6bd3b34540fd8d44c74eb6fd4f6c842a7ea4c0df52ef0b4fc6d7acd8e1cba0d8260295d77ea63c1d11f495150044d8dff0f5b502d2d6e4a6e9b13a87274afb2a8bb289c67d6652c04792befe8d98a531cd74a4471014019783dcc72d50e1bfb4907904fee803ec12031c3efb017bb49615f1da354c6973c162d5a4c043

dekodowane dane z serwisu (https://wmbusmeters.org/) - auto driver wykrywa licznik “amiplus” i dają wynik:

telegram=|DE4401065443925601027A9B00D0052F2F_066D80450B183B400C78544392560E031964060000008E10031964060000008E20030000000000008E30030000000000008E8010030000000000000E833C0787000000008E10833C0787000000008E20833C0000000000008E30833C0000000000008E8010833C0000000000000B2B1216000BAB3C0000000BFB140000000BFB943C8206000AFDC8FC0181230AFDC8FC0285230AFDC8FC0384230BABC8FC100000008B40ABC8FC100000008B8040ABC8FC100000008BC040ABC8FC100000000AABC8FD6611112F2F2F2F2F2F2F2F|

Auto driver    : amiplus
Similar driver : amiplus 60/102
Using driver   : amiplus 00/00
000   : de length (222 bytes)
001   : 44 dll-c (from meter SND_NR)
002   : 0106 dll-mfct (APA)
004   : 54439256 dll-id (56924354)
008   : 01 dll-version
009   : 02 dll-type (Electricity meter)
010   : 7a tpl-ci-field (EN 13757-3 Application Layer (short tplh))
011   : 9b tpl-acc-field
012   : 00 tpl-sts-field (OK)
013   : d005 tpl-cfg 05d0 (AES_CBC_IV nb=13 cntn=0 ra=0 hc=0 )
015   : 2f2f decrypt check bytes (OK)
017   : 06 dif (48 Bit Integer/Binary Instantaneous value)
018   : 6D vif (Date and time type)
019 C!: 80450B183B40 ("device_date_time":"2024-11-24 11:05:00")
025   : 0C dif (8 digit BCD Instantaneous value)
026   : 78 vif (Fabrication no)
027 C?: 54439256
031   : 0E dif (12 digit BCD Instantaneous value)
032   : 03 vif (Energy Wh)
033 C!: 196406000000 ("total_energy_consumption_kwh":66.419)
039   : 8E dif (12 digit BCD Instantaneous value)
040   : 10 dife (subunit=0 tariff=1 storagenr=0)
041   : 03 vif (Energy Wh)
042 C!: 196406000000 ("total_energy_consumption_tariff_1_kwh":66.419)
048   : 8E dif (12 digit BCD Instantaneous value)
049   : 20 dife (subunit=0 tariff=2 storagenr=0)
050   : 03 vif (Energy Wh)
051 C!: 000000000000 ("total_energy_consumption_tariff_2_kwh":0)
057   : 8E dif (12 digit BCD Instantaneous value)
058   : 30 dife (subunit=0 tariff=3 storagenr=0)
059   : 03 vif (Energy Wh)
060 C!: 000000000000 ("total_energy_consumption_tariff_3_kwh":0)
066   : 8E dif (12 digit BCD Instantaneous value)
067   : 80 dife (subunit=0 tariff=0 storagenr=0)
068   : 10 dife (subunit=0 tariff=4 storagenr=0)
069   : 03 vif (Energy Wh)
070 C?: 000000000000
076   : 0E dif (12 digit BCD Instantaneous value)
077   : 83 vif (Energy Wh)
078   : 3C combinable vif (BackwardFlow)
079 C!: 078700000000 ("total_energy_production_kwh":8.707)
085   : 8E dif (12 digit BCD Instantaneous value)
086   : 10 dife (subunit=0 tariff=1 storagenr=0)
087   : 83 vif (Energy Wh)
088   : 3C combinable vif (BackwardFlow)
089 C!: 078700000000 ("total_energy_production_tariff_1_kwh":8.707)
095   : 8E dif (12 digit BCD Instantaneous value)
096   : 20 dife (subunit=0 tariff=2 storagenr=0)
097   : 83 vif (Energy Wh)
098   : 3C combinable vif (BackwardFlow)
099 C!: 000000000000 ("total_energy_production_tariff_2_kwh":0)
105   : 8E dif (12 digit BCD Instantaneous value)
106   : 30 dife (subunit=0 tariff=3 storagenr=0)
107   : 83 vif (Energy Wh)
108   : 3C combinable vif (BackwardFlow)
109 C!: 000000000000 ("total_energy_production_tariff_3_kwh":0)
115   : 8E dif (12 digit BCD Instantaneous value)
116   : 80 dife (subunit=0 tariff=0 storagenr=0)
117   : 10 dife (subunit=0 tariff=4 storagenr=0)
118   : 83 vif (Energy Wh)
119   : 3C combinable vif (BackwardFlow)
120 C?: 000000000000
126   : 0B dif (6 digit BCD Instantaneous value)
127   : 2B vif (Power W)
128 C!: 121600 ("current_power_consumption_kw":1.612)
131   : 0B dif (6 digit BCD Instantaneous value)
132   : AB vif (Power W)
133   : 3C combinable vif (BackwardFlow)
134 C!: 000000 ("current_power_production_kw":0)
137   : 0B dif (6 digit BCD Instantaneous value)
138   : FB vif (First extension FB of VIF-codes)
139   : 14 vife (Reserved)
140 C?: 000000
143   : 0B dif (6 digit BCD Instantaneous value)
144   : FB vif (First extension FB of VIF-codes)
145   : 94 vife (Reserved)
146   : 3C combinable vif (BackwardFlow)
147 C?: 820600
150   : 0A dif (4 digit BCD Instantaneous value)
151   : FD vif (Second extension FD of VIF-codes)
152   : C8 vife (10^-1 Volts)
153   : FC combinable vif (CombinableVIFExtension)
154   : 01 combinable extension vife (AtPhase1)
155 C?: 8123
157   : 0A dif (4 digit BCD Instantaneous value)
158   : FD vif (Second extension FD of VIF-codes)
159   : C8 vife (10^-1 Volts)
160   : FC combinable vif (CombinableVIFExtension)
161   : 02 combinable extension vife (AtPhase2)
162 C?: 8523
164   : 0A dif (4 digit BCD Instantaneous value)
165   : FD vif (Second extension FD of VIF-codes)
166   : C8 vife (10^-1 Volts)
167   : FC combinable vif (CombinableVIFExtension)
168   : 03 combinable extension vife (AtPhase3)
169 C?: 8423
171   : 0B dif (6 digit BCD Instantaneous value)
172   : AB vif (Power W)
173   : C8 combinable vif (UpperLimit)
174   : FC combinable vif (CombinableVIFExtension)
175   : 10 combinable extension vife (AccumulationOfAbsoluteValue)
176 C?: 000000
179   : 8B dif (6 digit BCD Instantaneous value)
180   : 40 dife (subunit=1 tariff=0 storagenr=0)
181   : AB vif (Power W)
182   : C8 combinable vif (UpperLimit)
183   : FC combinable vif (CombinableVIFExtension)
184   : 10 combinable extension vife (AccumulationOfAbsoluteValue)
185 C?: 000000
188   : 8B dif (6 digit BCD Instantaneous value)
189   : 80 dife (subunit=0 tariff=0 storagenr=0)
190   : 40 dife (subunit=2 tariff=0 storagenr=0)
191   : AB vif (Power W)
192   : C8 combinable vif (UpperLimit)
193   : FC combinable vif (CombinableVIFExtension)
194   : 10 combinable extension vife (AccumulationOfAbsoluteValue)
195 C?: 000000
198   : 8B dif (6 digit BCD Instantaneous value)
199   : C0 dife (subunit=1 tariff=0 storagenr=0)
200   : 40 dife (subunit=3 tariff=0 storagenr=0)
201   : AB vif (Power W)
202   : C8 combinable vif (UpperLimit)
203   : FC combinable vif (CombinableVIFExtension)
204   : 10 combinable extension vife (AccumulationOfAbsoluteValue)
205 C?: 000000
208   : 0A dif (4 digit BCD Instantaneous value)
209   : AB vif (Power W)
210   : C8 combinable vif (UpperLimit)
211   : FD combinable vif (MultiplicativeCorrectionFactorForValue103)
212   : 66 combinable vif (DurationOfDLast)
213 C?: 1111
215   : 2F skip
216   : 2F skip
217   : 2F skip
218   : 2F skip
219   : 2F skip
220   : 2F skip
221   : 2F skip
222   : 2F skip

{
    "media":"electricity",
    "meter":"amiplus",
    "name":"",
    "id":"56924354",
    "current_power_consumption_kw":1.612,
    "current_power_production_kw":0,
    "total_energy_consumption_kwh":66.419,
    "total_energy_consumption_tariff_1_kwh":66.419,
    "total_energy_consumption_tariff_2_kwh":0,
    "total_energy_consumption_tariff_3_kwh":0,
    "total_energy_production_kwh":8.707,
    "total_energy_production_tariff_1_kwh":8.707,
    "total_energy_production_tariff_2_kwh":0,
    "total_energy_production_tariff_3_kwh":0,
    "device_date_time":"2024-11-24 11:05:00",
    "timestamp":"2024-11-24T10:56:09Z"
}


Using: wmbusmeters: 1.17.1-29-g3af7a4c
3af7a4c8a881c10498f1e14d950d4e502ab2fa7e

więc nie wszystkie dane są zdekodowane :frowning:

Wykorzystałem serwis ( Alexander Miller, OMS, parser, wireless M-Bus, DIN-EN-13757) i tutaj jest trochę lepiej, przynajmniej dodatkowo pokazuje napięcie (serial i nr fabryczny częściowo ukryłem xxxxx:

IV:01065443925601029B9B9B9B9B9B9B9B
DECRYPTED DATA(208):2F2F066D80450B183B400C78544392560E031964060000008E10031964060000008E20030000000000008E30030000000000008E8010030000000000000E833C0787000000008E10833C0787000000008E20833C0000000000008E30833C0000000000008E8010833C0000000000000B2B1216000BAB3C0000000BFB140000000BFB943C8206000AFDC8FC0181230AFDC8FC0285230AFDC8FC0384230BABC8FC100000008B40ABC8FC100000008B8040ABC8FC100000008BC040ABC8FC100000000AABC8FD6611112F2F2F2F2F2F2F2F
IDENTIFICATION
	- Product name: APA_1	
	- Serial number: APA01569xxxxx
	- Medium: Electricity	
	- Generation: 1	
	- Fabrication number: 569xxxxx	
VALUES
	- 2024-11-24 10:47:25 Heating energy: 66419 Wh	
	- 2024-11-24 10:47:25 Power Upper limit value: 0 W	SubUnit 2
	- 2024-11-24 10:47:25 Power Upper limit value: 0 W	SubUnit 1
	- 2024-11-24 10:47:25 Power Upper limit value: 0 W	
	- 2024-11-24 10:47:25 voltage: 238.4 V	
	- 2024-11-24 10:47:25 voltage: 238.5 V	
	- 2024-11-24 10:47:25 voltage: 238.1 V	
	- 2024-11-24 10:47:25 Reserved_14 only negative: 682	
	- 2024-11-24 10:47:25 Reserved_14: 0	
	- 2024-11-24 10:47:25 Power only negative: 0 W	
	- 2024-11-24 10:47:25 Power: 1612 W	
	- 2024-11-24 10:47:25 Energy only negative: 0 Wh	Tariff 4
	- 2024-11-24 10:47:25 Energy only negative: 0 Wh	Tariff 3
	- 2024-11-24 10:47:25 Energy only negative: 0 Wh	Tariff 2
	- 2024-11-24 10:47:25 Energy only negative: 8707 Wh	Tariff 1
	- 2024-11-24 10:47:25 Energy only negative: 8707 Wh	
	- 2024-11-24 10:47:25 Energy: 0 Wh	Tariff 4
	- 2024-11-24 10:47:25 Energy: 0 Wh	Tariff 3
	- 2024-11-24 10:47:25 Energy: 0 Wh	Tariff 2
	- 2024-11-24 10:47:25 Energy: 66419 Wh	Tariff 1
	- 2024-11-24 10:47:25 Power Upper limit value: 0 W	SubUnit 3
	- 2024-11-24 10:47:25 Power Upper limit value: 1111 W	

Ten drugi serwis wygląda na to, że lepiej dekoduje dane, pytanie:
a. Czy mcie doświadczenia z tym licznikiem?
b. Czy dane zdekodowane przez ten drugi serwis to są kompletne dane?
c. Czy jest jakiś komponent/przykładowy kod, który umożliwiłby mi poprawne odczytanie wszystkich danych z tego modelu licznika i który wrzuciłby np. do MQTT?

I am going to reply in English, but feel free to reply in Polish. Polish is not my native language and it is easier to me to write in English, for you it takes a right click to translate it to Polish.

Yes. Multiple users on the forum has these meters.

It depends on the configuration of the meter. Your DSO should provide documentation what the meter transmits and how often. It would make sense if you would provide some information from which DSO your meter is from.

Depending on your setup, how did you read the data from the meter? Is it though an ESPHome device or are you using an RTL-SDR?

There are multiple ways to skin a cat…

One of the suggested topic is:

Or this one:

Thank you @GSzabados for your reply.

@GSzabados It depends on the configuration of the meter. Your DSO should provide documentation what the meter transmits and how often. It would make sense if you would provide some information from which DSO your meter is from.

I didn’t get documentation from the DSO, but I should have?

My DSO is PGE, apart from the HEX key and the meter installation protocol I received nothing else :frowning:

I understand that the DSO can configure the transmission frequency, but I guess the data should be the same for the meter model, not dependent on the DSO. I understand that the DSO can configure that not all data is transmitted, but I’m writing about a case where the same data was decoded in different “quality” by 2 different services, so I’m asking which one based on your experience does it better?

@GSzabados Depending on your setup, how did you read the data from the meter? Is it though an ESPHome device or are you using an RTL-SDR?

I’m reading data through the RTL-SDR device and the situation is further complicated by the fact that my platform (OH) runs on Windows, and most of the sensible solutions run on Linux/Raspberry.

Any idea how to do this on Windows so as not to overcomplicate things?

The m-bus protocol describes that communication, can be two-way. In this model of meter (Apator Otus 3), can I send a message to wake up the meter and initiate the sending of data? Because I see that data is sent by the meter at irregular intervals, even every few minutes.

In theory and according the law, you should have, but let’s not talk about it, because the law and regulation allows a transition period for the DSOs.

Measurement and billing systems installed or modernized in the period from 4 July 2019 to the date of entry into force of the regulation and installed after the date of entry into force of the regulation, which were purchased or were covered by a tender procedure initiated before that date, shall be adapted to the requirements specified in the regulation by 4 July 2031.

But let’s not go down to the subject that what do the DSOs do and what they should do…

Unfortunately all meters are different, it depends on what firmware it is running and how it has been configured. And what the DSO asked for to be implemented.
Again the law and regulation defines what and how should be transmitted and how often, but see the comment about the transition period again above.

Unfortunately I cannot really help with that, unless you spin up a virtual machine with linux and run everything on that.

There were already a few users from PGE, who managed to configure wmbusmeter to read the data correctly. I need to do a bit of search to find it. I will get back with a link in another post.

There were some discussions here already:

Or

To be honest, the easiest option if you purchase a Magic-Reader with ESPHome and deploy that to decode. Or you would run a computer with linux utilising the RTL-SDR to decode. Like a Dell Wyse 3040 (https://allegro.pl/oferta/thin-client-dell-wyse-3040-intel-atom-x5-2gb-8gb-ssd-zasilacz-16418186855).

These thin clients are extremely cheap and as powerful as a RPi.

This one is literally a bargain and capable to run HA with WMBUSMETERS add-on. And far better than a RPi3.

https://allegro.pl/oferta/hp-t630-thin-client-8gb-ram-ddr4-128gb-ssd-m-2-14645784134

1 Like

Rzeczy komplikuje właśnie zbytnio Windows, zachęcam gorąco do rozpoczęcia przygody z Linux. W obecnym czasie informacje do jego wdrożenia są ogólnodostępne i materiały te łatwo można przyswajać każdemu, bez względu na wykształcenie, z pomocą np Chat GTP, który cierpliwie wytłumaczy każde z pojęć. Dzięki podstawom Linux’a otwiera się przed Tobą cały świat oprogramowania open source i wolność wyboru.
A jeśli już teraz chcesz wdrażać nowe pomysły pod Windows, to zdobądź wiedzę o Docker. W kontenerach możesz uruchamiać dowolne oprogramowanie a ilość gotowych obrazów przyprawia o zawrót głowy.
wmbusmeters/docker w domu master · WMBUSMETERS/WMBuSmMeters
Kolejnym rozwiązaniem może być maszyna wirtualna, ale to już strzelanie z armaty do komara, dla tej jednej usługi.
Osobiście opowiadam się za radą @GSzabados i proponuję zakup lub wykorzystanie dowolnego komputera dla rozpoczęcia przygody z własnym homelab.

1 Like

Putting up another computer or even a virtual machine just to decode wm-bus data is shooting a cannon at a sparrow.

And can’t the current one for ESPHome that Stephen uses be recompiled into a simple exe that would run from the command line? e.g., the way RTL works?

Docker is your friend then, which is kind of an equivalent of a virtual machine…

Cześć,

dziękuję wszystkim forumowiczom za informacje i porady, nie odzywałem się, bo czytam, czytam i chłonę informację…

Jak zrealizuję to wyzwanie, to na pewno się podzielę doświadczeniem.

Dziękuję.

Jeszcze jedno pytanie odnośnie licznika Apator Otus 3 - czy również dane spływają Wam nieregularnie np. raz jest to co 1 min, innym razem co 3, a czasami nawet co 6 min. Czy to jest normalne? Czy w ogóle praktykowana jest próba wysłania czegoś do licznika, aby go pobudzić?

This is what the law determined as requiements:

Somewhere in there is a list of timings, I cannot find it now. That is the minimum.

Otherwise, yes, some of them shouldbe like every 15s or minutes, others can be less frequent.

Thank you very much. Have a nice Sunday.