From 3fb4856fe528f468ec1e10578e72bd8af0525452 Mon Sep 17 00:00:00 2001 From: i-cz Date: Sat, 9 Mar 2024 14:00:30 +0100 Subject: [PATCH] add another glooko options --- nightscout/config.json | 6 ++++++ nightscout/rootfs/etc/cont-init.d/nightscout.sh | 7 +++++++ nightscout/rootfs/etc/services.d/nightscout/run | 9 +++++++++ 3 files changed, 22 insertions(+) diff --git a/nightscout/config.json b/nightscout/config.json index 4c05d5c..930ca17 100644 --- a/nightscout/config.json +++ b/nightscout/config.json @@ -35,6 +35,9 @@ "connect_link_up_region": "EU", "connect_glooko_email": "", "connect_glooko_password": "", + "connect_glooko_env": "eu", + "connect_glooko_server": "eu.api.glooko.com", + "connect_glooko_timezone_offset": "1", "plugins": [ "careportal", "boluscalc", @@ -68,6 +71,9 @@ "connect_link_up_region": "str", "connect_glooko_email": "str", "connect_glooko_password": "str", + "connect_glooko_env": "str", + "connect_glooko_server": "str", + "connect_glooko_timezone_offset": "str", "auth_default_roles": "list(admin|denied|status-only|readable|careportal|devicestatus-upload|activity)?", "theme": "list(default|colors|colorblindfriendly)", "import_config_url": "str?", diff --git a/nightscout/rootfs/etc/cont-init.d/nightscout.sh b/nightscout/rootfs/etc/cont-init.d/nightscout.sh index 4a9a135..18a8b49 100755 --- a/nightscout/rootfs/etc/cont-init.d/nightscout.sh +++ b/nightscout/rootfs/etc/cont-init.d/nightscout.sh @@ -13,6 +13,10 @@ readonly connect_link_up_server=$(bashio::config 'connect_link_up_server') readonly connect_link_up_region=$(bashio::config 'connect_link_up_region') readonly connect_glooko_email=$(bashio::config 'connect_glooko_email') readonly connect_glooko_password=$(bashio::config 'connect_glooko_password') +readonly connect_glooko_env=$(bashio::config 'connect_glooko_env') +readonly connect_glooko_server=$(bashio::config 'connect_glooko_server') +readonly connect_glooko_timezone_offset=$(bashio::config 'connect_glooko_timezone_offset') + bashio::log.info "Setting up API KEY: ${api_key}" @@ -26,3 +30,6 @@ export CONNECT_LINK_UP_SERVER="${connect_link_up_server}" export CONNECT_LINK_UP_REGION="${connect_link_up_region}" export CONNECT_GLOOKO_EMAIL="${connect_glooko_email}" export CONNECT_GLOOKO_PASSWORD="${connect_glooko_password}" +export CONNECT_GLOOKO_ENV="${connect_glooko_env}" +export CONNECT_GLOOKO_SERVER="${connect_glooko_server}" +export CONNECT_GLOOKO_TIMEZONE_OFFSET="${connect_glooko_timezone_offset}" diff --git a/nightscout/rootfs/etc/services.d/nightscout/run b/nightscout/rootfs/etc/services.d/nightscout/run index 8af0240..c078b38 100755 --- a/nightscout/rootfs/etc/services.d/nightscout/run +++ b/nightscout/rootfs/etc/services.d/nightscout/run @@ -30,6 +30,12 @@ readonly connect_glooko_email=$(bashio::config 'connect_glooko_email') bashio::log.debug "Setting up CONNECT_GLOOKO_EMAIL: ${connect_glooko_email}" readonly connect_glooko_password=$(bashio::config 'connect_glooko_password') bashio::log.debug "Setting up CONNECT_GLOOKO_PASSWORD: ${connect_glooko_password}" +readonly connect_glooko_env=$(bashio::config 'connect_glooko_env') +bashio::log.debug "Setting up CONNECT_GLOOKO_ENV: ${connect_glooko_env}" +readonly connect_glooko_server=$(bashio::config 'connect_glooko_server') +bashio::log.debug "Setting up CONNECT_GLOOKO_SERVER: ${connect_glooko_server}" +readonly connect_glooko_timezone_offset=$(bashio::config 'connect_glooko_timezone_offset') +bashio::log.debug "Setting up CONNECT_GLOOKO_TIMEZONE_OFFSET: ${connect_glooko_timezone_offset}" export API_SECRET="${api_key}" @@ -46,6 +52,9 @@ export CONNECT_LINK_UP_SERVER="${connect_link_up_server}" export CONNECT_LINK_UP_REGION="${connect_link_up_region}" export CONNECT_GLOOKO_EMAIL="${connect_glooko_email}" export CONNECT_GLOOKO_PASSWORD="${connect_glooko_password}" +export CONNECT_GLOOKO_ENV="${connect_glooko_env}" +export CONNECT_GLOOKO_SERVER="${connect_glooko_server}" +export CONNECT_GLOOKO_TIMEZONE_OFFSET="${connect_glooko_timezone_offset}" if bashio::config.has_value 'auth_default_roles'; then readonly auth_default_roles=$(bashio::config 'auth_default_roles')