Logic Machine Forum
SONOS data no longer updating - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: SONOS data no longer updating (/showthread.php?tid=1757)



SONOS data no longer updating - david.rombaut@gmail.com - 29.11.2018

Hello, I've been controlling my SONOS players through LM (with scripts) for about 2 years now.
Last week I updated the LM firmware and ever since the data from the players is no longer updated in LM. Very anoying because if I now change the volume with pushbuttons LM does not have the actual volume and will start at it's last known volume level. Also the controller bit that tells me if the player is ON or OFF is no longer updated so the LED on my switches are also no longer functioning properly,...
I can still control the players (ON/OFF, volume up/down, changing stations, grouping,...) but normally data from the players is updated every 60s (resident script with 60s sleep interval).

Anyway, does anyone know what might have happened/changed?
I have not changed anything to the scripts lately, nor have I changed anything to the zone names.

LM does generate error messages every 60s (see attached image)

Attached some screenshots
Hopefully someone can help me out
Many thanks in advance

Kind regards, David


RE: SONOS data no longer updating - admin - 30.11.2018

Replace all instances where lmcore.tonumber is used:
Code:
var = lmcore.tonumber(var)

With:
Code:
var = tonumber(var) or 0

For example:
Code:
volume = tonumber(volume) or 0



RE: SONOS data no longer updating - david.rombaut@gmail.com - 01.12.2018

Thanks, LM running error free again and pushbuttons responding as it should!  Rolleyes