This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SONOS data no longer updating
#1
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

Attached Files Thumbnail(s)
           
Reply
#2
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
Reply
#3
Thanks, LM running error free again and pushbuttons responding as it should!  Rolleyes
Reply


Forum Jump: