mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Fix the parsing of total consumption channel (#17726)
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
82655e64cb
commit
08e688057c
@ -194,7 +194,7 @@ public class X3HybridG4Data extends CommonLocalDeviceData {
|
||||
|
||||
@Override
|
||||
public double getTotalConsumption() {
|
||||
return ((double) ByteUtil.read32BitSigned(getFromRawData(88), getFromRawData(89))) / 10;
|
||||
return ((double) ByteUtil.read32BitSigned(getFromRawData(88), getFromRawData(89))) / 100;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,24 +48,6 @@ public class TestX3HybridG4Parser extends AbstractParserTest {
|
||||
Information:[12.000,14,XY,8,1.23,0.00,1.24,1.09,0.00,1]
|
||||
}
|
||||
""";
|
||||
private static final String RAW_DATA_X3_RUEPERT = """
|
||||
{
|
||||
"sn":"SRABCDEFGH",
|
||||
"ver":"3.009.03",
|
||||
"type":14,
|
||||
"Data":[
|
||||
2367,2360,2375,10,10,10,48,48,58,154,
|
||||
6077,5297,19,19,1177,1058,5003,5003,5003,2,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,32310,
|
||||
600,1971,3213,61,1959,1,46,154,256,10528,
|
||||
3083,6154,100,0,34,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,2380,1,
|
||||
52,77,0,0,6253,0,7500,0,37,46,
|
||||
6854,1,64,4,0,0,2662,8,10050,0,
|
||||
30,0,518,0,0,0,0,0,0,0,
|
||||
0,0,1,51,1,23,47,256,3504,2400,300,300,249,227,34,33,74,1620,1024,16448,16448,16448,0,0,0,3352,3344,57729,21,20564,12339,18753,12354,16694,13124,12848,20564,12339,19010,12857,16690,13124,13368,20564,12339,19010,12601,16691,12356,12597,20564,12339,19010,12601,16691,12356,14387,0,0,0,0,0,0,0,515,257,1281,1027,0,32310,0,0,0,0,0,0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Information":[10.000,14,"H34A10IA999999",8,1.41,0.00,1.40,1.09,0.00,1]}
|
||||
""";
|
||||
|
||||
@Override
|
||||
protected InverterType getInverterType() {
|
||||
@ -120,7 +102,7 @@ public class TestX3HybridG4Parser extends AbstractParserTest {
|
||||
assertEquals(14.2, data.getTotalBatteryChargeEnergy()); // [76][77]
|
||||
assertEquals(57, data.getTotalPVEnergy()); // [80][81]
|
||||
assertEquals(19.25, data.getTotalFeedInEnergy()); // [86][87]
|
||||
assertEquals(36.9, data.getTotalConsumption()); // [88]
|
||||
assertEquals(3.69, data.getTotalConsumption()); // [88]
|
||||
assertEquals(39.6, data.getTodayEnergy()); // [82] / 10
|
||||
assertEquals(1261573.06, data.getTodayFeedInEnergy()); // [90][91] / 100
|
||||
assertEquals(202509.28, data.getTodayConsumption()); // [92][93] / 100
|
||||
|
Loading…
Reference in New Issue
Block a user