25.10.2016, 14:25 (This post was last modified: 25.10.2016, 14:27 by Erwin van der Zwart.)
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.
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.
25.10.2016, 23:13 (This post was last modified: 25.10.2016, 23:29 by Erwin van der Zwart.)
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:
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
Another happy member, pleased by the Sonos application!
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.
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?
-- 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.
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
14.01.2017, 07:20 (This post was last modified: 14.01.2017, 07:21 by bmodeco.)
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
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).