Ability to auto-regiter with sonos on startup

This commit is contained in:
simojenki
2021-03-13 10:31:06 +11:00
parent 3373ae773b
commit 283b319f87
4 changed files with 21 additions and 8 deletions

View File

@@ -156,6 +156,8 @@ export function autoDiscoverySonos(sonosSeedHost?: string): Sonos {
return false;
}
logger.info(`Registering ${service.name}(SID:${service.sid}) with sonos device ${anyDevice.Name} @ ${anyDevice.Host}`)
const customd = `http://${anyDevice.Host}:${anyDevice.Port}/customsd`;
const csrfToken = await axios.get(customd).then((response) =>