homebridge-edomoticz 2.1.45 → 2.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/domoticz.js +4 -4
- package/lib/domoticz_accessory.js +4 -3
- package/package.json +1 -1
package/lib/domoticz.js
CHANGED
|
@@ -33,7 +33,7 @@ Domoticz.settings = function(accessory, completion, error) {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var url = accessory.platform.apiBaseURL + "type=
|
|
36
|
+
var url = accessory.platform.apiBaseURL + "type=command¶m=getsettings";
|
|
37
37
|
baseHttpRequest.get({
|
|
38
38
|
url: url
|
|
39
39
|
}, function(err, response, json) {
|
|
@@ -59,7 +59,7 @@ Domoticz.devices = function(baseURL, roomID, completion, error) {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
var url = baseURL + "type=
|
|
62
|
+
var url = baseURL + "type=command¶m=getdevices&used=true&order=Name";
|
|
63
63
|
if (roomID) {
|
|
64
64
|
url += "&plan=" + roomID;
|
|
65
65
|
}
|
|
@@ -102,7 +102,7 @@ Domoticz.hardware = function(baseURL, completion, error) {
|
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
var url = baseURL + "type=
|
|
105
|
+
var url = baseURL + "type=command¶m=gethardware";
|
|
106
106
|
|
|
107
107
|
baseHttpRequest.get({
|
|
108
108
|
url: url
|
|
@@ -133,7 +133,7 @@ Domoticz.deviceStatus = function(accessory, completion, error) {
|
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
var url = accessory.platform.apiBaseURL + "type=
|
|
136
|
+
var url = accessory.platform.apiBaseURL + "type=command¶m=getdevices&rid=" + accessory.idx;
|
|
137
137
|
baseHttpRequest.get({
|
|
138
138
|
url: url
|
|
139
139
|
}, function(err, response, json) {
|
|
@@ -600,7 +600,7 @@ eDomoticzAccessory.prototype = {
|
|
|
600
600
|
url = this.platform.apiBaseURL + "type=command¶m=udevice&idx=" + this.idx;
|
|
601
601
|
url = url + "&nvalue=0&svalue=" + setpoint;
|
|
602
602
|
} else if (this.subType == "Zone") {
|
|
603
|
-
url = this.platform.apiBaseURL + "type=setused&idx=" + this.idx + "&setpoint=";
|
|
603
|
+
url = this.platform.apiBaseURL + "type=command¶m=setused&idx=" + this.idx + "&setpoint=";
|
|
604
604
|
url = url + setpoint + "&mode=PermanentOverride&used=true";
|
|
605
605
|
}
|
|
606
606
|
this.platform.log("Setting thermostat SetPoint to " + setpoint);
|
|
@@ -635,7 +635,7 @@ eDomoticzAccessory.prototype = {
|
|
|
635
635
|
var heat = (this.Type == "Heating" && this.subType == "Zone") ? true : false;
|
|
636
636
|
var therm = (this.Type == "Thermostat" && this.subType == "SetPoint") ? true : false;
|
|
637
637
|
temp = (heat || therm) ? Helper.oneDP(Helper.cleanFloat(s.SetPoint)) : Helper.oneDP(Helper.cleanFloat(s.Temp));
|
|
638
|
-
url = this.platform.apiBaseURL + "type=setused&idx=" + this.idx + "&setpoint=";
|
|
638
|
+
url = this.platform.apiBaseURL + "type=command¶m=setused&idx=" + this.idx + "&setpoint=";
|
|
639
639
|
url = url + temp + "&mode=" + mode;
|
|
640
640
|
url = (mode == "TemporaryOverride") ? url + "&until=" + isonow + "&used=true" : url + "&used=true";
|
|
641
641
|
this.platform.log("Setting thermostat SetPoint to " + temp + ", mode to " + mode);
|
|
@@ -1500,6 +1500,7 @@ eDomoticzAccessory.prototype = {
|
|
|
1500
1500
|
var service = this.getService(Service.LightSensor);
|
|
1501
1501
|
var lightSensorCharacteristic = this.getCharacteristic(service, Characteristic.CurrentAmbientLightLevel);
|
|
1502
1502
|
var val9 = Helper.cleanFloat(message.svalue1);
|
|
1503
|
+
val9 = (val9 == 0) ? 0.0001 : val9;
|
|
1503
1504
|
callback(lightSensorCharacteristic, val9);
|
|
1504
1505
|
break;
|
|
1505
1506
|
} else if (this.subType == "Waterflow") {
|
|
@@ -1785,7 +1786,7 @@ eDomoticzAccessory.prototype = {
|
|
|
1785
1786
|
}).on('set', this.setdValue.bind(this)).on('get', this.getdValue.bind(this));
|
|
1786
1787
|
} else {
|
|
1787
1788
|
this.gracefullyAddCharacteristic(service, Characteristic.Brightness).on('set', this.setdValue.bind(this)).on('get', this.getdValue.bind(this));
|
|
1788
|
-
if (this.subType == "RGBW" || this.subType == "RGBWW" || this.subType == "RGBWWZ" || this.subType == "RGB" ) {
|
|
1789
|
+
if (this.subType == "RGBW" || this.subType == "RGBWW" || this.subType == "RGBWWZ" || this.subType == "RGBWZ" || this.subType == "RGB" ) {
|
|
1789
1790
|
this.gracefullyAddCharacteristic(service, Characteristic.Hue).on('set', this.setHueValue.bind(this, 'Hue')).on('get', this.getHueValue.bind(this, 'Hue'));
|
|
1790
1791
|
this.gracefullyAddCharacteristic(service, Characteristic.Saturation).on('set', this.setHueValue.bind(this, 'Saturation')).on('get', this.getHueValue.bind(this, 'Saturation'));
|
|
1791
1792
|
} else if (this.subType == 'WW') {
|