mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Ability to auto-regiter with sonos on startup
This commit is contained in:
12
src/app.ts
12
src/app.ts
@@ -18,8 +18,18 @@ const bonob = bonobService(
|
||||
WEB_ADDRESS,
|
||||
"AppLink"
|
||||
);
|
||||
|
||||
const sonosSystem = sonos(SONOS_DEVICE_DISCOVERY, SONOS_SEED_HOST);
|
||||
if(process.env["BONOB_SONOS_AUTO_REGISTER"] == "true") {
|
||||
sonosSystem.register(bonob).then(success => {
|
||||
if(success) {
|
||||
logger.info(`Successfully registered ${bonob.name}(SID:${bonob.sid}) with sonos`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const app = server(
|
||||
sonos(SONOS_DEVICE_DISCOVERY, SONOS_SEED_HOST),
|
||||
sonosSystem,
|
||||
bonob,
|
||||
WEB_ADDRESS,
|
||||
new Navidrome(
|
||||
|
||||
Reference in New Issue
Block a user