Hi,
I captured the message below and I’m trying to send it via lua-socket in a script in my vera. Unfortunately I’m not able to do so.
SUBSCRIBE /Event/org.mpris.MediaPlayer2.mansion/RygelAVTransport HTTP/1.1
HOST: 192.168.0.28:33950
CALLBACK: <http://192.168.0.62:35095/event>
NT: upnp:event
TIMEOUT: Second-300
I tried following script in the “Develop apps” → "Test Luup code (Lua)"editor. Can somebody please help me.
[code]-- loads the HTTP module and any libraries it requires
local http = require(“socket.http”)
local ltn12 = require(“ltn12”)
h = http.request { method = “SUBSCRIBE”,
url = “http://192.168.0.28:33950”
}
h = {
useragent = “/Event/org.mpris.MediaPlayer2.mansion/RygelAVTransport HTTP/1.1”
[“HOST”] = “192.168.0.28:33950”,
[“CALLBACK”] = “http://192.168.0.62:35095/event”,
[“NT”] = “upnp:event”,
[“TIMEOUT”] = “Second-300”,
}[/code]
Kind regards,
dahaindl