homebridge-edomoticz 2.1.40 → 2.1.45
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/CHANGELOG +0 -0
- package/InstallGuide +0 -0
- package/LICENSE +0 -0
- package/README.md +7 -0
- package/index.js +0 -0
- package/lib/constants.js +0 -0
- package/lib/domoticz.js +0 -0
- package/lib/domoticz_accessory.js +19 -4
- package/lib/helper.js +0 -0
- package/lib/mqtt.js +0 -0
- package/lib/services.js +0 -0
- package/package.json +1 -1
package/CHANGELOG
CHANGED
|
File without changes
|
package/InstallGuide
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -124,6 +124,13 @@ The dimFix variable relates to an early issue between HomeKit and Domoticz regar
|
|
|
124
124
|
|
|
125
125
|
<details><summary><b>Advanced Configuration</b></summary>
|
|
126
126
|
|
|
127
|
+
### Dim Offset
|
|
128
|
+
The dimFix variable relates to an early issue between HomeKit and Domoticz regarding scaling of dimmer values. If you find that you can never set your dimmers to 100%, then set this variable to 1. If you find that, when you set your dimmers, this starts a never ending loop of brightness increasing by 1%, then you MUST omit this variable or set it to 0.
|
|
129
|
+
|
|
130
|
+
### Use legacy blind support
|
|
131
|
+
If you use blinds, set this option to 1 if you use an older version of domoticz (until 2022-beta.14535). If using a more recent version, set to 0. When set to 0, the new reverse state and position will be used
|
|
132
|
+
|
|
133
|
+
|
|
127
134
|
### MQTT
|
|
128
135
|
By default, the plugin will grab hardware information regarding MQTT from Domoticz if `mqtt` is 1 or true in the configuration file.
|
|
129
136
|
Advanced users can override their MQTT configuration as follows:
|
package/index.js
CHANGED
|
File without changes
|
package/lib/constants.js
CHANGED
|
File without changes
|
package/lib/domoticz.js
CHANGED
|
File without changes
|
|
@@ -353,8 +353,13 @@ eDomoticzAccessory.prototype = {
|
|
|
353
353
|
}
|
|
354
354
|
if (this.hueValue !== undefined && this.saturationValue !== undefined && this.hueSemaphore !== undefined && this.hueSemaphore > 0) {
|
|
355
355
|
this.hueSemaphore = undefined;
|
|
356
|
+
var c = this.cachedValues[Characteristic.Brightness.UUID],
|
|
357
|
+
b = 100; // retain current brightness...
|
|
358
|
+
if (typeof c !== 'undefined') {
|
|
359
|
+
b = this.platform.config.dimFix == 1 ? Math.floor(c / this.factor) + 1 : Math.floor(c / this.factor);
|
|
360
|
+
}
|
|
356
361
|
Domoticz.updateDeviceStatus(this, "setcolbrightnessvalue", {
|
|
357
|
-
"hex": Helper.HSVtoRGB([this.hueValue, this.saturationValue,
|
|
362
|
+
"hex": Helper.HSVtoRGB([this.hueValue, this.saturationValue, b])
|
|
358
363
|
}, function (success) {
|
|
359
364
|
callback();
|
|
360
365
|
}.bind(this));
|
|
@@ -740,7 +745,12 @@ eDomoticzAccessory.prototype = {
|
|
|
740
745
|
return;
|
|
741
746
|
}
|
|
742
747
|
|
|
743
|
-
|
|
748
|
+
if (this.platform.config.legacyBlinds == 1) {
|
|
749
|
+
var command = (shouldOpen ? "On" : "Off");
|
|
750
|
+
} else {
|
|
751
|
+
var command = (shouldOpen ? "Close" : "Open");
|
|
752
|
+
}
|
|
753
|
+
|
|
744
754
|
Domoticz.updateDeviceStatus(this, "switchlight", {
|
|
745
755
|
"switchcmd": command
|
|
746
756
|
}, function (success) {
|
|
@@ -1315,10 +1325,15 @@ eDomoticzAccessory.prototype = {
|
|
|
1315
1325
|
position = message.svalue1 * this.factor;
|
|
1316
1326
|
}
|
|
1317
1327
|
} else if ((this.swTypeVal == Constants.DeviceTypeBlindsVenetianUS || this.swTypeVal == Constants.DeviceTypeBlindsVenetianEU) && message.nvalue > 1) {
|
|
1318
|
-
position = (message.nvalue == 15 ? 100 : 0);
|
|
1328
|
+
//position = (message.nvalue == 15 ? 100 : 0);
|
|
1329
|
+
if (message.ReverseState == 'true') {
|
|
1330
|
+
position = ((message.nvalue == 16 || message.nvalue == 18) ? 100 : 0);
|
|
1331
|
+
} else {
|
|
1332
|
+
position = ((message.nvalue == 15 || message.nvalue == 17) ? 100 : 0);
|
|
1333
|
+
}
|
|
1319
1334
|
} else {
|
|
1320
1335
|
if (message.ReverseState == 'true') {
|
|
1321
|
-
position = (message.nvalue ==
|
|
1336
|
+
position = (message.nvalue == 1 ? 0 : 100);
|
|
1322
1337
|
} else {
|
|
1323
1338
|
position = (message.nvalue == 1 ? 100 : 0);
|
|
1324
1339
|
}
|
package/lib/helper.js
CHANGED
|
File without changes
|
package/lib/mqtt.js
CHANGED
|
File without changes
|
package/lib/services.js
CHANGED
|
File without changes
|