Skip to content

Commit

Permalink
MAP12H amd MAP3H templates are fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
KraPete authored and evgeny-boger committed May 6, 2021
1 parent 433de16 commit 2d77a36
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 60 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-mqtt-serial (2.12.2) experimental; urgency=medium

* MAP12H and MAP3H templates are fixed

-- Petr Krasnoshchekov <petr.krasnoshchekov@wirenboard.ru> Wed, 05 May 2021 13:04:00 +0500

wb-mqtt-serial (2.12.1) experimental; urgency=medium

* Performace optimizations during register polling.
Expand Down
12 changes: 6 additions & 6 deletions wb-mqtt-serial-templates/config-map12e-fw2.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@
"word_order": "little_endian"
},
{
"name": "RP energy1",
"id": "RP energy1 L1",
"name": "RP energy",
"id": "RP energy L1",
"reg_type": "input",
"address": "0x1224",
"type": "value",
Expand Down Expand Up @@ -461,8 +461,8 @@
"word_order": "little_endian"
},
{
"name": "RP energy1",
"id": "RP energy1 L2",
"name": "RP energy",
"id": "RP energy L2",
"reg_type": "input",
"address": "0x1224",
"type": "value",
Expand Down Expand Up @@ -573,8 +573,8 @@
"word_order": "little_endian"
},
{
"name": "RP energy1",
"id": "RP energy1 L3",
"name": "RP energy",
"id": "RP energy L3",
"reg_type": "input",
"address": "0x1224",
"type": "value",
Expand Down
12 changes: 6 additions & 6 deletions wb-mqtt-serial-templates/config-map12h-fw2-basic.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@
"word_order": "little_endian"
},
{
"name": "RP energy1",
"id": "RP energy1 L1",
"name": "RP energy",
"id": "RP energy L1",
"reg_type": "input",
"address": "0x1224",
"type": "value",
Expand Down Expand Up @@ -456,8 +456,8 @@
"word_order": "little_endian"
},
{
"name": "RP energy1",
"id": "RP energy1 L2",
"name": "RP energy",
"id": "RP energy L2",
"reg_type": "input",
"address": "0x1224",
"type": "value",
Expand Down Expand Up @@ -567,8 +567,8 @@
"word_order": "little_endian"
},
{
"name": "RP energy1",
"id": "RP energy1 L3",
"name": "RP energy",
"id": "RP energy L3",
"reg_type": "input",
"address": "0x1224",
"type": "value",
Expand Down
32 changes: 24 additions & 8 deletions wb-mqtt-serial-templates/config-map12h-fw2.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@
"name": "Ufund",
"id": "Ufund L2",
"reg_type": "input",
"address": "0x1711",
// actual address 0x1713, base should be 0x1711, but it is not uniformely displaced
// so add 1 to address as it is used with stride = 1
"address": "0x1712",
"type": "value",
"format": "u16",
"scale": 0.032656,
Expand Down Expand Up @@ -298,7 +300,9 @@
"name": "Ufund",
"id": "Ufund L3",
"reg_type": "input",
"address": "0x1711",
// actual address 0x1715, base should be 0x1711, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 2
"address": "0x1713",
"type": "value",
"format": "u16",
"scale": 0.032656,
Expand Down Expand Up @@ -583,7 +587,9 @@
"name": "Ifund",
"id": "Ifund L2",
"reg_type": "input",
"address": "0x1710",
// actual address 0x1712, base should be 0x1710, but it is not uniformely displaced
// so add 1 to address as it is used with stride = 1
"address": "0x1711",
"type": "value",
"format": "u16",
"scale": 0.0522496,
Expand Down Expand Up @@ -718,7 +724,9 @@
"name": "NP energy",
"id": "NP energy L2",
"reg_type": "input",
"address": "0x1506",
// actual address 0x150a, base should be 0x1506, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 1
"address": "0x1508",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand All @@ -729,7 +737,9 @@
"name": "NN energy",
"id": "NN energy L2",
"reg_type": "input",
"address": "0x1516",
// actual address 0x151a, base should be 0x1516, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 1
"address": "0x1518",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand Down Expand Up @@ -799,7 +809,9 @@
"name": "Ifund",
"id": "Ifund L3",
"reg_type": "input",
"address": "0x1710",
// actual address 0x1714, base should be 0x1710, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 2
"address": "0x1712",
"type": "value",
"format": "u16",
"scale": 0.0522496,
Expand Down Expand Up @@ -934,7 +946,9 @@
"name": "NP energy",
"id": "NP energy L3",
"reg_type": "input",
"address": "0x1506",
// actual address 0x150e, base should be 0x1506, but it is not uniformely displaced
// so add 4 to address as it is used with stride = 2
"address": "0x150a",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand All @@ -945,7 +959,9 @@
"name": "NN energy",
"id": "NN energy L3",
"reg_type": "input",
"address": "0x1516",
// actual address 0x151e, base should be 0x1516, but it is not uniformely displaced
// so add 4 to address as it is used with stride = 2
"address": "0x151a",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand Down
36 changes: 28 additions & 8 deletions wb-mqtt-serial-templates/config-map12h.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
"channels": [
{
"name": "L1",
"id": "",
"device_type": "phase L1"
},
{
"name": "L2",
"id": "",
"device_type": "phase L2",
"stride": 1
},
{
"name": "L3",
"id": "",
"device_type": "phase L3",
"stride": 2
},
Expand Down Expand Up @@ -103,6 +106,7 @@
},
{
"name": "Ch 4 L1",
"id": "Ch 4",
"device_type": "channel phase L1",
"shift": "0x3000"
},
Expand Down Expand Up @@ -237,7 +241,9 @@
"name": "Ufund",
"id": "Ufund L2",
"reg_type": "input",
"address": "0x1711",
// actual address 0x1713, base should be 0x1711, but it is not uniformely displaced
// so add 1 to address as it is used with stride = 1
"address": "0x1712",
"type": "value",
"format": "u16",
"scale": 0.032656,
Expand Down Expand Up @@ -294,7 +300,9 @@
"name": "Ufund",
"id": "Ufund L3",
"reg_type": "input",
"address": "0x1711",
// actual address 0x1715, base should be 0x1711, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 2
"address": "0x1713",
"type": "value",
"format": "u16",
"scale": 0.032656,
Expand Down Expand Up @@ -555,7 +563,9 @@
"name": "Ifund",
"id": "Ifund L2",
"reg_type": "input",
"address": "0x1710",
// actual address 0x1712, base should be 0x1710, but it is not uniformely displaced
// so add 1 to address as it is used with stride = 1
"address": "0x1711",
"type": "value",
"format": "u16",
"scale": 0.0032656,
Expand Down Expand Up @@ -690,7 +700,9 @@
"name": "NP energy",
"id": "NP energy L2",
"reg_type": "input",
"address": "0x1506",
// actual address 0x150a, base should be 0x1506, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 1
"address": "0x1508",
"type": "value",
"format": "u32",
"scale": 0.0182044,
Expand All @@ -701,7 +713,9 @@
"name": "NN energy",
"id": "NN energy L2",
"reg_type": "input",
"address": "0x1516",
// actual address 0x151a, base should be 0x1516, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 1
"address": "0x1518",
"type": "value",
"format": "u32",
"scale": 0.0182044,
Expand Down Expand Up @@ -759,7 +773,9 @@
"name": "Ifund",
"id": "Ifund L3",
"reg_type": "input",
"address": "0x1710",
// actual address 0x1714, base should be 0x1710, but it is not uniformely displaced
// so add 2 to address as it is used with stride = 2
"address": "0x1712",
"type": "value",
"format": "u16",
"scale": 0.0032656,
Expand Down Expand Up @@ -894,7 +910,9 @@
"name": "NP energy",
"id": "NP energy L3",
"reg_type": "input",
"address": "0x1506",
// actual address 0x150e, base should be 0x1506, but it is not uniformely displaced
// so add 4 to address as it is used with stride = 2
"address": "0x150a",
"type": "value",
"format": "u32",
"scale": 0.0182044,
Expand All @@ -905,7 +923,9 @@
"name": "NN energy",
"id": "NN energy L3",
"reg_type": "input",
"address": "0x1516",
// actual address 0x151e, base should be 0x1516, but it is not uniformely displaced
// so add 4 to address as it is used with stride = 2
"address": "0x151a",
"type": "value",
"format": "u32",
"scale": 0.0182044,
Expand Down
32 changes: 24 additions & 8 deletions wb-mqtt-serial-templates/config-map3h-fw2-harmonics.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,9 @@
"name": "Ufund",
"id": "Ufund L2",
"reg_type": "input",
"address": "0x1711",
// actual address 0x1713, base should be 0x1711, but it is occupied by Ifund L2
// so add 1 to address as it is used with stride = 1
"address": "0x1712",
"type": "value",
"format": "u16",
"scale": 0.032656,
Expand Down Expand Up @@ -800,7 +802,9 @@
"name": "Ifund",
"id": "Ifund L2",
"reg_type": "input",
"address": "0x1710",
// actual address 0x1712, base should be 0x1710, but it is occupied by Ufund L1
// so add 1 to address as it is used with stride = 1
"address": "0x1711",
"type": "value",
"format": "u16",
"scale": 0.0522496,
Expand Down Expand Up @@ -935,7 +939,9 @@
"name": "NP energy",
"id": "NP energy L2",
"reg_type": "input",
"address": "0x1506",
// actual address 0x150a, base should be 0x1506, but it is displaced by 4 not by 2
// so add 2 to address as it is used with stride = 1
"address": "0x1508",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand All @@ -946,7 +952,9 @@
"name": "NN energy",
"id": "NN energy L2",
"reg_type": "input",
"address": "0x1516",
// actual address 0x151a, base should be 0x1516, but it is displaced by 4 not by 2
// so add 2 to address as it is used with stride = 1
"address": "0x1518",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand Down Expand Up @@ -1126,7 +1134,9 @@
"name": "Ufund",
"id": "Ufund L3",
"reg_type": "input",
"address": "0x1711",
// actual address 0x1715, base should be 0x1711, but it non uniformely displaced
// so add 2 to address as it is used with stride = 2
"address": "0x1713",
"type": "value",
"format": "u16",
"scale": 0.032656,
Expand Down Expand Up @@ -1242,7 +1252,9 @@
"name": "Ifund",
"id": "Ifund L3",
"reg_type": "input",
"address": "0x1710",
// actual address 0x1714, base should be 0x1710, but it non uniformely displaced
// so add 2 to address as it is used with stride = 2
"address": "0x1712",
"type": "value",
"format": "u16",
"scale": 0.0522496,
Expand Down Expand Up @@ -1377,7 +1389,9 @@
"name": "NP energy",
"id": "NP energy L3",
"reg_type": "input",
"address": "0x1506",
// actual address 0x150e, base should be 0x1506, but it is displaced by 8 not by 4
// so add 4 to address as it is used with stride = 2
"address": "0x150a",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand All @@ -1388,7 +1402,9 @@
"name": "NN energy",
"id": "NN energy L3",
"reg_type": "input",
"address": "0x1516",
// actual address 0x151e, base should be 0x1516, but it is displaced by 8 not by 4
// so add 4 to address as it is used with stride = 2
"address": "0x151a",
"type": "value",
"format": "u32",
"scale": 0.291271,
Expand Down
Loading

0 comments on commit 2d77a36

Please sign in to comment.