Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
beea6c1ee0 | ||
|
|
1082ee0d2a | ||
|
|
6d395107cb | ||
|
|
ae999384c7 | ||
|
|
9d09f09c12 | ||
|
|
08047db287 | ||
|
|
f406b09ffa | ||
|
|
0834e09178 | ||
|
|
b29e1d2a14 |
@@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using BlubbFish.IoT.Zway.Events;
|
||||||
|
using BlubbFish.IoT.Zway.Interfaces;
|
||||||
|
using BlubbFish.IoT.Zway.lib;
|
||||||
|
using LitJson;
|
||||||
|
|
||||||
|
namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
||||||
|
/// <summary>
|
||||||
|
/// 135 = Indicator
|
||||||
|
/// </summary>
|
||||||
|
class Alarm : ACommandClass {
|
||||||
|
public override event UpdatedValue Update;
|
||||||
|
|
||||||
|
public Int32 Level { get; private set; }
|
||||||
|
public Int32 AlarmType { get; private set; }
|
||||||
|
|
||||||
|
public Alarm(JsonData json, Tuple<Int32, Int32, Classes> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
||||||
|
this.InitComplex(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitComplex(JsonData json) {
|
||||||
|
if (json.Keys.Contains("data") && json["data"].Keys.Contains("V1event") &&
|
||||||
|
json["data"]["V1event"].Keys.Contains("alarmType") && json["data"]["V1event"]["alarmType"].Keys.Contains("value") &&
|
||||||
|
json["data"]["V1event"].Keys.Contains("level") && json["data"]["V1event"]["level"].Keys.Contains("value")) {
|
||||||
|
this.AlarmType = Int32.Parse(json["data"]["V1event"]["alarmType"]["value"].ToString());
|
||||||
|
this.Level = Int32.Parse(json["data"]["V1event"]["level"]["value"].ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
|
if(match.Groups[4].Value == ".data.V1event") {
|
||||||
|
if (json.Keys.Contains("alarmType") && json["alarmType"].Keys.Contains("value") &&
|
||||||
|
json.Keys.Contains("level") && json["level"].Keys.Contains("value") &&
|
||||||
|
this.CheckSetUpdateTime(json)) {
|
||||||
|
this.AlarmType = Int32.Parse(json["alarmType"]["value"].ToString());
|
||||||
|
this.Level = Int32.Parse(json["level"]["value"].ToString());
|
||||||
|
this.Update?.Invoke(this, new DeviceUpdateEvent(new Tuple<Int32, Int32>(this.AlarmType, this.Level), this.LastUpdate, this));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override String ToString() {
|
||||||
|
return "Alarm " + this.Name + " [" + this.Id + "]: " + this.AlarmType + " " + this.Level;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void Poll() => this.PollNone();
|
||||||
|
|
||||||
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
|
return new Dictionary<String, Object> {
|
||||||
|
{ "AlarmType", this.AlarmType },
|
||||||
|
{ "Level", this.Level },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "Level", this.Level },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,8 +78,8 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "scene", this.Scene },
|
{ "Scene", this.Scene },
|
||||||
{ "key", this.Key },
|
{ "Key", this.Key },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "Level", this.Level },
|
||||||
{ "size", this.Size },
|
{ "Size", this.Size },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "Level", this.Level },
|
||||||
{ "type", this.Type },
|
{ "Type", this.Type },
|
||||||
{ "scale", this.Scale },
|
{ "Scale", this.Scale },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using BlubbFish.IoT.Zway.Events;
|
||||||
|
using BlubbFish.IoT.Zway.Interfaces;
|
||||||
|
using BlubbFish.IoT.Zway.lib;
|
||||||
|
using LitJson;
|
||||||
|
|
||||||
|
namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
||||||
|
public class Scenecontrollerconfsub : ACommandClass {
|
||||||
|
public override event UpdatedValue Update;
|
||||||
|
|
||||||
|
public Int32 Scene { get; private set; }
|
||||||
|
public Int32 Duration { get; private set; }
|
||||||
|
public Scenecontrollerconfsub(JsonData json, Tuple<Int32, Int32, Classes, Int32> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
||||||
|
this.IsSub = true;
|
||||||
|
InitComplex(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitComplex(JsonData json) {
|
||||||
|
if (json.Keys.Contains("scene") && json["scene"].Keys.Contains("value") &&
|
||||||
|
json.Keys.Contains("duration") && json["duration"].Keys.Contains("value")) {
|
||||||
|
this.Scene = Int32.Parse(json["scene"]["value"].ToString());
|
||||||
|
this.Duration = Int32.Parse(json["duration"]["value"].ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
|
if (json.Keys.Contains("scene") && json["scene"].Keys.Contains("value") &&
|
||||||
|
json.Keys.Contains("duration") && json["duration"].Keys.Contains("value") &&
|
||||||
|
this.CheckSetUpdateTime(json)) {
|
||||||
|
this.Scene = Int32.Parse(json["scene"]["value"].ToString());
|
||||||
|
this.Duration = Int32.Parse(json["duration"]["value"].ToString());
|
||||||
|
this.Update?.Invoke(this, new DeviceUpdateEvent(new Tuple<Int32, Int32>(this.Scene, this.Duration), this.LastUpdate, this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override String ToString() {
|
||||||
|
return "SceneControllerConf " + this.Name + " [" + this.Id + "]: " + this.Scene + " " + this.Duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void Poll() => this.PollSub();
|
||||||
|
|
||||||
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
|
return new Dictionary<String, Object> {
|
||||||
|
{ "Scene", this.Scene },
|
||||||
|
{ "Duration", this.Duration }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using BlubbFish.IoT.Zway.Events;
|
||||||
|
using BlubbFish.IoT.Zway.Interfaces;
|
||||||
|
using BlubbFish.IoT.Zway.lib;
|
||||||
|
using LitJson;
|
||||||
|
|
||||||
|
namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
||||||
|
public class Sensorbinarysub : ACommandClass {
|
||||||
|
public override event UpdatedValue Update;
|
||||||
|
|
||||||
|
public String Type { get; private set; }
|
||||||
|
public Boolean State { get; private set; }
|
||||||
|
public Int32 Level {
|
||||||
|
get {
|
||||||
|
return (this.State) ? 1 : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Sensorbinarysub(JsonData json, Tuple<Int32, Int32, Classes, Int32> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
||||||
|
this.IsSub = true;
|
||||||
|
InitComplex(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitComplex(JsonData json) {
|
||||||
|
if (json.Keys.Contains("sensorTypeString") &&
|
||||||
|
json["sensorTypeString"].Keys.Contains("value") &&
|
||||||
|
json.Keys.Contains("level") &&
|
||||||
|
json["level"].Keys.Contains("value")) {
|
||||||
|
this.Type = json["sensorTypeString"]["value"].ToString();
|
||||||
|
this.State = (Boolean)json["level"]["value"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
|
if (json.Keys.Contains("level") && json["level"].Keys.Contains("value") &&
|
||||||
|
json.Keys.Contains("sensorTypeString") && json["sensorTypeString"].Keys.Contains("value") &&
|
||||||
|
this.CheckSetUpdateTime(json)) {
|
||||||
|
this.State = (Boolean)json["level"]["value"];
|
||||||
|
this.Type = json["sensorTypeString"]["value"].ToString();
|
||||||
|
this.Update?.Invoke(this, new DeviceUpdateEvent(new Tuple<String, Boolean>(this.Type, this.State), this.LastUpdate, this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override String ToString() {
|
||||||
|
return "SensorBinary " + this.Name + " [" + this.Id + "]: " + this.Type + " " + this.State.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void Poll() => this.PollNone();
|
||||||
|
|
||||||
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
|
return new Dictionary<String, Object> {
|
||||||
|
{ "State", this.State },
|
||||||
|
{ "Type", this.Type },
|
||||||
|
{ "Level", this.Level }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,6 +33,14 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal override void SetUpdate(JsonData json, Match match) {
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
|
if(json.Keys.Contains("val") && json["val"].Keys.Contains("value") && json.Keys.Contains("sensorTypeString") && json["sensorTypeString"].Keys.Contains("value")) {
|
||||||
|
String t = json["sensorTypeString"]["value"].ToString();
|
||||||
|
Double l = Double.Parse(json["val"]["value"].ToString());
|
||||||
|
if (t == "Power" && (l > 3660 || l < 0) ||
|
||||||
|
t == "Temperature" && (l > 50 || l < -20)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(json.Keys.Contains("val") && json["val"].Keys.Contains("value") &&
|
if(json.Keys.Contains("val") && json["val"].Keys.Contains("value") &&
|
||||||
json.Keys.Contains("sensorTypeString") && json["sensorTypeString"].Keys.Contains("value") &&
|
json.Keys.Contains("sensorTypeString") && json["sensorTypeString"].Keys.Contains("value") &&
|
||||||
json.Keys.Contains("scaleString") && json["scaleString"].Keys.Contains("value") &&
|
json.Keys.Contains("scaleString") && json["scaleString"].Keys.Contains("value") &&
|
||||||
@@ -52,9 +60,9 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "Level", this.Level },
|
||||||
{ "type", this.Type },
|
{ "Type", this.Type },
|
||||||
{ "scale", this.Scale },
|
{ "Scale", this.Scale },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "Level", this.Level },
|
||||||
{ "type", this.Type },
|
{ "Type", this.Type },
|
||||||
{ "scale", this.Scale },
|
{ "Scale", this.Scale },
|
||||||
{ "tempmax", this.TempMax },
|
{ "TempMax", this.TempMax },
|
||||||
{ "tempmin", this.TempMin },
|
{ "TempMin", this.TempMin },
|
||||||
{ "hasminmax", this.HasMinMax },
|
{ "HasMinMax", this.HasMinMax },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,33 +11,42 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
/// 135 = Indicator
|
/// 135 = Indicator
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class Indicator : ACommandClass {
|
class Indicator : ACommandClass {
|
||||||
private Boolean _level;
|
private Boolean _state;
|
||||||
|
|
||||||
public override event UpdatedValue Update;
|
public override event UpdatedValue Update;
|
||||||
public Boolean Level {
|
public Boolean State {
|
||||||
get {
|
get {
|
||||||
return this._level;
|
return this._state;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this.SetInt(value ? 255 : 0);
|
this.SetInt(value ? 255 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Int32 Level {
|
||||||
|
get {
|
||||||
|
return (this.State) ? 1 : 0;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.State = (value == 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Indicator(JsonData json, Tuple<Int32, Int32, Classes> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
public Indicator(JsonData json, Tuple<Int32, Int32, Classes> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
||||||
this.InitComplex(json);
|
this.InitComplex(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitComplex(JsonData json) {
|
private void InitComplex(JsonData json) {
|
||||||
if (json.Keys.Contains("data") && json["data"].Keys.Contains("stat") && json["data"]["stat"].Keys.Contains("value")) {
|
if (json.Keys.Contains("data") && json["data"].Keys.Contains("stat") && json["data"]["stat"].Keys.Contains("value")) {
|
||||||
this._level = Int32.Parse(json["data"]["stat"]["value"].ToString()) == 255;
|
this._state = Int32.Parse(json["data"]["stat"]["value"].ToString()) == 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override void SetUpdate(JsonData json, Match match) {
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
if(match.Groups[4].Value == ".data.stat") {
|
if(match.Groups[4].Value == ".data.stat") {
|
||||||
if (json.Keys.Contains("value") && this.CheckSetUpdateTime(json)) {
|
if (json.Keys.Contains("value") && this.CheckSetUpdateTime(json)) {
|
||||||
this._level = Int32.Parse(json["value"].ToString()) == 255;
|
this._state = Int32.Parse(json["value"].ToString()) == 255;
|
||||||
this.Update?.Invoke(this, new DeviceUpdateEvent(this.Level, this.LastUpdate, this));
|
this.Update?.Invoke(this, new DeviceUpdateEvent(this.State, this.LastUpdate, this));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
||||||
@@ -45,12 +54,13 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override String ToString() {
|
public override String ToString() {
|
||||||
return "Indicator " + this.Name + " [" + this.Id + "]: " + this.Level;
|
return "Indicator " + this.Name + " [" + this.Id + "]: " + this.State;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "State", this.State },
|
||||||
|
{ "Level", this.Level }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs;
|
||||||
|
using BlubbFish.IoT.Zway.Events;
|
||||||
|
using BlubbFish.IoT.Zway.Interfaces;
|
||||||
|
using BlubbFish.IoT.Zway.lib;
|
||||||
|
using LitJson;
|
||||||
|
|
||||||
|
namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
||||||
|
/// <summary>
|
||||||
|
/// 50 = Meter
|
||||||
|
/// </summary>
|
||||||
|
public class Scenecontrollerconf : ACommandClass {
|
||||||
|
public override event UpdatedValue Update;
|
||||||
|
|
||||||
|
public Scenecontrollerconf(JsonData json, Tuple<Int32, Int32, Classes> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
||||||
|
this.HasSub = true;
|
||||||
|
this.InitComplex(json);
|
||||||
|
foreach (KeyValuePair<Int32, ACommandClass> item in this.Sub) {
|
||||||
|
item.Value.Update += this.DeviceUpdate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeviceUpdate(Object sender, DeviceUpdateEvent e) {
|
||||||
|
this.Update?.Invoke(this, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
|
if (match.Groups[4].Value.StartsWith(".data.")) {
|
||||||
|
Int32 subid = Int32.Parse(match.Groups[5].Value);
|
||||||
|
if (this.Sub.ContainsKey(subid)) {
|
||||||
|
this.Sub[subid].SetUpdate(json, match);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitComplex(JsonData json) {
|
||||||
|
if (json.Keys.Contains("data")) {
|
||||||
|
JsonData data = json["data"];
|
||||||
|
Dictionary<Int32, ACommandClass> subs = new Dictionary<Int32, ACommandClass>();
|
||||||
|
foreach (String item in data.Keys) {
|
||||||
|
if (Int32.TryParse(item, out Int32 subid) &&
|
||||||
|
data[item].Keys.Contains("scene") &&
|
||||||
|
data[item].Keys.Contains("duration")) {
|
||||||
|
subs.Add(subid, new Scenecontrollerconfsub(data[item], new Tuple<Int32, Int32, Classes, Int32>(this.DeviceId, this.Instance, this.Commandclass, subid), this.http, this.Polling));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.Sub = new ReadOnlyDictionary<Int32, ACommandClass>(subs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void Poll() => this.PollPerSub();
|
||||||
|
|
||||||
|
public override Dictionary<String, Object> ToDictionary() => this.ToDictionarySub();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using BlubbFish.IoT.Zway.Devices.CommandClasses.CommandClassSubs;
|
||||||
|
using BlubbFish.IoT.Zway.Events;
|
||||||
|
using BlubbFish.IoT.Zway.Interfaces;
|
||||||
|
using BlubbFish.IoT.Zway.lib;
|
||||||
|
using LitJson;
|
||||||
|
|
||||||
|
namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
||||||
|
/// <summary>
|
||||||
|
/// 48 = SensorBinary
|
||||||
|
/// </summary>
|
||||||
|
public class Sensorbinary : ACommandClass {
|
||||||
|
public override event UpdatedValue Update;
|
||||||
|
|
||||||
|
public Sensorbinary(JsonData json, Tuple<Int32, Int32, Classes> id, HttpConnection http, Boolean polling) : base(json, id, http, polling) {
|
||||||
|
this.HasSub = true;
|
||||||
|
this.InitComplex(json);
|
||||||
|
foreach (KeyValuePair<Int32, ACommandClass> item in this.Sub) {
|
||||||
|
item.Value.Update += this.DeviceUpdate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeviceUpdate(Object sender, DeviceUpdateEvent e) {
|
||||||
|
this.Update?.Invoke(this, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
|
if (match.Groups[4].Value.StartsWith(".data.")) {
|
||||||
|
Int32 subid = Int32.Parse(match.Groups[5].Value);
|
||||||
|
if (this.Sub.ContainsKey(subid)) {
|
||||||
|
this.Sub[subid].SetUpdate(json, match);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitComplex(JsonData json) {
|
||||||
|
if (json.Keys.Contains("data")) {
|
||||||
|
JsonData data = json["data"];
|
||||||
|
Dictionary<Int32, ACommandClass> subs = new Dictionary<Int32, ACommandClass>();
|
||||||
|
foreach (String item in data.Keys) {
|
||||||
|
if (Int32.TryParse(item, out Int32 subid) &&
|
||||||
|
data[item].Keys.Contains("sensorTypeString") &&
|
||||||
|
data[item].Keys.Contains("level")) {
|
||||||
|
subs.Add(subid, new Sensorbinarysub(data[item], new Tuple<Int32, Int32, Classes, Int32>(this.DeviceId, this.Instance, this.Commandclass, subid), this.http, this.Polling));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.Sub = new ReadOnlyDictionary<Int32, ACommandClass>(subs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void Poll() => this.PollSubGlobal();
|
||||||
|
|
||||||
|
public override Dictionary<String, Object> ToDictionary() => this.ToDictionarySub();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,13 +11,22 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
/// 37 = SwitchBinary
|
/// 37 = SwitchBinary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Switchbinary : ACommandClass {
|
public class Switchbinary : ACommandClass {
|
||||||
private Boolean _level;
|
private Boolean _state;
|
||||||
|
|
||||||
public override event UpdatedValue Update;
|
public override event UpdatedValue Update;
|
||||||
|
|
||||||
public Boolean Level {
|
public Int32 Level {
|
||||||
get {
|
get {
|
||||||
return this._level;
|
return (this.State) ? 1 : 0;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.State = (value == 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean State {
|
||||||
|
get {
|
||||||
|
return this._state;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this.SetInt(value ? 255 : 0);
|
this.SetInt(value ? 255 : 0);
|
||||||
@@ -31,8 +40,8 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
internal override void SetUpdate(JsonData json, Match match) {
|
internal override void SetUpdate(JsonData json, Match match) {
|
||||||
if(match.Groups[4].Value == ".data.level") {
|
if(match.Groups[4].Value == ".data.level") {
|
||||||
if (json.Keys.Contains("value") && json["value"].IsBoolean && this.CheckSetUpdateTime(json)) {
|
if (json.Keys.Contains("value") && json["value"].IsBoolean && this.CheckSetUpdateTime(json)) {
|
||||||
this._level = (Boolean)json["value"];
|
this._state = (Boolean)json["value"];
|
||||||
this.Update?.Invoke(this, new DeviceUpdateEvent(this.Level, this.LastUpdate, this));
|
this.Update?.Invoke(this, new DeviceUpdateEvent(this.State, this.LastUpdate, this));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
Helper.WriteError("Kenne in " + this.Name + " [" + this.Id + "] " + match.Groups[4].Value + " nicht!");
|
||||||
@@ -41,17 +50,18 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
|
|
||||||
private void InitComplex(JsonData json) {
|
private void InitComplex(JsonData json) {
|
||||||
if (json.Keys.Contains("data") && json["data"].Keys.Contains("level") && json["data"]["level"].Keys.Contains("value") && json["data"]["level"]["value"].IsBoolean) {
|
if (json.Keys.Contains("data") && json["data"].Keys.Contains("level") && json["data"]["level"].Keys.Contains("value") && json["data"]["level"]["value"].IsBoolean) {
|
||||||
this._level = (Boolean)json["data"]["level"]["value"];
|
this._state = (Boolean)json["data"]["level"]["value"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override String ToString() {
|
public override String ToString() {
|
||||||
return "SwitchBinary " + this.Name + " [" + this.Id + "]: " + this.Level;
|
return "SwitchBinary " + this.Name + " [" + this.Id + "]: " + this.State;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level }
|
{ "State", this.State },
|
||||||
|
{ "Level", this.Level }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{ "level", this.Level }
|
{ "Level", this.Level }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
modes.Add(item.Key.ToString(), item.Value);
|
modes.Add(item.Key.ToString(), item.Value);
|
||||||
}
|
}
|
||||||
Dictionary<String, Object> json = new Dictionary<String, Object> {
|
Dictionary<String, Object> json = new Dictionary<String, Object> {
|
||||||
{ "level", this.Level },
|
{ "Level", this.Level },
|
||||||
{ "modes", modes }
|
{ "ValidModes", modes }
|
||||||
};
|
};
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,11 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
}
|
}
|
||||||
public Int32 WakeupMin { get; private set; }
|
public Int32 WakeupMin { get; private set; }
|
||||||
public Int32 WakeupMax { get; private set; }
|
public Int32 WakeupMax { get; private set; }
|
||||||
|
public Boolean HasMinMaxState { get; private set; }
|
||||||
|
public Int32 HasMinMaxLevel { get { return (this.HasMinMaxState) ? 1 : 0; } }
|
||||||
public Int32 WakeupDefault { get; private set; }
|
public Int32 WakeupDefault { get; private set; }
|
||||||
|
public Boolean HasDefaultState { get; private set; }
|
||||||
|
public Int32 HasDefaultLevel { get { return (this.HasDefaultState) ? 1 : 0; } }
|
||||||
public DateTime LastWakeup { get; private set; }
|
public DateTime LastWakeup { get; private set; }
|
||||||
public DateTime LastSleep { get; private set; }
|
public DateTime LastSleep { get; private set; }
|
||||||
|
|
||||||
@@ -51,19 +55,24 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
if (data.Keys.Contains("nodeId") && data["nodeId"].Keys.Contains("value")) {
|
if (data.Keys.Contains("nodeId") && data["nodeId"].Keys.Contains("value")) {
|
||||||
this._againstNode = Int32.Parse(data["nodeId"]["value"].ToString());
|
this._againstNode = Int32.Parse(data["nodeId"]["value"].ToString());
|
||||||
}
|
}
|
||||||
if (data.Keys.Contains("min") && data["min"].Keys.Contains("value")) {
|
this.HasMinMaxState = false;
|
||||||
|
if (data.Keys.Contains("min") && data["min"].Keys.Contains("value") && data["min"]["value"] != null) {
|
||||||
this.WakeupMin = Int32.Parse(data["min"]["value"].ToString());
|
this.WakeupMin = Int32.Parse(data["min"]["value"].ToString());
|
||||||
|
this.HasMinMaxState = true;
|
||||||
}
|
}
|
||||||
if (data.Keys.Contains("max") && data["max"].Keys.Contains("value")) {
|
if (data.Keys.Contains("max") && data["max"].Keys.Contains("value") && data["max"]["value"] != null) {
|
||||||
this.WakeupMax = Int32.Parse(data["max"]["value"].ToString());
|
this.WakeupMax = Int32.Parse(data["max"]["value"].ToString());
|
||||||
|
this.HasMinMaxState = true;
|
||||||
}
|
}
|
||||||
if (data.Keys.Contains("default") && data["default"].Keys.Contains("value")) {
|
this.HasDefaultState = false;
|
||||||
|
if (data.Keys.Contains("default") && data["default"].Keys.Contains("value") && data["default"]["value"] != null) {
|
||||||
this.WakeupDefault = Int32.Parse(data["default"]["value"].ToString());
|
this.WakeupDefault = Int32.Parse(data["default"]["value"].ToString());
|
||||||
|
this.HasDefaultState = true;
|
||||||
}
|
}
|
||||||
if (data.Keys.Contains("lastWakeup") && data["lastWakeup"].Keys.Contains("value")) {
|
if (data.Keys.Contains("lastWakeup") && data["lastWakeup"].Keys.Contains("value") && data["lastWakeup"]["value"] != null) {
|
||||||
this.LastWakeup = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(data["lastWakeup"]["value"].ToString())).DateTime.ToLocalTime();
|
this.LastWakeup = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(data["lastWakeup"]["value"].ToString())).DateTime.ToLocalTime();
|
||||||
}
|
}
|
||||||
if (data.Keys.Contains("lastSleep") && data["lastSleep"].Keys.Contains("value")) {
|
if (data.Keys.Contains("lastSleep") && data["lastSleep"].Keys.Contains("value") && data["lastSleep"]["value"] != null) {
|
||||||
this.LastSleep = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(data["lastSleep"]["value"].ToString())).DateTime.ToLocalTime();
|
this.LastSleep = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(data["lastSleep"]["value"].ToString())).DateTime.ToLocalTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,23 +99,28 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
this._againstNode = Int32.Parse(json["nodeId"]["value"].ToString());
|
this._againstNode = Int32.Parse(json["nodeId"]["value"].ToString());
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
if (json.Keys.Contains("min") && json["min"].Keys.Contains("value")) {
|
this.HasMinMaxState = false;
|
||||||
|
if (json.Keys.Contains("min") && json["min"].Keys.Contains("value") && json["min"]["value"] != null) {
|
||||||
this.WakeupMin = Int32.Parse(json["min"]["value"].ToString());
|
this.WakeupMin = Int32.Parse(json["min"]["value"].ToString());
|
||||||
success = true;
|
success = true;
|
||||||
|
this.HasMinMaxState = true;
|
||||||
}
|
}
|
||||||
if (json.Keys.Contains("max") && json["max"].Keys.Contains("value")) {
|
if (json.Keys.Contains("max") && json["max"].Keys.Contains("value") && json["max"]["value"] != null) {
|
||||||
this.WakeupMax = Int32.Parse(json["max"]["value"].ToString());
|
this.WakeupMax = Int32.Parse(json["max"]["value"].ToString());
|
||||||
success = true;
|
success = true;
|
||||||
|
this.HasMinMaxState = true;
|
||||||
}
|
}
|
||||||
if (json.Keys.Contains("default") && json["default"].Keys.Contains("value")) {
|
this.HasDefaultState = false;
|
||||||
|
if (json.Keys.Contains("default") && json["default"].Keys.Contains("value") && json["default"]["value"] != null) {
|
||||||
this.WakeupDefault = Int32.Parse(json["default"]["value"].ToString());
|
this.WakeupDefault = Int32.Parse(json["default"]["value"].ToString());
|
||||||
success = true;
|
success = true;
|
||||||
|
this.HasDefaultState = true;
|
||||||
}
|
}
|
||||||
if (json.Keys.Contains("lastWakeup") && json["lastWakeup"].Keys.Contains("value")) {
|
if (json.Keys.Contains("lastWakeup") && json["lastWakeup"].Keys.Contains("value") && json["lastWakeup"]["value"] != null) {
|
||||||
this.LastWakeup = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(json["lastWakeup"]["value"].ToString())).DateTime.ToLocalTime();
|
this.LastWakeup = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(json["lastWakeup"]["value"].ToString())).DateTime.ToLocalTime();
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
if (json.Keys.Contains("lastSleep") && json["lastSleep"].Keys.Contains("value")) {
|
if (json.Keys.Contains("lastSleep") && json["lastSleep"].Keys.Contains("value") && json["lastSleep"]["value"] != null) {
|
||||||
this.LastSleep = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(json["lastSleep"]["value"].ToString())).DateTime.ToLocalTime();
|
this.LastSleep = DateTimeOffset.FromUnixTimeSeconds(Int64.Parse(json["lastSleep"]["value"].ToString())).DateTime.ToLocalTime();
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
@@ -124,13 +138,17 @@ namespace BlubbFish.IoT.Zway.Devices.CommandClasses {
|
|||||||
|
|
||||||
public override Dictionary<String, Object> ToDictionary() {
|
public override Dictionary<String, Object> ToDictionary() {
|
||||||
return new Dictionary<String, Object> {
|
return new Dictionary<String, Object> {
|
||||||
{"interval", this.Interval },
|
{ "Interval", this.Interval },
|
||||||
{"againstnode", this.AgainstNode },
|
{ "AgainstNode", this.AgainstNode },
|
||||||
{ "wakeupmin", this.WakeupMin },
|
{ "WakeupMin", this.WakeupMin },
|
||||||
{ "wakeupmax", this.WakeupMax },
|
{ "WakeupMax", this.WakeupMax },
|
||||||
{ "wakeupdefault", this.WakeupDefault },
|
{ "HasMinMaxState", this.HasMinMaxState },
|
||||||
{ "lastwakeup", this.LastWakeup.ToString() },
|
{ "HasMinMaxLevel", this.HasMinMaxLevel },
|
||||||
{ "lastsleep", this.LastSleep.ToString() }
|
{ "WakeupDefault", this.WakeupDefault },
|
||||||
|
{ "HasDefaultState", this.HasDefaultState },
|
||||||
|
{ "HasDefaultLevel", this.HasDefaultLevel },
|
||||||
|
{ "LastWakeup", this.LastWakeup.ToString() },
|
||||||
|
{ "LastSleep", this.LastSleep.ToString() }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,55 +10,14 @@ namespace BlubbFish.IoT.Zway.Events {
|
|||||||
public DeviceUpdateEvent() {
|
public DeviceUpdateEvent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceUpdateEvent(Double value, DateTime time, Object parent) {
|
public DeviceUpdateEvent(Object value, DateTime time, Object parent) {
|
||||||
this.GetDouble = value;
|
this.GetValue = value;
|
||||||
this.UpdateTime = time;
|
this.UpdateTime = time;
|
||||||
this.Parent = parent;
|
this.Parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceUpdateEvent(Boolean value, DateTime time, Object parent) {
|
public Object GetValue { get; }
|
||||||
this.GetBoolean = value;
|
|
||||||
this.UpdateTime = time;
|
|
||||||
this.Parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DeviceUpdateEvent(DateTime value, DateTime time, Object parent) {
|
|
||||||
this.GetDate = value;
|
|
||||||
this.UpdateTime = time;
|
|
||||||
this.Parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DeviceUpdateEvent(Tuple<String, String, Double> value, DateTime time, Object parent) {
|
|
||||||
this.GetStringStringDoubleTuple = value;
|
|
||||||
this.UpdateTime = time;
|
|
||||||
this.Parent = parent;
|
|
||||||
}
|
|
||||||
public DeviceUpdateEvent(Tuple<String, String, Double, Double, Double, Boolean> value, DateTime time, Object parent) {
|
|
||||||
this.GetStringStringDoubleDoubleDoubleDoubleBooleanTuple = value;
|
|
||||||
this.UpdateTime = time;
|
|
||||||
this.Parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DeviceUpdateEvent(Tuple<Int32, Int32> value, DateTime time, Object parent) {
|
|
||||||
this.GetIntegerTuple = value;
|
|
||||||
this.UpdateTime = time;
|
|
||||||
this.Parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DeviceUpdateEvent(Tuple<Int64, Int32> value, DateTime time, Object parent) {
|
|
||||||
this.GetLongIntegerTuple = value;
|
|
||||||
this.UpdateTime = time;
|
|
||||||
this.Parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Double GetDouble { get; }
|
|
||||||
public DateTime GetDate { get; }
|
|
||||||
public Tuple<String, String, Double> GetStringStringDoubleTuple { get; }
|
|
||||||
public Tuple<String, String, Double, Double, Double, Boolean> GetStringStringDoubleDoubleDoubleDoubleBooleanTuple { get; }
|
|
||||||
public Tuple<Int64, Int32> GetLongIntegerTuple { get; }
|
|
||||||
public DateTime UpdateTime { get; }
|
public DateTime UpdateTime { get; }
|
||||||
public Object Parent { get; private set; }
|
public Object Parent { get; private set; }
|
||||||
public Boolean GetBoolean { get; }
|
|
||||||
public Tuple<Int32,Int32> GetIntegerTuple { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,11 +16,16 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
|||||||
Basic = 32,
|
Basic = 32,
|
||||||
ControllerReplication = 33,
|
ControllerReplication = 33,
|
||||||
ApplicationStatus = 34,
|
ApplicationStatus = 34,
|
||||||
SensorBinary = 48,
|
SwitchAll = 39,
|
||||||
|
SceneActivation = 43,
|
||||||
SwitchColor = 51,
|
SwitchColor = 51,
|
||||||
MeterPulse = 53,
|
MeterPulse = 53,
|
||||||
|
CRC16 = 86,
|
||||||
|
AssociationGroupInformation = 89,
|
||||||
|
DeviceResetLocally = 90,
|
||||||
|
ZWavePlusInfo = 94,
|
||||||
MultiChannel = 96,
|
MultiChannel = 96,
|
||||||
Alarm = 113,
|
DoorLock = 98,
|
||||||
ManufacturerSpecific = 114,
|
ManufacturerSpecific = 114,
|
||||||
PowerLevel = 115,
|
PowerLevel = 115,
|
||||||
Protection = 117,
|
Protection = 117,
|
||||||
@@ -28,19 +33,25 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
|||||||
FirmwareUpdate = 122,
|
FirmwareUpdate = 122,
|
||||||
Association = 133,
|
Association = 133,
|
||||||
Version = 134,
|
Version = 134,
|
||||||
|
Proprietary = 136,
|
||||||
MultiChannelAssociation = 142,
|
MultiChannelAssociation = 142,
|
||||||
MultiCmd = 143
|
MultiCmd = 143,
|
||||||
|
Security = 152,
|
||||||
|
AlarmSensor = 156 //
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Classes : Int32 {
|
public enum Classes : Int32 {
|
||||||
SwitchBinary = 37,
|
SwitchBinary = 37,
|
||||||
SwitchMultilevel = 38,
|
SwitchMultilevel = 38,
|
||||||
|
SceneControllerConf = 45,
|
||||||
|
SensorBinary = 48,
|
||||||
SensorMultilevel = 49,
|
SensorMultilevel = 49,
|
||||||
Meter = 50,
|
Meter = 50,
|
||||||
ThermostatMode = 64,
|
ThermostatMode = 64,
|
||||||
ThermostatSetPoint = 67,
|
ThermostatSetPoint = 67,
|
||||||
CentralScene = 91,
|
CentralScene = 91,
|
||||||
Configuration = 112,
|
Configuration = 112,
|
||||||
|
Alarm = 113,
|
||||||
Battery = 128,
|
Battery = 128,
|
||||||
Wakeup = 132,
|
Wakeup = 132,
|
||||||
Indicator = 135
|
Indicator = 135
|
||||||
@@ -153,13 +164,16 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
|||||||
|
|
||||||
protected void PollSubGlobal() {
|
protected void PollSubGlobal() {
|
||||||
Boolean poll = false;
|
Boolean poll = false;
|
||||||
|
Boolean pollonce = false;
|
||||||
foreach (KeyValuePair<Int32, ACommandClass> item in this.Sub) {
|
foreach (KeyValuePair<Int32, ACommandClass> item in this.Sub) {
|
||||||
if (item.Value.Polling) {
|
if (item.Value.Polling) {
|
||||||
poll = true;
|
poll = true;
|
||||||
break;
|
}
|
||||||
|
if(item.Value.PollOnce) {
|
||||||
|
pollonce = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (poll) {
|
if (poll || pollonce) {
|
||||||
this.http.GetVoid("ZWave.zway/Run/devices[" + this.DeviceId + "].instances[" + this.Instance + "].commandClasses[" + ((Int32)this.Commandclass).ToString() + "].Get()");
|
this.http.GetVoid("ZWave.zway/Run/devices[" + this.DeviceId + "].instances[" + this.Instance + "].commandClasses[" + ((Int32)this.Commandclass).ToString() + "].Get()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,9 +224,9 @@ namespace BlubbFish.IoT.Zway.Interfaces {
|
|||||||
|
|
||||||
public String ToJson() {
|
public String ToJson() {
|
||||||
Dictionary<String, Object> json = this.ToDictionary();
|
Dictionary<String, Object> json = this.ToDictionary();
|
||||||
json.Add("date", this.LastUpdate.ToString());
|
json.Add("LastUpdate", this.LastUpdate.ToString());
|
||||||
json.Add("name", this.Name);
|
json.Add("Name", this.Name);
|
||||||
json.Add("class", this.Commandclass.ToString());
|
json.Add("Commandclass", this.Commandclass.ToString());
|
||||||
return JsonMapper.ToJson(json);
|
return JsonMapper.ToJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Zway")]
|
[assembly: AssemblyProduct("Zway")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
[assembly: AssemblyCopyright("Copyright © 2017 - 25.12.2017")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
@@ -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.3.2.0")]
|
[assembly: AssemblyVersion("1.3.5.3")]
|
||||||
[assembly: AssemblyFileVersion("1.3.2.0")]
|
[assembly: AssemblyFileVersion("1.3.5.3")]
|
||||||
|
|||||||
@@ -43,14 +43,19 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Devices\CommandClasses\Alarm.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\Battery.cs" />
|
<Compile Include="Devices\CommandClasses\Battery.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\CommandClassSubs\Configurationsub.cs" />
|
<Compile Include="Devices\CommandClasses\CommandClassSubs\Configurationsub.cs" />
|
||||||
|
<Compile Include="Devices\CommandClasses\CommandClassSubs\SceneControllerConfSub.cs" />
|
||||||
|
<Compile Include="Devices\CommandClasses\CommandClassSubs\SensorBinarySub.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\CommandClassSubs\ThermostatSetPointSub.cs" />
|
<Compile Include="Devices\CommandClasses\CommandClassSubs\ThermostatSetPointSub.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\Configuration.cs" />
|
<Compile Include="Devices\CommandClasses\Configuration.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\Indicator.cs" />
|
<Compile Include="Devices\CommandClasses\Indicator.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\Meter.cs" />
|
<Compile Include="Devices\CommandClasses\Meter.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\CommandClassSubs\MeterSub.cs" />
|
<Compile Include="Devices\CommandClasses\CommandClassSubs\MeterSub.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\CommandClassSubs\SensorMultilevelSub.cs" />
|
<Compile Include="Devices\CommandClasses\CommandClassSubs\SensorMultilevelSub.cs" />
|
||||||
|
<Compile Include="Devices\CommandClasses\SceneControllerConf.cs" />
|
||||||
|
<Compile Include="Devices\CommandClasses\SensorBinary.cs" />
|
||||||
<Compile Include="Devices\CommandClasses\Wakeup.cs" />
|
<Compile Include="Devices\CommandClasses\Wakeup.cs" />
|
||||||
<Compile Include="Devices\Device.cs" />
|
<Compile Include="Devices\Device.cs" />
|
||||||
<Compile Include="Interfaces\ACommandClass.cs" />
|
<Compile Include="Interfaces\ACommandClass.cs" />
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user