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 app
#21
Hi Andreas,

I think your remote connection is not very fast, please try it local. I'm thinking on blocking the remote connection as it makes no sense to use this as you can't here the music (;

On the other hand, i don't think remote will be used a lot so i can keep it like that, but remember it takes time to process the data on a remote connection. (there is a lot of data transfered)

You can now also see what player is currently active in the now playing header.

Please test local and give me the results

BR,

Erwin
Reply
#22
Hi Erwin,

It still does not works, neither on the local network with 10.20.30.5 IP, neither with my public IP.
Even if you connect remotely, I have tested my bandwidth and I have 32ms lag, DL 115MB/s and UL 99MB/s. 
Attached you can see more screenshots. Mine were taken using TeamViewer on my iMac, connected into the same network as the LM4.
The first attachments were taken from Chrome, while being connected remotely to my LAN, via the LM4.

Andreas

Attached Files Thumbnail(s)
           
Reply
#23
Hi Andreas,

Yep, Its a small bug, css class is not correct removed (: Will fix it tonight..

BR,

Erwin
Reply
#24
Hi Andreas,

I update a file inside your system for the small Sonos selected player bug, it seems solved now (;

I mailed the correction (file) to Edgars, so i think the file is in the Sonos App download by tomorrow.

Don't update App until then otherwise manual change is removed again.

BR,

Erwin
Reply
#25
Just a tip for everyone:

If you use the Sonos app HTTP api with LUA script, and you have password enabled on your app section ( like Andreas (: ) you need to send the password in the URL when you call the api.

You can also use localhost 127.0.0.1 in the URL instead of the controller IP address.

Commands would be like this: 

--Basic controls examples:

--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?name=Office&action=play
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?name=Living_Room&action=play -- use _ for spaces in the name
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=stop
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=mute-
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=unmute
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=next
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=previous
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31action=setvolume&volume=10
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?name=Office&action=setvolumeup&step=10
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=setvolumedown&step=10

--Play item from Queue / Favorites / Playlist examples:

--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?name=Office&action=playuri&listtype=queue&listnumber=1
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=playuri&listtype=favorites&listnumber=3
--http://admin:password@127.0.0.1/apps/data/sonos/sonos.lp?ip=192.168.10.31&action=loadplaylist&listnumber=9&autoplay=true

BR,

Erwin
Reply
#26
Hi. Great Job on the script/app. I see you wondering about removing the remote part. I Hope you dont as I use it in my home. The original Sonys app only works direct via wifi. But i get Your app working remote via vpn. Now i can put my sonos outside and control it much longer. I can sitt on the playground outsider our House and the forest in front and stiller control it outside wifi coverage Smile
Reply
#27
Another happy member, pleased by the Sonos application!  Angel

Let's see how the bug-free version of Sonos application will look. Sadly, myself I am limited to the Schneider Electric Touch Panel 7" that runs Windows CE. Erwin was saying to me about this product:

Quote:7" is designed as native KNX panel - HTML browser is just a extra feature that was implemented, never with the idea to support webbased controllers.
As native KNX device its still a powerful solution and works always. Windows CE is always HTML4 and will never load CSS files. You can't use this device with HTML5.

I will soon post a topic which describes the monster KNX project that I have it on my 3-room 67sqm smart flat, fully made with devices from Schneider Electric and Merten. And, of course, the LM4.
Reply
#28
Hi Erwin,



I am trying to build 3 extra functions for each room (applicable simultaneously to all Sonos players): "mute all", "unmute all" and "stop all", in order to use them with a "Watch TV" and "Leave the apartment" scene. Unfortunately the Sonos application does not know what to respond if commands are applied simultaneously to all 4 Sonos players, so it does not do anything.

I have attached you 2 screenshots from my own-built menu for each room. The last 3 buttons from right-lower corner right are the ones which are not working.

Do you have an idea/proposal/solution regarding how this can be fixed? 


Thank you,
Andreas

Attached Files Thumbnail(s)
       
Reply
#29
Hi,

Sonos does not support this, only when players are grouped.

What you can do is make a separate object with multiple commands to each player.
 
BR,

Erwin
Reply
#30
Thank you for the feedback, I will give it a try when I will arrive home. That's a scenario I wasn't thinking about... Smile
Reply
#31
Hi,

Sonos does not support this, only when players are grouped.

What you can do is make a separate object with multiple commands to each player.
 
BR,

Erwin
Reply
#32
Erwin,


Sorry, I've understood something else. Thanks for the reminder!  Smile
Ok, so the code that works (and has been tested by me) is the one from below:

Code:
-- Load modules
require('json')
require('socket.http')

-- Set timout
socket.http.TIMEOUT = 5

-- Set SONOS ip
Sonos_Player1_ip = '10.20.30.20' 
Sonos_Player2_ip = '10.20.30.30' 
Sonos_Player3_ip = '10.20.30.40' 
Sonos_Player4_ip = '10.20.30.50' 

-- Get event value
value = event.getvalue()

-- Set stepsize volume
Volume_Step = 5

-- Set Action
if value == 0 then
    Sonos_Action = 'stop'
else
  action = 'none'
end

-- Execute action on value 0 to 106
if value >= 0 and value <= 106 then
    local reply = socket.http.request('http://user:password@127.0.0.1/apps/data/sonos/sonos.lp?action=' .. Sonos_Action .. '&ip=' .. Sonos_Player1_ip .. '')
end

-- Execute action on value 0 to 106
if value >= 0 and value <= 106 then
    local reply = socket.http.request('http://user:password@127.0.0.1/apps/data/sonos/sonos.lp?action=' .. Sonos_Action .. '&ip=' .. Sonos_Player2_ip .. '')
end

-- Execute action on value 0 to 106
if value >= 0 and value <= 106 then
    local reply = socket.http.request('http://user:password@127.0.0.1/apps/data/sonos/sonos.lp?action=' .. Sonos_Action .. '&ip=' .. Sonos_Player3_ip .. '')
end

-- Execute action on value 0 to 106
if value >= 0 and value <= 106 then
    local reply = socket.http.request('http://user:password@127.0.0.1/apps/data/sonos/sonos.lp?action=' .. Sonos_Action .. '&ip=' .. Sonos_Player4_ip .. '')
end

Note that I have replaced the default 102 "stop" value with 0, because this value is sent all the time when I turn off everything.


Andreas
Reply
#33
Hi Erwin,
I installed the sonos-app on LM5 yesterday.
When starting/opening the app stays on the schneider log with the spinning circle. I left it overnight and it was still on the same page. Any idea what could cause this?
My sonos speaker is working fine, on the same network and connects with the sonos-app without any issues.
Can it be due to a music library? Is there a log file i can look into?
Thanks for any help.
Bart
Reply
#34
Hi Bart,

The spinner is visible until the page is full loaded by $(document).ready() so somehow your page is not loaded fully.

Can you check in the browser console (F12) if there any errors that might block the full load of the page?

If there are errors shown please upload screenshot here. 

How do you load the page? Embedded into visu or by direct URL?

BR,

Erwin
Reply
#35
Hi Bart,

The spinner is visible until the page is full loaded by $(document).ready() so somehow your page is not loaded fully.

Can you check in the browser console (F12) if there any errors that might block the full load of the page?

If there are errors shown please upload screenshot here. 

How do you load the page? Embedded into visu or by direct URL?

BR,

Erwin[/quote]

Hi Erwin,
Bedankt voor de snelle respons!
First of all - the server is working - I can control the sonos by using the commands. So it is only a gui thing.
The spinner shows also when using a frame in visu (and by direct url in web browser (safari and firefox on mac os x)).
Attached you can find the screen dumps i took: it does show some errors.
Thanks, Bart

Attached Files Thumbnail(s)
           
Reply
#36
Hi Erwin,

I've looked for the Sonos App on your Demo System and had the same issue. There is only the splash screen showing...

http://4n.lv:7999/apps/data/sonos/?language=german

I tested the GUI under OSX (Safari/Firefox) and Windows 7 (Firefox)

BR
Habib
Reply
#37
Update Sonos app, clear browser cache and it should be working.
Reply
#38
Hi Admin,

Is the JQuery function .fadeOut() missing in the LM5 FW?

BR,

Erwin
Reply
#39
All apps should use jQuery from /apps/js/jquery.js.gz, as the contents of visualization's jQuery package is not guaranteed (it uses velocity.js for animation instead of built-in).
Reply
#40
(14.01.2017, 11:50)admin Wrote: Update Sonos app, clear browser cache and it should be working.

Hi Admin,
Just tried it - gui is working now!
Thanks, Bart
Reply


Forum Jump: