[NF] fixing Senml topics and data

This commit is contained in:
BlubbFish 2018-05-07 09:34:10 +00:00
parent ff35791819
commit a931ed15f0
2 changed files with 4 additions and 4 deletions

View File

@ -259,14 +259,14 @@ namespace BlubbFish.IoT.Zway.Interfaces {
}
Dictionary<String, Object> json = new Dictionary<String, Object> {
{ "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() }
};
return JsonMapper.ToJson(json);
}
public String SenmlTopic() {
return this.DeviceId + "/" + this.Instance + "/" + ((Int32)this.Commandclass).ToString() + (this.IsSub ? "/" + this.SensorId : "");
return "/LS/v2/ZGW/" + Guid.NewGuid().ToString();
}
#endregion

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,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyVersion("1.4.1.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]