27.05.2020, 13:44
What has change in the meantime?
------------------------------
Ctrl+F5
Ctrl+F5
SONOS app
|
27.05.2020, 22:30
(This post was last modified: 27.05.2020, 22:50 by Erwin van der Zwart.)
Hi,
The old Sonos app triggered on startup a command to find the players and stored the result in the storage, now that you use the sonos.lp separate from the app you need to execute this command at least once before using the sonos.lp and you need to run it whenever a change in your Sonos setup occurs. I guess the reason that it suddenly stopped is that you used it before with the old app (so the players table was already created) and the players have got a new IP address or something that not match the one in the players table. You can create or renew the players table by calling this Code: -- Load modules Code: log(storage.get('SONOS_PLAYERS')) Keep in mind that sonos.lp is 100% build on the UpnP protocol that Sonos is using and they recently opened up the Sonos API where the new certified Sonos app is build on. It might happen one day that Sonos drops the UpnP part in the product and sonos.lp is not usable anymore, but for now i have no indication that Sonos is dropping the UpnP methode. BR, Erwin
28.05.2020, 06:26
(27.05.2020, 22:30)Erwin van der Zwart Wrote: Hi, Hi OK, tried that, and then I get the following result from the storage; Test Sonos 28.05.2020 08:24:53 * arg: 1 * nil * arg: 2 * string: key not found or invalid type I tried to replace the sonos.lp and do a new 'http://127.0.0.1/user/sonos.lp?action=refreshsonosdata', but still the same result. The log indicates that the sonos system is not really stored, is it not?
There are 10 kinds of people in the world; those who can read binary and those who don't
28.05.2020, 06:52
Hi,
Did you disable the need for a password on the user ftp in the user settings? If you try to run the http command from a browser, you should get back a value ‘true’ when the action was successful BR, Erwin
28.05.2020, 07:51
(28.05.2020, 06:52)Erwin van der Zwart Wrote: Hi, When running the http command in the browser, I get the list of all sonos devices, so that seems OK then. What should I expect to get from the storage.get('SONOS_PLAYERS')?
There are 10 kinds of people in the world; those who can read binary and those who don't
28.05.2020, 10:14
The same table, only decoded to LUA format instead of JSON, what do you see when you use the Storage Viewer App?
28.05.2020, 10:31
(28.05.2020, 10:14)Erwin van der Zwart Wrote: The same table, only decoded to LUA format instead of JSON, what do you see when you use the Storage Viewer App? I figured out the storage, In the storage, the table is not named as you mantioned, but rather Code: log(storage.get('Sonos:Players')) But the error I get when running the script is reffered to the sonos.lua file: Test Sonos 28.05.2020 10:42:29 * string: Error in /www/user/sonos.lua at line 0: attempt to get length of a nil value The mp3 file is played on Sonos, but Sonos does not return to playing whatever was playing before the script was run.
There are 10 kinds of people in the world; those who can read binary and those who don't
28.05.2020, 11:05
(This post was last modified: 28.05.2020, 11:05 by Erwin van der Zwart.)
Hi,
Okay, yes then you use another sonos.lp then i did, it's correct we changed this in a later stage to Sonos : Players I don't understand why you get a error from /www/user/sonos.lua as this file is not needed, did you make a reference to this file or something? The only file you need on the FTP is sonos.lp, can you try to delete the reference and the LUA file from the user folder? BR, Erwin
28.05.2020, 11:10
/www/user/sonos.lua is used by sonos.lp, removing it won't help. Have you tried using ip instead of player uuid?
Code: ip = '1.2.3.4' -- change this
28.05.2020, 11:11
(This post was last modified: 28.05.2020, 11:16 by Trond Hoyem.)
(28.05.2020, 11:05)Erwin van der Zwart Wrote: Hi,Hi The only code I have is this: Code: require('socket.http') I do not know where I might have a link to sonos.lua. I tried to delete the sonos.lua, and run the script; same error message. (28.05.2020, 11:10)admin Wrote: /www/user/sonos.lua is used by sonos.lp, removing it won't help. Have you tried using ip instead of player uuid?Same result...
There are 10 kinds of people in the world; those who can read binary and those who don't
28.05.2020, 11:30
Are you sure you are using these files?
https://dl.openrb.com/misc/sonos.lp https://dl.openrb.com/misc/sonos.lua These are from old Sonos app which did not use Sonos API.
28.05.2020, 11:51
(28.05.2020, 11:30)admin Wrote: Are you sure you are using these files?Yes. Downloaded them again earlier today to be sure....
There are 10 kinds of people in the world; those who can read binary and those who don't
29.05.2020, 09:55
(This post was last modified: 29.05.2020, 09:56 by Erwin van der Zwart.)
Hi,
Apperently admin added the sonos.lua and changed the sonos.lp and i was unaware of this change (: I removed all storage entry's before testing (so that couldn't influence the test) and uploaded the 2 new files to my ftp and runned this script: Code: require('socket.http') There are no errors in my log so it seems to work perfect.. BR, Erwin
01.06.2020, 09:25
I've just stared using the new Sonos app and while looking at the Schneider Electric youtube video at 1:20 a widget is created which also seems to create some useful group addresses.
Likewise I tried to create a sonos widget on my factory defaulted LM5 but it seems to fail because I can't enter a Floor and Room. Presumably a pulldown menu should have been presented and populated with floors ans rooms which have to be created beforehand so I created a few in the Vis.Structure tab but unfortunately without any success. Am I missing something ?
01.06.2020, 09:28
Install Mosaic 2.0. For Mosaic 3.0 we created different storage, the app keeps using old one.
------------------------------
Ctrl+F5
01.06.2020, 09:35
Thanks!
02.06.2020, 08:05
(29.05.2020, 09:55)Erwin van der Zwart Wrote: Hi, Hi I still get the same error message. I checked with another project where I have tried this function, and it works there. Maybe There is something wrong with the LM I have here? Could it be that there is a problem with the memory card?
There are 10 kinds of people in the world; those who can read binary and those who don't
03.06.2020, 07:40
If you have memory card issues then just reboot and check if all your changes are still there. Maybe your problem is in sonos player?
------------------------------
Ctrl+F5
05.06.2020, 13:17
(03.06.2020, 07:40)Daniel. Wrote: If you have memory card issues then just reboot and check if all your changes are still there. Maybe your problem is in sonos player? All changes are still there after reboot. Might of course be a Sonos problem, but the player I tested is brand new, and also this wokred on a different player earlier, but not any more. The only thinf not working in the script is the retur to the old state after playing the mp3-file.
There are 10 kinds of people in the world; those who can read binary and those who don't
05.06.2020, 14:46
Hi,
What source are you playing from? We store the current URI when playing the mp3 and works with Intune Radio, but it might be that playing Spotify or other service has another methode then the URI we store and That might be the cause of what you experience. Can you test it with a radio station playing? BR, Erwin |
« Next Oldest | Next Newest »
|