mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 21:24:20 +01:00
zwave: Add instance config (#1380)
This commit is contained in:
@@ -17,6 +17,7 @@ Add-on configuration:
|
||||
```yaml
|
||||
device: /dev/ttyUSB0
|
||||
network_key:
|
||||
instance: 1
|
||||
```
|
||||
|
||||
### Option `device`
|
||||
@@ -25,6 +26,12 @@ 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
|
||||
|
||||
- You hardware need to be compatible with OpenZwave library
|
||||
@@ -46,4 +53,4 @@ In case you've found a bug, please [open an issue on our GitHub][issue].
|
||||
[discord]: https://discord.gg/c5DvZ4e
|
||||
[forum]: https://community.home-assistant.io
|
||||
[issue]: https://github.com/home-assistant/hassio-addons/issues
|
||||
[reddit]: https://reddit.com/r/homeassistant
|
||||
[reddit]: https://reddit.com/r/homeassistant
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"ports_description": {
|
||||
"1983/tcp": "ozw-admin port"
|
||||
},
|
||||
},
|
||||
"services": ["mqtt:want"],
|
||||
"discovery": ["ozw"],
|
||||
"auto_uart": true,
|
||||
@@ -29,7 +29,8 @@
|
||||
},
|
||||
"schema": {
|
||||
"device": "str",
|
||||
"network_key": "password"
|
||||
"network_key": "password",
|
||||
"instance": "int(1,)"
|
||||
},
|
||||
"image": "homeassistant/{arch}-addon-zwave"
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
OZW_CONFIG=/data/ozw/config
|
||||
OZW_NETWORK_KEY=$(bashio::config 'network_key')
|
||||
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")"
|
||||
|
||||
# Wait until mosqitto is up and running
|
||||
@@ -24,5 +27,5 @@ exec ozwdaemon \
|
||||
--mqtt-server 127.0.0.1 \
|
||||
--mqtt-port 1883 \
|
||||
--mqtt-username ozw \
|
||||
--mqtt-instance 1 \
|
||||
--mqtt-instance "${OZW_INSTANCE}" \
|
||||
--stop-on-failure
|
||||
|
||||
Reference in New Issue
Block a user