Creating sensors from local web service (SONOS)

Hi,

I’m learning… but slowly - apologies in advance, as I couldn’t find answers searching the forum.

I’ve got a number of SONOS speakers at home and I keep getting bitten by them roaming on the wifi access points and then failing to stream. Looking tonight, I discovered each speaker has a hidden debug menu on an open http port and I’d like to expose it.

For example: http://192.168.1.9:1400/status opens up a number of information pages.
The one I’m interested in is http://192.168.1.9:1400/status/proc/ath_rincon/status

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?>Debug info for INFRA mode at 1882154

Mode: INFRA (station)
Operating on channel 2452
Home channel is 2457
RF Chains: RX:3 TX:3
RF Chainmask: RX:0x07 TX:0x07
Max Spatial Streams: RX:2 TX:2
Noise Floor: -89 dBm (chain 0 ctl)
Noise Floor: -98 dBm (chain 1 ctl)
Noise Floor: -90 dBm (chain 2 ctl)
*PHY errors since last reading/reset: 995249 *
OFDM Weak signal level: 3
ANI Updates: S:416 F:0
ANI Reg: DSIZE:0x6c28b0de AGC_CTL1:0x313a5d5e F_SIG:0x7ec04d2e TIMING5:0xd0058a09
Ch11 Spur Immunity Level: 0
HAL Reset Failures: cnt: 0 last: 0
Region: 2

Node 54:2A:1B:F0:7B:35 - FROM 53 : TO 52 : STP 00 : MODEL 26.1: KEY 33

  • 33*

Now the important line for me here is the OFDM Weak signal level: 3

I’d like to build sensors that simply scrape this periodically through the day and alert if 5 or greater.

From what I can see this would need to use a wget/curl and parse the lines - it doesnt look json or anything ‘modern’ - however I was hoping some kind forum dweller may be able to help point me in the right direction so I can build this up.

I’m happy to dig in, but just worried I’ll be digging in the wrong spot.

Many thanks in advance.