Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a22628b0d0 | ||
|
|
64d74668cc | ||
|
|
e53529b9d4 | ||
|
|
ca399a405c | ||
|
|
a931ed15f0 | ||
|
|
ff35791819 | ||
|
|
6bce798689 |
@@ -65,7 +65,7 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
Double l = Double.Parse(json["val"]["value"].ToString());
|
Double l = Double.Parse(json["val"]["value"].ToString());
|
||||||
if (t == "Power" && (l > 3660 || l < 0) ||
|
if (t == "Power" && (l > 3660 || l < 0) ||
|
||||||
t == "Temperature" && (l > 65 || l < -25) ||
|
t == "Temperature" && (l > 65 || l < -25) ||
|
||||||
(t == "Temperature" && this.Level >= 4 && l == 0)) {
|
(t == "Temperature" && this.Level >= 4 && Math.Abs(l) >= 0.1)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,6 +89,8 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
return new List<Senml>() { new SenmlDouble("power", Senml.Units.Watt, this.Level) };
|
return new List<Senml>() { new SenmlDouble("power", Senml.Units.Watt, this.Level) };
|
||||||
} else if(this.Scale == "°C") {
|
} else if(this.Scale == "°C") {
|
||||||
return new List<Senml>() { new SenmlDouble("temperatur", Senml.Units.Celsius, this.Level) };
|
return new List<Senml>() { new SenmlDouble("temperatur", Senml.Units.Celsius, this.Level) };
|
||||||
|
} else if(this.Scale == "Lux") {
|
||||||
|
return new List<Senml>() { new SenmlDouble("luminiscence", Senml.Units.Lux, this.Level) };
|
||||||
}
|
}
|
||||||
return new List<Senml>() { };
|
return new List<Senml>() { };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
|||||||
SwitchColor = 51,
|
SwitchColor = 51,
|
||||||
MeterPulse = 53,
|
MeterPulse = 53,
|
||||||
MeterTableMonitor = 61,
|
MeterTableMonitor = 61,
|
||||||
|
ThermostatOperatingState = 66,
|
||||||
CRC16 = 86,
|
CRC16 = 86,
|
||||||
AssociationGroupInformation = 89,
|
AssociationGroupInformation = 89,
|
||||||
DeviceResetLocally = 90,
|
DeviceResetLocally = 90,
|
||||||
@@ -259,14 +260,14 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
|||||||
}
|
}
|
||||||
Dictionary<String, Object> json = new Dictionary<String, Object> {
|
Dictionary<String, Object> json = new Dictionary<String, Object> {
|
||||||
{ "e", l },
|
{ "e", l },
|
||||||
{ "bn", "urn:dev:id:" + this.SenmlTopic() },
|
{ "bn", this.DeviceId + "/" + this.Instance + "/" + ((Int32)this.Commandclass).ToString() + (this.IsSub ? "/" + this.SensorId : "") + "/" },
|
||||||
{ "bt", ((DateTimeOffset)this.LastUpdate).ToUnixTimeSeconds() }
|
{ "bt", ((DateTimeOffset)this.LastUpdate).ToUnixTimeSeconds() }
|
||||||
};
|
};
|
||||||
return JsonMapper.ToJson(json);
|
return JsonMapper.ToJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String SenmlTopic() {
|
public String SenmlTopic() {
|
||||||
return this.DeviceId + "/" + this.Instance + "/" + ((Int32)this.Commandclass).ToString() + (this.IsSub ? "/" + this.SensorId : "");
|
return "LS/v2/ZGW/";
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
// indem Sie "*" wie unten gezeigt eingeben:
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.4.0.0")]
|
[assembly: AssemblyVersion("1.4.2.0")]
|
||||||
[assembly: AssemblyFileVersion("1.4.0.0")]
|
[assembly: AssemblyFileVersion("1.4.2.0")]
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user