@@ -177,9 +177,9 @@ void CDomoticzHardwareBase::SendHumiditySensor(const int NodeID, const int Batte
177
177
void CDomoticzHardwareBase::SendBaroSensor (const int NodeID, const int ChildID, const int BatteryLevel, const float pressure, const int forecast, const std::string &defaultname)
178
178
{
179
179
_tGeneralDevice gdevice;
180
+ gdevice.subtype = sTypeBaro ;
180
181
gdevice.intval1 = (NodeID << 8 ) | ChildID;
181
182
gdevice.intval2 = forecast;
182
- gdevice.subtype = sTypeBaro ;
183
183
gdevice.floatval1 = pressure;
184
184
sDecodeRXMessage (this , (const unsigned char *)&gdevice, defaultname.c_str (), BatteryLevel);
185
185
}
@@ -285,8 +285,8 @@ void CDomoticzHardwareBase::SendSetPointSensor(const int NodeID, const int Child
285
285
void CDomoticzHardwareBase::SendDistanceSensor (const int NodeID, const int ChildID, const int BatteryLevel, const float distance, const std::string &defaultname)
286
286
{
287
287
_tGeneralDevice gdevice;
288
- gdevice.intval1 = (NodeID << 8 ) | ChildID;
289
288
gdevice.subtype = sTypeDistance ;
289
+ gdevice.intval1 = (NodeID << 8 ) | ChildID;
290
290
gdevice.floatval1 = distance;
291
291
sDecodeRXMessage (this , (const unsigned char *)&gdevice, defaultname.c_str (), BatteryLevel);
292
292
}
@@ -407,10 +407,9 @@ void CDomoticzHardwareBase::SendKwhMeterOldWay(const int NodeID, const int Child
407
407
408
408
void CDomoticzHardwareBase::SendKwhMeter (const int NodeID, const int ChildID, const int BatteryLevel, const double musage, const double mtotal, const std::string &defaultname)
409
409
{
410
- int dID = (NodeID << 8 ) | ChildID;
411
410
_tGeneralDevice gdevice;
412
- gdevice.intval1 = dID;
413
411
gdevice.subtype = sTypeKwh ;
412
+ gdevice.intval1 = (NodeID << 8 ) | ChildID;
414
413
gdevice.floatval1 = (float )musage;
415
414
gdevice.floatval2 = (float )(mtotal*1000.0 );
416
415
sDecodeRXMessage (this , (const unsigned char *)&gdevice, defaultname.c_str (), BatteryLevel);
@@ -614,12 +613,11 @@ void CDomoticzHardwareBase::SendRGBWSwitch(const int NodeID, const int ChildID,
614
613
615
614
void CDomoticzHardwareBase::SendVoltageSensor (const int NodeID, const int ChildID, const int BatteryLevel, const float Volt, const std::string &defaultname)
616
615
{
617
- int dID = (NodeID << 8 ) | ChildID;
618
616
_tGeneralDevice gDevice ;
619
617
gDevice .subtype = sTypeVoltage ;
620
618
gDevice .id = ChildID;
619
+ gDevice .intval1 = (NodeID << 8 ) | ChildID;
621
620
gDevice .floatval1 = Volt;
622
- gDevice .intval1 = dID;
623
621
sDecodeRXMessage (this , (const unsigned char *)&gDevice , defaultname.c_str (), BatteryLevel);
624
622
}
625
623
@@ -658,8 +656,8 @@ void CDomoticzHardwareBase::SendPercentageSensor(const int NodeID, const int Chi
658
656
_tGeneralDevice gDevice ;
659
657
gDevice .subtype = sTypePercentage ;
660
658
gDevice .id = ChildID;
661
- gDevice .floatval1 = Percentage;
662
659
gDevice .intval1 = NodeID;
660
+ gDevice .floatval1 = Percentage;
663
661
sDecodeRXMessage (this , (const unsigned char *)&gDevice , defaultname.c_str (), BatteryLevel);
664
662
}
665
663
@@ -678,8 +676,8 @@ void CDomoticzHardwareBase::SendWaterflowSensor(const int NodeID, const int Chil
678
676
_tGeneralDevice gDevice ;
679
677
gDevice .subtype = sTypeWaterflow ;
680
678
gDevice .id = ChildID;
679
+ gDevice .intval1 = (NodeID << 8 ) | ChildID;
681
680
gDevice .floatval1 = LPM;
682
- gDevice .intval1 = NodeID;
683
681
sDecodeRXMessage (this , (const unsigned char *)&gDevice , defaultname.c_str (), BatteryLevel);
684
682
}
685
683
@@ -695,8 +693,8 @@ void CDomoticzHardwareBase::SendCustomSensor(const int NodeID, const int ChildID
695
693
_tGeneralDevice gDevice ;
696
694
gDevice .subtype = sTypeCustom ;
697
695
gDevice .id = ChildID;
696
+ gDevice .intval1 = (NodeID << 8 ) | ChildID;
698
697
gDevice .floatval1 = Dust;
699
- gDevice .intval1 = (NodeID<<8 )|ChildID;
700
698
701
699
if (bDoesExists)
702
700
sDecodeRXMessage (this , (const unsigned char *)&gDevice , defaultname.c_str (), BatteryLevel);
@@ -775,17 +773,17 @@ void CDomoticzHardwareBase::SendWind(const int NodeID, const int BatteryLevel, c
775
773
void CDomoticzHardwareBase::SendPressureSensor (const int NodeID, const int ChildID, const int BatteryLevel, const float pressure, const std::string &defaultname)
776
774
{
777
775
_tGeneralDevice gdevice;
778
- gdevice.intval1 = (NodeID << 8 ) | ChildID;
779
776
gdevice.subtype = sTypePressure ;
777
+ gdevice.intval1 = (NodeID << 8 ) | ChildID;
780
778
gdevice.floatval1 = pressure;
781
779
sDecodeRXMessage (this , (const unsigned char *)&gdevice, defaultname.c_str (), BatteryLevel);
782
780
}
783
781
784
782
void CDomoticzHardwareBase::SendSolarRadiationSensor (const unsigned char NodeID, const int BatteryLevel, const float radiation, const std::string &defaultname)
785
783
{
786
784
_tGeneralDevice gdevice;
787
- gdevice.id = NodeID;
788
785
gdevice.subtype = sTypeSolarRadiation ;
786
+ gdevice.id = NodeID;
789
787
gdevice.floatval1 = radiation;
790
788
sDecodeRXMessage (this , (const unsigned char *)&gdevice, defaultname.c_str (), BatteryLevel);
791
789
}
0 commit comments