13.01.2020, 12:02
(This post was last modified: 13.01.2020, 12:32 by Trond Hoyem.)
(13.01.2020, 11:53)Daniel. Wrote: Do you mean this?Yep, thx
https://forum.logicmachine.net/showthrea...1#pid12301
There must have been something wrong with the one I had, because now it seems to work.
(13.01.2020, 12:02)Trond Hoyem Wrote:(13.01.2020, 11:53)Daniel. Wrote: Do you mean this?Yep, thx
https://forum.logicmachine.net/showthrea...1#pid12301
There must have been something wrong with the one I had, because now it seems to work.
OK, so now the connection seem to work, but I am not able to play a file. I have found a code for this, but so far nothing happens.
What I have is;
Code:
-- Load modules
require('socket.http')
-- Set timout
socket.http.TIMEOUT = 5
reply = socket.http.request('http://admin:hoyemknx@127.0.0.1/user/sonos.lp?action=getextendedstate&uuid=RINCON_7828CAF5CEC201400&createbaseimg=false')
log(reply)
audiofile = socket.url.escape('http://127.0.0.1/user/Ringeklokke.mp3')
reply = socket.http.request('http://admin:hoyemknx@127.0.0.1/user/sonos.lp?action=say&name=Kjøkken&audiofile=' .. audiofile .. '&volume=30&duration=55')
log(reply)
The logs I get from this is;
1. * string: {"TrackIndex":1,"Playmode":"NORMAL","Crossfade":0,"Repeat":false,"PlayingTime":"0.... - So this seems OK
2. * nil
Any ideas?
There are 10 kinds of people in the world; those who can read binary and those who don't