From 685e870b288fbfb43b8244682101fb58f5c3c03a Mon Sep 17 00:00:00 2001 From: Feilner Date: Sat, 14 May 2022 12:23:24 +0200 Subject: [PATCH] continue adding to config.schema.json --- CHANGELOG.md | 11 +- README.md | 24 +-- config.schema.json | 519 +++++++++++++++++++++++++++++++++++++++------ package.json | 2 +- 4 files changed, 472 insertions(+), 84 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1adbfd8..5dba1e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,10 @@ # Changelog -## [1.1.0-beta.0] 2022-04-28 +## [1.1.0-beta.4] 2022-05-14 ### Changed **Action required** Breaking changes! In order to support configuration by GUI some configuration options needs to be renamed. - `PLC_LightBulb`: - - renamed option `set_On` -> `set_On_ - renamed option `minValue` -> `minBrightnessValue` and changed default value from `20` to `0` - renamed option `maxValue` -> `maxBrightnessValue` - renamed option `minStep` -> `minBrightnessStep` @@ -70,8 +69,12 @@ In order to support configuration by GUI some configuration options needs to be - renamed option `invert` -> `invertLeakDetected` - `PLC_ContactSensor` - renamed option `invert` -> `invertContactSensorState` - - +- `PLC_Fan` + - renamed option `mapGetCurrent` -> `mapCurrentFanStateGet` + - renamed option `mapGetTarget` -> `mapTargetFanStateGet` + - renamed option `mapSetTarget` -> `mapTargetFanStateSet` + - renamed option `mapDirectionGet` -> `mapRotationDirectionGet` + - renamed option `mapDirectionSet` -> `mapRotationDirectionSet` - ### Added - `PLC_Thermostat` - option `minTemperatureValue` diff --git a/README.md b/README.md index 0878f1d..f03a5c3 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ Humidifier and/or Dehumidifier - `0`: swing disabled - `1`: swing enabled - Water Level - - `get_WaterLevel`: **(optional)** **(push support)** offset to get rotation speed state S7 type `Real` e.g. `8` for `DB4DBD8`. + - `get_WaterLevel`: **(optional)** **(push support)** offset to water level S7 type `Real` e.g. `8` for `DB4DBD8`. - `get_StatusTampered`: **(optional)** **(push support)** offset and bit to tamper detection. (Home app shows this only within the options) S7 type `Bool` e.g. `55.2` for `DB4DBX55.2` - `false`: ok - `true`: tampered @@ -323,7 +323,7 @@ motor driven blinds, windows and doors. Supports also manual driven blinds, wind - `in between`: partly open - `100`: open - `invertPosition`: **(optional)** set to `true` to inverts the values of current and target position from `0:closed 100:open` to `100:closed 0:open` - - `mapGet`: **(optional)** define mapping array for get position. The PLC value is used as index into the table. e.g. `[0, 25, 100]` which maps the PLC value `0->0 1->25 2->100` this this is useful e.g. for window open state. + - `mapGetCurrentPosition`: **(optional)** define mapping array for get position. The PLC value is used as index into the table. e.g. `[0, 25, 100]` which maps the PLC value `0->0 1->25 2->100` this this is useful e.g. for window open state. - Target position: - if one of the **(optional)** target position settings need specified all are needed. If not specified it os not movable ans sticks to current position. - `get_TargetPosition`: **(optional)** **(push support)** offset to get target position S7 type `Byte` e.g. `1` for `DB4DBB1` (can have same value as set_TargetPosition) @@ -338,7 +338,7 @@ motor driven blinds, windows and doors. Supports also manual driven blinds, wind - `0`: down - `1`: up - `2`: stop -- `set_HoldPosition`: **(optional)** **(control support)** offset and bit set to 1 to stop movement. (Seems not to be used) when not defined writes will be ignoredS7 type `Bool` **PLC has to set to 0** e.g. `55.1` for `DB4DBX55.1` +- `set_HoldPosition`: **(optional)** **(control support)** offset and bit set to 1 to stop movement. (Seems not to be used by HomeApp) when not defined writes will be ignoredS7 type `Bool` **PLC has to set to 0** e.g. `55.1` for `DB4DBX55.1` ### Occupancy Sensor as `PLC_OccupancySensor` presence detection sensor @@ -407,11 +407,11 @@ leak sensor - `name`: unique name of the accessory - `manufacturer`: **(optional)** description - `db`: s7 data base number e.g. `4` for `DB4` -- `invert`: **(optional)** set to `true` inverts the bit to `false:closed` and `true:open`. +- `invertLeakDetected`: **(optional)** set to `true` inverts the bit to `false:leak detected` and `true: no leak detected`. - `enablePolling`: **(optional)** when set to `true` the current state will be polled. It is mandatory as well to enable polling mode on platform level. - `pollInterval`: **(optional)** poll interval in seconds. Default value see platform definition. - `get_LeakDetected`: **(push support)** offset and bit get the current status S7 type `Bool` e.g. `55.0` for `DB4DBX55.0` - - `false`: leak not detected + - `false`: no leak detected - `true`: leak detected - `get_StatusTampered`: **(optional)** **(push support)** offset and bit to tamper detection. (Home app shows this only within the options) S7 type `Bool` e.g. `55.2` for `DB4DBX55.2` - `false`: ok @@ -457,9 +457,9 @@ valve configurable as generic valve, irrigation, shower head or water faucet - `set_Active`: **(control support)** offset and bit set to 1 when switching on S7 type `Bool` **PLC has to set to 0** e.g. `55.1` for `DB4DBX55.1` - `set_Deactivate`: offset and bit set to 1 when switching off S7 type `Bool` **PLC has to set to 0** e.g. `55.2` for `DB4DBX55.2` - if one of the **(optional)** duration settings need specified all are needed - - `get_SetDuration`: **(optional)** **(push support)** duration 0..3600 sec S7 type `Time` e.g. `10` for `DB4DBD10` - - `set_SetDuration`: **(optional)** **(control support)** duration 0..3600 sec S7 type `Time` e.g. `14` for `DB4DBD14` - - `get_RemainingDuration`: **(optional)** **(push support)** duration 0..3600 sec S7 type `Time` e.g. `18` for `DB4DBD18` + - `get_SetDuration`: **(optional)** **(push support)** offset to get duration 0..3600 sec S7 type `Time` e.g. `10` for `DB4DBD10` + - `set_SetDuration`: **(optional)** **(control support)** offset to set duration 0..3600 sec S7 type `Time` e.g. `14` for `DB4DBD14` + - `get_RemainingDuration`: **(optional)** **(push support)** offset to get remaining duration 0..3600 sec S7 type `Time` e.g. `18` for `DB4DBD18` ### Security System as `PLC_SecuritySystem`: alarm system @@ -615,7 +615,7 @@ ventilator - `0`: inactive - `1`: idle - `2`: blowing - - `mapCurrentGet`: **(optional)** define mapping array for `get_CurrentFanState`. The PLC value is used as index into the table. e.g. `[0, 2]` which maps the PLC value `0->1 1->2` when the PLC supports only two states with `0:idle` and `1:blowing`. + - `mapCurrentFanStateGet`: **(optional)** define mapping array for `get_CurrentFanState`. The PLC value is used as index into the table. e.g. `[0, 2]` which maps the PLC value `0->1 1->2` when the PLC supports only two states with `0:idle` and `1:blowing`. - Target State: - `default_TargetFanState`: **(optional)** defines alternative value thats returned then `get_TargetFanState` is not defined. Default value `0:manual` - `0`: manual @@ -626,7 +626,7 @@ ventilator - `set_TargetFanState` **(optional but required when `get_TargetFanState` is defined)** **(control support)** offset to get target heating/cooling state. S7 type `Byte` e.g. `9` for `DB4DBB9`. When not defined fixed `1`: automatic is used. - `0`: manual - `1`: automatic - - `mapTargetGet`: **(optional)** define mapping array for `get_TargetFanState`. The PLC value is used as index into the table. e.g. `[1, 0]` which maps the PLC value `0->1 1->0` when the PLC supports only two states with `0:automatic` and `1:manual`. + - `mapTargetFanStateGet`: **(optional)** define mapping array for `get_TargetFanState`. The PLC value is used as index into the table. e.g. `[1, 0]` which maps the PLC value `0->1 1->0` when the PLC supports only two states with `0:automatic` and `1:manual`. - `mapTargetSet`: **(optional)** define mapping array for `set_TargetFanState`. The home app value is used as index into the table. e.g. `[1, 0]` which maps the PLC value `0->1 1->0` when the PLC supports only two states with `0:automatic` and `1:manual`. - Rotation Direction - get_RotationDirection **(optional)** **(push support)** offset to get rotation direction state. S7 type `Byte` e.g. `9` for `DB4DBB9`. When not defined fixed `0`: clockwise is used. @@ -635,8 +635,8 @@ ventilator - set_RotationDirection **(optional)** **(control support)** offset to set rotation directionstate. S7 type `Byte` e.g. `9` for `DB4DBB9`. - `0`: clockwise - `1`: counter clockwise - - `mapDirectionGet`: **(optional)** define mapping array for `get_RotationDirection`. The PLC value is used as index into the table. e.g. `[1, 0]` inverts the direction. - - `mapDirectionSet`: **(optional)** define mapping array for `set_RotationDirection`. The home app value is used as index into the table. e.g. `[1, 0]` inverts the direction. + - `mapRotationDirectionGet`: **(optional)** define mapping array for `get_RotationDirection`. The PLC value is used as index into the table. e.g. `[1, 0]` inverts the direction. + - `mapRotationDirectionSet`: **(optional)** define mapping array for `set_RotationDirection`. The home app value is used as index into the table. e.g. `[1, 0]` inverts the direction. - Rotation Speed - Byte - `get_RotationSpeedByte`: **(optional)** **(push support)** offset to get rotation speed state S7 type `Byte` e.g. `8` for `DB4DBB8`. diff --git a/config.schema.json b/config.schema.json index 1d1406f..0227a8b 100644 --- a/config.schema.json +++ b/config.schema.json @@ -209,11 +209,6 @@ } ] }, - "disable": { - "title": "Disable", - "description": "Disables the camera and removes it from HomeKit.", - "type": "boolean" - }, "name": { "title": "Name", "type": "string", @@ -267,39 +262,62 @@ }, "get_On": { - "title": "offset get_On (bool)", + "title": "offset get_On **(push support)**", "type": "number", - "description": "offset and bit to read current on/off state from PLC. S7 type Bool e.g. 55.1" + "description": "offset and bit to read current on/off state from PLC. S7 type Bool e.g. 55.1", + "required": true }, "set_On": { - "title": "Single Bit mode: offset set_On (bool)", + "title": "Single Bit mode: offset set_On **(control support)**", "type": "number", - "description": "Single Bit mode: offset and bit to set to 1/0 to PLC when switching on/off S7 type Bool PLC e.g. 55.1 for DB4DBX55.1 could be same as get_On." + "description": "Single Bit mode: offset and bit to set to 1/0 to PLC when switching on/off S7 type Bool PLC e.g. 55.1 for DB4DBX55.1 could be same as get_On.", + "required": true, + "condition": { + "functionBody": "return (!model.accessories[arrayIndices[0]].set_On_Set && !model.accessories[arrayIndices[0]].set_On_Reset);" + } }, "set_On_Set": { - "title": "Separate Bits mode: offset set_On SET (bool)", - "type": "number", - "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.2" + "title": "Separate Bits mode: set_On_Set **(control support)**", + "type": "number", + "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.2", + "required": true, + "condition": { + "functionBody": "return (!model.accessories[arrayIndices[0]].set_On);" + } }, "set_On_Reset": { - "title": "Separate Bits mode: offset set_On RESET (bool)", + "title": "Separate Bits mode: offset set_On_Reset", "type": "number", - "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.3
NOTE: When defining this the behaviour of set_On changes to Seperate Bit mode." + "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.3
NOTE: When defining this the behaviour of set_On changes to Seperate Bit mode.", + "required": true, + "condition": { + "functionBody": "return (!model.accessories[arrayIndices[0]].set_On);" + } }, "set_Active": { "title": "Single Bit mode: offset set_Active (bool)", "type": "number", - "description": "Single Bit mode: offset and bit to set to 1/0 to PLC when switching on/off S7 type Bool PLC e.g. 55.1 for DB4DBX55.1 could be same as get_Active
Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.2" + "description": "Single Bit mode: offset and bit to set to 1/0 to PLC when switching on/off S7 type Bool PLC e.g. 55.1 for DB4DBX55.1 could be same as get_Active
Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.2", + "condition": { + "functionBody": "return (!model.accessories[arrayIndices[0]].set_Active_Set && !model.accessories[arrayIndices[0]].set_Active_Reset);" + } + }, "set_Active_Set": { - "title": "Separate Bits mode: offset set_Active SET (bool)", - "type": "number", - "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.2" + "title": "Separate Bits mode: offset set_Active_Set", + "type": "number", + "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.2", + "condition": { + "functionBody": "return (!model.accessories[arrayIndices[0]].set_Active);" + } }, "set_Active_Reset": { - "title": "Separate Bits mode: offset set_Active RESET (bool)", + "title": "Separate Bits mode: offset set_Active_Reset", "type": "number", - "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.3
NOTE: When defining this the behaviour of set_Active changes to Seperate Bit mode." + "description": "Separate Bits mode: offset and bit set to 1 when switching off. PLC has to set to 0 S7 type Bool e.g. 55.3
NOTE: When defining this the behaviour of set_Active changes to Seperate Bit mode.", + "condition": { + "functionBody": "return (!model.accessories[arrayIndices[0]].set_Active);" + } }, "get_Brightness": { "title": "offset get_Brightness (byte)", @@ -372,52 +390,62 @@ "placeholder": 1 }, "minBrightnessValue": { - "title": "minTargetHumidityValue", + "title": "minBrightnessValue", "type": "number", "placeholder": 0 }, "maxBrightnessValue": { - "title": "maxTargetHumidityValue", + "title": "maxBrightnessValue", "type": "number", "placeholder": 100 }, "minBrightnessStep": { - "title": "minTargetHumidityStep", + "title": "minBrightnessStep", "type": "number", "placeholder": 1 }, "get_CurrentTemperature": { - "title": "offset get_CurrentTemperature (real)", + "title": "offset get_CurrentTemperature **(push support)**", "type": "number", "description": "offset to get current temperature S7 type Real e.g. 55 for DB4DBD55" }, "get_CurrentRelativeHumidity": { - "title": "offset get_CurrentRelativeHumidity (real)", + "title": "offset get_CurrentRelativeHumidity **(push support)**", "type": "number", "description": "offset to get current humidity S7 type Real e.g. 55 for DB4DBD55" }, "get_TargetTemperature": { - "title": "offset get_TargetTemperature (real)", + "title": "offset get_TargetTemperature **(push support)**", "type": "number", - "description": "offset to get target temperature S7 type `Real` e.g. `4` for `DB4DBD4" + "description": "offset to get target temperature S7 type `Real` e.g. `4` for `DB4DBD4`" }, "set_TargetTemperature": { - "title": "offset get_TargetTemperature (real)", + "title": "offset get_TargetTemperature **(control support)*", + "type": "number", + "description": "offset to set current temperature S7 type `Real` e.g. `4` for `DB4DBD4` (can have same value as get_TargetTemperature)" + }, + "get_TargetRelativeHumidity": { + "title": "offset get_TargetRelativeHumidity **(push support)**", + "type": "number", + "description": "offset to get target temperature S7 type `Real` e.g. `4` for `DB4DBD4`" + }, + "set_TargetRelativeHumidity": { + "title": "offset get_TargetTemperature **(control support)**", "type": "number", "description": "offset to set current temperature S7 type `Real` e.g. `4` for `DB4DBD4` (can have same value as get_TargetTemperature)" }, "get_CurrentHeatingCoolingState": { - "title": "offset get_CurrentHeatingCoolingState (byte)", + "title": "offset get_CurrentHeatingCoolingState **(push support)**", "type": "number", "description": "offset to get current heating/cooling state S7 type `Byte` e.g. `8` for `DB4DBB8`. When not defined fixed `1`: heating is used.
- `0`: inactive (shown as green in home app)
- `1`: heating (shown as orange in home app)
- `2`: cooling (shown as blue in home app)" }, "get_TargetHeatingCoolingState": { - "title": "offset get_CurrentHeatingCoolingState (byte)", + "title": "offset get_TargetHeatingCoolingState **(push support)**", "type": "number", "description": "offset to get target heating/cooling state. S7 type `Byte` e.g. `9` for `DB4DBB9`. When not defined fixed `3`: automatic is used.
- `0`: off
- `1`: heat
- `2`: cool
- `3`: automatic" }, "set_TargetHeatingCoolingState": { - "title": "offset set_TargetHeatingCoolingState (byte)", + "title": "offset set_TargetHeatingCoolingState **(control support)**", "type": "number", "description": "offset to set target heating/cooling state. Can be identical with `get_TargetHeatingCoolingState`. Has to be defined when `get_TargetHeatingCoolingState` is defined. When not defined writes changes are ignored. S7 type `Byte` e.g. `9` for `DB4DBB9`.
- `0`: off
- `1`: heat
- `2`: cool
- `3`: automatic" }, @@ -532,6 +560,65 @@ "title": "offset set_HoldPosition **(optional)** **(control support)**", "type": "number", "description": "offset and bit set to 1 to stop movement. (Seems not to be used by HomeApp) when not defined writes will be ignoredS7 type `Bool` **PLC has to set to 0** e.g. `55.1` for `DB4DBX55.1`" + }, + "get_OccupancyDetected": { + "title": "get_OccupancyDetected **(push support)**", + "type": "number", + "description": "offset and bit get the current status S7 type `Bool` e.g. `55.0` for `DB4DBX55.0`
- `false`: no occupancy
- `true`: occupancy detected" + }, + "invertOccupancy": { + "title": "invertOccupancy", + "type": "boolean", + "placeholder": false, + "description": "when enabled it inverts the logic of get_OccupancyDetected to
`false:motion detected` and `true:no motion`." + }, + "get_MotionDetected": { + "title": "get_MotionDetected **(push support)**", + "type": "number", + "description": "offset and bit get the current status S7 type `Bool` e.g. `55.0` for `DB4DBX55.0`
- `false`: no occupancy
- `true`: occupancy detected" + }, + "invertMotionDetected": { + "title": "invertMotionDetected", + "type": "boolean", + "placeholder": false, + "description": "when enabled it inverts the logic of get_MotionDetected to
`false:closed` and `true:no motion`." + }, + "get_ContactSensorState": { + "title": "get_ContactSensorState **(push support)**", + "type": "number", + "description": "offset and bit get the current status S7 type `Bool` e.g. `55.0` for `DB4DBX55.0`
- `false`: closed
- `true`: open" + }, + "invertContactSensorState": { + "title": "invertContactSensorState", + "type": "boolean", + "placeholder": false, + "description": "when enabled it inverts the logic of get_ContactSensorState to
`false:open` and `true:closed." + }, + "get_LeakDetected": { + "title": "get_LeakDetected **(push support)**", + "type": "number", + "description": "offset and bit get the current status S7 type `Bool` e.g. `55.0` for `DB4DBX55.0`
- `false`: no leak detected
- `true`: leak detected" + }, + "invertLeakDetected": { + "title": "invertLeakDetected", + "type": "boolean", + "placeholder": false, + "description": "when enabled it inverts the logic of get_ContactSensorState to
`false:leak detected` and `true:no leak detected." + }, + "get_SetDuration": { + "title": "get_SetDuration **(push support)**", + "type": "number", + "description": "offset to get duration 0..3600 sec S7 type `Time` e.g. `10` for `DB4DBD10`" + }, + "set_SetDuration": { + "title": "set_SetDuration **(control support)**", + "type": "number", + "description": "offset to set duration 0..3600 sec S7 type `Time` e.g. `14` for `DB4DBD10`" + }, + "get_RemainingDuration": { + "title": "get_RemainingDuration **(push support)**", + "type": "number", + "description": "offset to get remaining duration 0..3600 sec S7 type `Time` e.g. `18` for `DB4DBD10`" } } } @@ -602,19 +689,35 @@ "expandable": true, "expanded": false, "items": ["accessories[].enablePolling", "accessories[].pollInterval"] - }, + }, { "key": "accessories[]", "type": "section", - "title": "Active", + "title": "On/Off", "expandable": true, "expanded": false, "items": [ - "accessories[].get_On", - "accessories[].set_On", - "accessories[].set_On_Set", + "accessories[].get_On", + "accessories[].set_On", + "accessories[].set_On_Set", "accessories[].set_On_Reset" ], + "condition": { + "functionBody": "return ['PLC_LightBulb','PLC_Outlet','PLC_Switch'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "Active", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_Active", + "accessories[].set_Active", + "accessories[].set_Active_Set", + "accessories[].set_Active_Reset" + ], "condition": { "functionBody": "return ['PLC_HumidifierDehumidifier','PLC_Faucet','PLC_Valve','PLC_Fan'].includes(model.accessories[arrayIndices[0]].accessory);" } @@ -626,44 +729,46 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_Brightness", - "accessories[].set_Brightness", - "accessories[].minBrightnessValue", - "accessories[].maxBrightnessValue", + "accessories[].get_Brightness", + "accessories[].set_Brightness", + "accessories[].minBrightnessValue", + "accessories[].maxBrightnessValue", "accessories[].minBrightnessStep" ], "condition": { "functionBody": "return ['PLC_LightBulb'].includes(model.accessories[arrayIndices[0]].accessory);" } }, + { "key": "accessories[]", "type": "section", - "title": "On/Off", + "title": "Target Temperature", "expandable": true, "expanded": false, "items": [ - "accessories[].get_Active", - "accessories[].set_Active", - "accessories[].set_Active_Set", - "accessories[].set_Active_Reset" + "accessories[].get_TargetTemperature", + "accessories[].set_TargetTemperature", + "accessories[].minTargetTemperatureValue", + "accessories[].maxTargetTemperatureValue", + "accessories[].minTargetTemperatureStep" ], "condition": { - "functionBody": "return ['PLC_LightBulb','PLC_Outlet','PLC_Switch'].includes(model.accessories[arrayIndices[0]].accessory);" + "functionBody": "return ['PLC_Thermostat'].includes(model.accessories[arrayIndices[0]].accessory);" } }, { "key": "accessories[]", "type": "section", - "title": "Target Temperature", + "title": "Target Relative Humidity", "expandable": true, "expanded": false, "items": [ - "accessories[].get_TargetTemperature", - "accessories[].set_TargetTemperature", - "accessories[].minTargetTemperatureValue", - "accessories[].maxTargetTemperatureValue", - "accessories[].minTargetTemperatureStep" + "accessories[].get_TargetRelativeHumidity", + "accessories[].set_TargetRelativeHumidity", + "accessories[].minTargetHumidityValue", + "accessories[].maxTargetHumidityValue", + "accessories[].minTargetHumidityStep" ], "condition": { "functionBody": "return ['PLC_Thermostat'].includes(model.accessories[arrayIndices[0]].accessory);" @@ -687,9 +792,9 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_CurrentRelativeHumidity", - "accessories[].minHumidityValue", - "accessories[].maxHumidityValue", + "accessories[].get_CurrentRelativeHumidity", + "accessories[].minHumidityValue", + "accessories[].maxHumidityValue", "accessories[].minHumidityStep" ], "condition": { @@ -703,7 +808,7 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_StatusTampered", + "accessories[].get_StatusTampered", "accessories[].get_StatusLowBattery" ], "condition": { @@ -717,8 +822,8 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_CurrentHeatingCoolingState", - "accessories[].get_TargetHeatingCoolingState", + "accessories[].get_CurrentHeatingCoolingState", + "accessories[].get_TargetHeatingCoolingState", "accessories[].set_TargetHeatingCoolingState" ], "condition": { @@ -732,12 +837,12 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_CurrentHumidifierDehumidifierState", - "accessories[].get_TargetHumidifierDehumidifierState", - "accessories[].set_TargetHumidifierDehumidifierState", - "accessories[].default_TargetHumidifierDehumidifierState", - "accessories[].mapGetCurrentHumidifierDehumidifierState", - "accessories[].mapGetTargetHumidifierDehumidifierState", + "accessories[].get_CurrentHumidifierDehumidifierState", + "accessories[].get_TargetHumidifierDehumidifierState", + "accessories[].set_TargetHumidifierDehumidifierState", + "accessories[].default_TargetHumidifierDehumidifierState", + "accessories[].mapGetCurrentHumidifierDehumidifierState", + "accessories[].mapGetTargetHumidifierDehumidifierState", "accessories[].mapSetTargetHumidifierDehumidifierState" ], "condition": { @@ -751,7 +856,7 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_RotationSpeed", + "accessories[].get_RotationSpeed", "accessories[].set_RotationSpeed" ], "condition": { @@ -765,7 +870,7 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_RotationSpeedByte", + "accessories[].get_RotationSpeedByte", "accessories[].set_RotationSpeedByte" ], "condition": { @@ -779,7 +884,7 @@ "expandable": true, "expanded": false, "items": [ - "accessories[].get_SwingMode", + "accessories[].get_SwingMode", "accessories[].set_SwingMode" ], "condition": { @@ -830,7 +935,287 @@ "condition": { "functionBody": "return ['PLC_WindowCovering','PLC_Window','PLC_Door'].includes(model.accessories[arrayIndices[0]].accessory);" } + }, + { + "key": "accessories[]", + "type": "section", + "title": "Occupancy", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_OccupancyDetected", + "accessories[].invertOccupancy" + ], + "condition": { + "functionBody": "return ['PLC_OccupancySensor'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "Motion", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_MotionDetected", + "accessories[].invertMotionDetected" + ], + "condition": { + "functionBody": "return ['PLC_MotionSensor'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "ContactSensorState", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_ContactSensorState", + "accessories[].invertContactSensorState" + ], + "condition": { + "functionBody": "return ['PLC_ContactSensor'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "Duration", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_SetDuration", + "accessories[].set_SetDuration", + "accessories[].get_RemainingDuration" + ], + "condition": { + "functionBody": "return ['PLC_Valve'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "SecuritySystemCurrentState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_SecuritySystemCurrentState", + "accessories[].set_SetDuration" + ], + "condition": { + "functionBody": "return ['PLC_SecuritySystem'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "SecuritySystemTargetState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].set_SecuritySystemTargetState", + "accessories[].get_SecuritySystemTargetState", + "accessories[].mapSetSecuritySystemTargetState", + "accessories[].mapGetSecuritySystemTargetState" + ], + "condition": { + "functionBody": "return ['PLC_SecuritySystem'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "ProgrammableSwitchEvent xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].isEvent", + "accessories[].get_ProgrammableSwitchEvent" + ], + "condition": { + "functionBody": "return ['PLC_StatelessProgrammableSwitch'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "LockCurrentState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_LockCurrentState", + "accessories[].forceCurrentLockState" + ], + "condition": { + "functionBody": "return ['PLC_LockMechanism'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "LockTargetState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_LockTargetState", + "accessories[].set_LockTargetState" + ], + "condition": { + "functionBody": "return ['PLC_LockMechanism'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "LockCurrentState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_LockCurrentStateBool", + "accessories[].forceCurrentLockState", + "accessories[].invertLockState" + ], + "condition": { + "functionBody": "return ['PLC_LockMechanismBool'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "LockTargetState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_LockTargetStateBool", + "accessories[].set_LockTargetStateBool", + "accessories[].set_LockTargetStateBool_Secured", + "accessories[].set_LockTargetStateBool_Unsecured" + ], + "condition": { + "functionBody": "return ['PLC_LockMechanismBool'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "CurrentDoorState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_CurrentDoorState", + "accessories[].forceCurrentDoorState" + ], + "condition": { + "functionBody": "return ['PLC_GarageDoorOpener'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "TargetDoorState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_TargetDoorState", + "accessories[].set_TargetDoorState" + ], + "condition": { + "functionBody": "return ['PLC_GarageDoorOpener'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "SmokeDetected xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_SmokeDetected" + ], + "condition": { + "functionBody": "return ['PLC_SmokeSensor'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "CurrentAmbientLightLevel xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_CurrentAmbientLightLevel", + "accessories[].get_CurrentAmbientLightLevelDInt" + ], + "condition": { + "functionBody": "return ['PLC_LightSensor','PLC_LightSensor_DInt'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "CurrentFanState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_CurrentFanState", + "accessories[].default_CurrentFanState", + "accessories[].mapCurrentFanStateGet" + ], + "condition": { + "functionBody": "return ['PLC_Fan'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "CurrentFanState xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_TargetFanState", + "accessories[].set_TargetFanState", + "accessories[].mapCurrentFanStateGet", + "accessories[].mapTargetFanStateSet" + ], + "condition": { + "functionBody": "return ['PLC_Fan'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "Direction xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_RotationDirection", + "accessories[].set_RotationDirection", + "accessories[].mapRotationDirectionGet", + "accessories[].mapRotationDirectionSet" + ], + "condition": { + "functionBody": "return ['PLC_Fan'].includes(model.accessories[arrayIndices[0]].accessory);" + } + }, + { + "key": "accessories[]", + "type": "section", + "title": "Speed xxxxx TO BE ADDED xxxxx", + "expandable": true, + "expanded": false, + "items": [ + "accessories[].get_RotationSpeedByte", + "accessories[].set_RotationSpeedByte", + "accessories[].get_RotationSpeed", + "accessories[].set_RotationSpeed" + ], + "condition": { + "functionBody": "return ['PLC_Fan'].includes(model.accessories[arrayIndices[0]].accessory);" + } } + + ] } ] diff --git a/package.json b/package.json index 6bd77d8..48fbe1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-plc", - "version": "1.1.0-beta.3", + "version": "1.1.0-beta.4", "description": "Homebridge plugin for Siemens Step7 and compatible PLCs. (https://github.com/homebridge)", "license": "MIT", "keywords": [