diff --git a/theengsgateway/DOCS.md b/theengsgateway/DOCS.md index 821457d..3237a55 100644 --- a/theengsgateway/DOCS.md +++ b/theengsgateway/DOCS.md @@ -26,5 +26,7 @@ DISCOVERY_DEVICE_NAME | string | No | Device name `TheengsGateway` DISCOVERY_FILTER | string | No | Excluded BLE devices models `[IBEACON,GAEN,MS-CDP]` ADAPTER | string | No | Bluetooth adapter (e.g. hci1 on Linux) SCANNING_MODE | string | No | Change scanning mode between `active` and `passive`, defaults to `active` +TIME_SYNC | string | No | Addresses of BLE devices to synchronize time (defaults to the empty list `[]`) +TIME_FORMAT | boolean | No | Use 12-hour (`yes`) or 24-hour (`no`) time format for clocks (defaults to `no`) -For more details please refer to [TheengsGateway](https://theengs.github.io/gateway/). \ No newline at end of file +For more details please refer to [TheengsGateway](https://theengs.github.io/gateway/). diff --git a/theengsgateway/config.json b/theengsgateway/config.json index 2f0c5ec..1e1de94 100644 --- a/theengsgateway/config.json +++ b/theengsgateway/config.json @@ -29,7 +29,9 @@ "DISCOVERY_DEVICE_NAME": "TheengsGateway", "DISCOVERY_FILTER": "[IBEACON,GAEN,MS-CDP]", "ADAPTER": "", - "SCANNING_MODE": "active" + "SCANNING_MODE": "active", + "TIME_SYNC": "[]", + "TIME_FORMAT": false }, "schema": { "MQTT_HOST": "str", @@ -47,6 +49,8 @@ "DISCOVERY_DEVICE_NAME": "str?", "DISCOVERY_FILTER": "str?", "ADAPTER": "str?", - "SCANNING_MODE": "str?" + "SCANNING_MODE": "str?", + "TIME_SYNC": "str?", + "TIME_FORMAT": "bool?" } } diff --git a/theengsgateway/run.sh b/theengsgateway/run.sh index 1e45a1f..f35bf62 100644 --- a/theengsgateway/run.sh +++ b/theengsgateway/run.sh @@ -21,6 +21,8 @@ DISCOVERY_TOPIC=$(bashio::config 'DISCOVERY_TOPIC') DISCOVERY_DEVICE_NAME=$(bashio::config 'DISCOVERY_DEVICE_NAME') DISCOVERY_FILTER=$(bashio::config 'DISCOVERY_FILTER') ADAPTER=$(bashio::config 'ADAPTER') +TIME_SYNC=$(bashio::config 'TIME_SYNC') +TIME_FORMAT=$(bashio::config 'TIME_FORMAT') { echo "{" @@ -38,7 +40,9 @@ ADAPTER=$(bashio::config 'ADAPTER') echo " \"discovery_topic\": \"${DISCOVERY_TOPIC}\"," echo " \"discovery_device_name\": \"${DISCOVERY_DEVICE_NAME}\"," echo " \"discovery_filter\": \"${DISCOVERY_FILTER}\"," - echo " \"adapter\": \"${ADAPTER}\"" + echo " \"adapter\": \"${ADAPTER}\"", + echo " \"time_sync\": \"${TIME_SYNC}\"", + echo " \"time_format\": \"${TIME_FORMAT}\"", echo "}" } > "${CONFIG}"