node-sonos-ts icon indicating copy to clipboard operation
node-sonos-ts copied to clipboard

Feature request: Battery status

Open hubecker opened this issue 2 years ago • 4 comments

Battery status feature request

I like to get the battery status of my Sonos Move

With the following URL

http://<IP>:1400/status/batterystatus

you get the battery status

the Browser shows the follwing: Bildschirm­foto 2023-02-15 um 23 20 26

The HTTPBody of the request:

<?xml version="1.0" ?><?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?><ZPSupportInfo><LocalBatteryStatus><Data name="Health">UNKNOWN_batteryHealth</Data><Data name="Level">100</Data><Data name="Temperature">NORMAL</Data><Data name="PowerSource">SONOS_CHARGING_RING</Data></LocalBatteryStatus><!-- SDT: 0 ms --></ZPSupportInfo>

hubecker avatar Feb 15 '23 22:02 hubecker

Thanks Hubert, I'll have a look next week.

svrooij avatar Feb 16 '23 07:02 svrooij

The output for a Sonos Roam is the same:

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?>
<ZPSupportInfo>
<LocalBatteryStatus>
<Data name="Health">GREEN</Data>
<Data name="Level">100</Data>
<Data name="Temperature">NORMAL</Data>
<Data name="PowerSource">SONOS_CHARGING_RING</Data>
</LocalBatteryStatus>
<!-- SDT: 0 ms -->
</ZPSupportInfo>

RlfSt avatar Feb 16 '23 09:02 RlfSt

Of course only when WLAN connected, not in bluetooth mode.

Don't know how to handle this one: Would be also great to handle the mode meaning switching from WLAN to bluetooth and back. But i don't know if there is an API, because even in the APP it is not possible.

hubecker avatar Feb 16 '23 09:02 hubecker

Any updates for this request?

arndth avatar Jun 05 '23 22:06 arndth

Anyone who wants can create a pr for this, I don't own such a device so cannot test it myself.

svrooij avatar Jun 13 '24 19:06 svrooij