From db0351da39378d2cea671a1f9042fa412e693426 Mon Sep 17 00:00:00 2001 From: simojenki Date: Sun, 15 Aug 2021 13:17:17 +1000 Subject: [PATCH] auto register default false --- README.md | 10 ++++++++-- src/config.ts | 2 +- tests/config.test.ts | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index da88279..832ef63 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ bonob is ditributed via docker and can be run in a number of ways ```bash docker run \ + -e BONOB_SONOS_AUTO_REGISTER=true \ + -e BONOB_SONOS_DEVICE_DISCOVERY=true \ -p 4534:4534 \ --network host \ simojenki/bonob @@ -46,6 +48,8 @@ Now open http://localhost:4534 in your browser, you should see sonos devices, an docker run \ -e BONOB_PORT=3000 \ -e BONOB_SONOS_SEED_HOST=192.168.1.123 \ + -e BONOB_SONOS_AUTO_REGISTER=true \ + -e BONOB_SONOS_DEVICE_DISCOVERY=true \ -p 3000:3000 \ simojenki/bonob ``` @@ -113,7 +117,9 @@ services: # ip address of your machine running bonob BONOB_URL: http://192.168.1.111:4534 BONOB_SECRET: changeme - BONOB_SONOS_SERVICE_ID: 246 + BONOB_SONOS_AUTO_REGISTER: true + BONOB_SONOS_DEVICE_DISCOVERY: true + BONOB_SONOS_SERVICE_ID: 246 # ip address of one of your sonos devices BONOB_SONOS_SEED_HOST: 192.168.1.121 BONOB_NAVIDROME_URL: http://navidrome:4533 @@ -126,7 +132,7 @@ item | default value | description BONOB_PORT | 4534 | Default http port for bonob to listen on BONOB_URL | http://$(hostname):4534 | URL (including path) for bonob so that sonos devices can communicate. **This must be either the public IP or DNS entry of the bonob instance so that the sonos devices can communicate with it.** BONOB_SECRET | bonob | secret used for encrypting credentials -BONOB_SONOS_AUTO_REGISTER | true | Whether or not to try and auto-register on startup +BONOB_SONOS_AUTO_REGISTER | false | Whether or not to try and auto-register on startup BONOB_SONOS_DEVICE_DISCOVERY | true | whether or not sonos device discovery should be enabled BONOB_SONOS_SEED_HOST | undefined | sonos device seed host for discovery, or ommitted for for auto-discovery BONOB_SONOS_SERVICE_NAME | bonob | service name for sonos diff --git a/src/config.ts b/src/config.ts index 9dfaa70..ff1c560 100644 --- a/src/config.ts +++ b/src/config.ts @@ -26,7 +26,7 @@ export default function () { (process.env["BONOB_SONOS_DEVICE_DISCOVERY"] || "true") == "true", seedHost: process.env["BONOB_SONOS_SEED_HOST"], autoRegister: - (process.env["BONOB_SONOS_AUTO_REGISTER"] || "true") == "true", + (process.env["BONOB_SONOS_AUTO_REGISTER"] || "false") == "true", sid: Number(process.env["BONOB_SONOS_SERVICE_ID"] || "246"), }, navidrome: { diff --git a/tests/config.test.ts b/tests/config.test.ts index 2f2fca5..755909d 100644 --- a/tests/config.test.ts +++ b/tests/config.test.ts @@ -151,7 +151,7 @@ describe("config", () => { describeBooleanConfigValue( "autoRegister", "BONOB_SONOS_AUTO_REGISTER", - true, + false, (config) => config.sonos.autoRegister );