Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
Decrypted data size: 243
0F < immer gleich
801BF780 < LongInvokeIdAndPriority?? < ignored
0C < immer gleich
07E708100311131E00FF8882 < DateTime < ignored
02 23 < An array with 35 elements
09 < Obis data type 0x09 = OctetString
0C < length of string in bytes (12)
07E708100311131E00FF8882 < DateTime
09 < Obis data type 0x09 = OctetString -> if it is OctetString THEN FOLLOWING BYTE INDICATES LENGTH OF STRING
06 < length of string in bytes (6)
0100010800FF < OctetString data with 6 bytes -> OBIS KENNZAHLEN (HAN): https://www.nek.no/wp-content/uploads/2018/11/Kaifa-KFM_001.pdf https://de.wikipedia.org/wiki/OBIS-Kennzahlen
06 < Obis data type 0x09 = DoubleLongUnsigned
00896236
02 02 < An array with 2 elements
0F < data type int8
00 < int8 value (0)
16 < data typ enum
1E < enum value
09060100020800FF060000005002020F00161E09060100010700FF06000007D902020F00161B09060100020700FF060000000002020F00161B09060100200700FF12090902020FFF162309060100340700FF1208FD02020FFF162309060100480700FF12090A02020FFF1623090601001F0700FF12005002020FFE162109060100330700FF12012D02020FFE162109060100470700FF12010802020FFE1621090601000D0700FF1203A802020FFD16FF090C313738323130323637333839
Ablauf:
1. Check Header <DataNotification>
2. Check for Structure or Array and their size and loop through it
3. Check each value, if it's timestamp (12 Bytes), ignore it, if its an OBIS Kennzahl save it
4. Save data and data type
5. Step 3
6. Send saved values with zigbee
IDEE: OBIS KENNZAHL NUR SPEICHERN, ERST BEIM ZIGBEE SENDEN AUSWERTEN -> UNIVERSELLER
Also Daten so speichern:
struct{
kennzahl =
data =
next =
}
Problem: Verschiedenen Datentypen? Es kommt uint8, 16 und 32 vor? Evtl. alles als 32 abspeichern?
parse_obis_header
General structure except parse_obis_data
parse_obis_structure
If octet string = 6 byte + strukture with size 2:
parse_obis_data
OBIS Datenstrukturen:
0x02 + 0x?? -> An struct with ?? elements
0x01 + 0x?? -> An array with ?? elements
Allgemeine Obis Struktur:
<DataNotification> = 0x0F
<LongInvokeIdAndPriority> = 4 Byte
<????> = 0x0C
<DateTime> = 12 Byte
<NotificationBody><DataValue> = 0x02
<Structure Qty="??"> = 1 Byte -> in diesem Fall 0x23 = 35 -> gibt ?? Länge an
<DataNotification>
<!-- High priority. -->
<!-- Invoke ID: 1832832 -->
<LongInvoke IdAndPriority Value="801BF780" />
<!-- 16.08.2023 17:19:30 -->
<DateTime Value="07E708100311131E00FF8882" />
<NotificationBody>
<DataValue>
<Structure Qty="23" >
<!-- 16.08.2023 17:19:30+02:00 -->
<OctetString Value="07E708100311131E00FF8882" />
<!-- 1.0.1.8.0.255 -->
<OctetString Value="0100010800FF" />
<UInt32 Value="00896236" /> Wirkenergie A+: 9003574Wh
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1E" />
</Structure>
<!-- 1.0.2.8.0.255 -->
<OctetString Value="0100020800FF" />
<UInt32 Value="00000050" /> Wirkenergie A-: 80Wh
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1E" />
</Structure>
<!-- 1.0.1.7.0.255 -->
<OctetString Value="0100010700FF" />
<UInt32 Value="000007D9" /> Momentanleistung P+: 2009W
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1B" />
</Structure>
<!-- 1.0.2.7.0.255 -->
<OctetString Value="0100020700FF" />
<UInt32 Value="00000000" /> Momentanleistung P-: 0W
<Structure Qty="02" >
<Int8 Value="00" />
<Enum Value="1B" />
</Structure>
<!-- 1.0.32.7.0.255 -->
<OctetString Value="0100200700FF" />
<UInt16 Value="0909" /> Spannung L1: 231,3V
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFF" />
<Enum Value="23" />
</Structure>
<!-- 1.0.52.7.0.255 -->
<OctetString Value="0100340700FF" />
<UInt16 Value="08FD" /> Spannung L2: 230,1V
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFF" />
<Enum Value="23" />
</Structure>
<!-- 1.0.72.7.0.255 -->
<OctetString Value="0100480700FF" />
<UInt16 Value="090A" /> Spannung L3: 231,4V
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFF" />
<Enum Value="23" />
</Structure>
<!-- 1.0.31.7.0.255 -->
<OctetString Value="01001F0700FF" />
<UInt16 Value="0050" /> Strom L1: 0,80A
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFE" />
<Enum Value="21" />
</Structure>
<!-- 1.0.51.7.0.255 -->
<OctetString Value="0100330700FF" />
<UInt16 Value="012D" /> Strom L2: 3,01A
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFE" />
<Enum Value="21" />
</Structure>
<!-- 1.0.71.7.0.255 -->
<OctetString Value="0100470700FF" />
<UInt16 Value="0108" /> Strom L3: 2,64A
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFE" />
<Enum Value="21" />
</Structure>
<!-- 1.0.13.7.0.255 -->
<OctetString Value="01000D0700FF" />
<UInt16 Value="03A8" /> Leistungsfaktor: 0,936
<Structure Qty="02" >
<Int8 Value="FFFFFFFFFFFFFFFD" />
<Enum Value="FF" />
</Structure>
<!-- 178210267389 -->
<OctetString Value="313738323130323637333839" />
</Structure>
</DataValue>
</NotificationBody>
</DataNotification>
Ergebnis:
Wirkenergie A+: 9003574Wh
Wirkenergie A-: 80Wh
Momentanleistung P+: 2009W
Momentanleistung P-: 0W
Spannung L1: 231,3V
Spannung L2: 230,1V
Spannung L3: 231,4V
Strom L1: 0,80A
Strom L2: 3,01A
Strom L3: 2,64A
Leistungsfaktor: 0,936
Decrypted data size: 243
0F801BF7810C07E708100311132300FF88820223090C07E708100311132300FF888209060100010800FF060089623802020F00161E09060100020800FF060000005002020F00161E09060100010700FF060000058C02020F00161B09060100020700FF060000000002020F00161B09060100200700FF12090B02020FFF162309060100340700FF1208FC02020FFF162309060100480700FF12090902020FFF1623090601001F0700FF12004E02020FFE162109060100330700FF12012D02020FFE162109060100470700FF12011002020FFE1621090601000D0700FF1203B202020FFD16FF090C313738323130323637333839
Decrypted data size: 243
0F801BF7820C07E708100311132800FF88820223090C07E708100311132800FF888209060100010800FF060089623A02020F00161E09060100020800FF060000005002020F00161E09060100010700FF060000059902020F00161B09060100020700FF060000000002020F00161B09060100200700FF12090C02020FFF162309060100340700FF1208FB02020FFF162309060100480700FF12090602020FFF1623090601001F0700FF12005002020FFE162109060100330700FF12012E02020FFE162109060100470700FF12011402020FFE1621090601000D0700FF1203B102020FFD16FF090C313738323130323637333839
Nonecf6dc798eThis file is pinned to the selected release. Download the original to open it in your design tool.