|
|
|
@ -1374,16 +1374,13 @@ namespace IoTNode.DeviceServices.FBee
|
|
|
|
|
tempBytes.Add(0x00);
|
|
|
|
|
tempBytes.Add(0x00);
|
|
|
|
|
var electricity = BitConverter.ToUInt64(tempBytes.ToArray()) / 10000f;
|
|
|
|
|
System.Diagnostics.Debug.WriteLine($"~~~~~~~~~~~~~~~~~~~electricity:{electricity}");
|
|
|
|
|
this.UpdateData(deviceRepo, device, device.CreateData(Keys.Electricity, electricity.ToString("f2"), DeviceDataType.Float, "电量", "kWh", timestamp: timestamp));
|
|
|
|
|
}
|
|
|
|
|
else if (item.Key == 0x050b)
|
|
|
|
|
{
|
|
|
|
|
var power = BitConverter.ToUInt16(item.Value.ToArray());
|
|
|
|
|
System.Diagnostics.Debug.WriteLine($"~~~~~~~~~~~~~~~~~~~power:{power}");
|
|
|
|
|
this.UpdateData(deviceRepo, device, device.CreateData(Keys.Power, power, DeviceDataType.Float, "功率", "W", timestamp: timestamp));
|
|
|
|
|
}
|
|
|
|
|
System.Diagnostics.Debug.WriteLine($"~~~~~~~~~~~~~~~~~~~{item.Key.ToString("X")}:{System.BitConverter.ToString(item.Value)}");
|
|
|
|
|
}
|
|
|
|
|
if (clusterId == ClusterId.SummationDivisor)
|
|
|
|
|
{
|
|
|
|
|