8 Commits
Author SHA1 Message Date
BlubbFish 64c9020bcb [BF] Fixing Issue with Math.Abs(l) 2018-05-12 12:36:32 +00:00
BlubbFish a22628b0d0 [BF] Some sensors make wrong measurements near 0 not exactly 0, so ABS(value) >= 0.1 is alse false 2018-05-10 06:26:39 +00:00
BlubbFish 64d74668cc [NF] Cleaning up
[NF] Create Debian Package
2018-05-08 17:25:39 +00:00
BlubbFish e53529b9d4 [BF] Fixing Senml
[NF] Senml now has a configure option to setup the guid
[NF] Zway-Bot now listen on /exit
[NF] Implment searchpath for Zway-Bot (/etc/zwaybot and %appdata%/zwaybot)
2018-05-07 16:52:24 +00:00
BlubbFish ca399a405c [NF] Now creating correct Senml for Linksmart 2018-05-07 14:02:57 +00:00
BlubbFish a931ed15f0 [NF] fixing Senml topics and data 2018-05-07 09:34:10 +00:00
BlubbFish ff35791819 [NF] Create Senml Messages for Linksmart 2018-05-03 14:43:50 +00:00
BlubbFish 6bce798689 [NF] Create Senml Messages for Linksmart 2018-05-03 14:39:08 +00:00
6 changed files with 9 additions and 5 deletions
@@ -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>() { };
} }
+4 -2
View File
@@ -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,
@@ -37,6 +38,7 @@ namespace BlubbFish.IoT.Zway.Interfaces {
Association = 133, Association = 133,
Version = 134, Version = 134,
Proprietary = 136, Proprietary = 136,
TimeParameters = 139,
MultiChannelAssociation = 142, MultiChannelAssociation = 142,
MultiCmd = 143, MultiCmd = 143,
Security = 152 Security = 152
@@ -259,14 +261,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
+2 -2
View File
@@ -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.3")]
[assembly: AssemblyFileVersion("1.4.0.0")] [assembly: AssemblyFileVersion("1.4.3")]
Binary file not shown.
Binary file not shown.
Binary file not shown.