09.05.2019, 13:28
There's no easy way of accessing custom values. But you can create a table with number - key mapping:
Code:
keys = {
[0] = 'stop',
[1] = 'play',
}
val = event.getvalue()
key = keys[ val ]
if key then
local http = require('socket.http')
res, err = http.request('http://IPLOCAL/pub/remote_control?code=CODETELECOMMAND&key=' .. key)
end