mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
zwave: Add instance config (#1380)
This commit is contained in:
@@ -17,6 +17,7 @@ Add-on configuration:
|
|||||||
```yaml
|
```yaml
|
||||||
device: /dev/ttyUSB0
|
device: /dev/ttyUSB0
|
||||||
network_key:
|
network_key:
|
||||||
|
instance: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option `device`
|
### Option `device`
|
||||||
@@ -25,6 +26,12 @@ network_key:
|
|||||||
### Option `network_key`
|
### Option `network_key`
|
||||||
|
|
||||||
|
|
||||||
|
### Option `instance`
|
||||||
|
|
||||||
|
Zwave instance number as reported to MQTT. This corresponds with the
|
||||||
|
`instance_id` attribute of `ozw` services in Home Assistant.
|
||||||
|
|
||||||
|
|
||||||
## Known issues and limitations
|
## Known issues and limitations
|
||||||
|
|
||||||
- You hardware need to be compatible with OpenZwave library
|
- You hardware need to be compatible with OpenZwave library
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"device": "str",
|
"device": "str",
|
||||||
"network_key": "password"
|
"network_key": "password",
|
||||||
|
"instance": "int(1,)"
|
||||||
},
|
},
|
||||||
"image": "homeassistant/{arch}-addon-zwave"
|
"image": "homeassistant/{arch}-addon-zwave"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
OZW_CONFIG=/data/ozw/config
|
OZW_CONFIG=/data/ozw/config
|
||||||
OZW_NETWORK_KEY=$(bashio::config 'network_key')
|
OZW_NETWORK_KEY=$(bashio::config 'network_key')
|
||||||
OZW_DEVICE=$(bashio::config 'device')
|
OZW_DEVICE=$(bashio::config 'device')
|
||||||
|
bashio::config.has_value 'instance' \
|
||||||
|
&& OZW_INSTANCE="$(bashio::config 'instance')" || OZW_INSTANCE=1
|
||||||
|
|
||||||
MQTT_PASSWORD="$(bashio::jq /data/auth.json ".ozw_password")"
|
MQTT_PASSWORD="$(bashio::jq /data/auth.json ".ozw_password")"
|
||||||
|
|
||||||
# Wait until mosqitto is up and running
|
# Wait until mosqitto is up and running
|
||||||
@@ -24,5 +27,5 @@ exec ozwdaemon \
|
|||||||
--mqtt-server 127.0.0.1 \
|
--mqtt-server 127.0.0.1 \
|
||||||
--mqtt-port 1883 \
|
--mqtt-port 1883 \
|
||||||
--mqtt-username ozw \
|
--mqtt-username ozw \
|
||||||
--mqtt-instance 1 \
|
--mqtt-instance "${OZW_INSTANCE}" \
|
||||||
--stop-on-failure
|
--stop-on-failure
|
||||||
|
|||||||
Reference in New Issue
Block a user