for discovering devices with specific portnumber I need to send “multicast” message to my
local network. The adress “255.255.255.255” is functioning well with several (not-lua) devices
on my network. When I try this with my Vera3, in lua , I get no respond, doesn’t matter what I
do or try, nothing works. I tried several other “multicast” adresses like “127.0.0.0” with no result.
The function I use works because I can sent messages to an device with a response message that I can
Is this possible with lua, and what do I have to change to get it working ?
This is my code:
socket = require(“socket”)
local s = socket.udp
bytes, ErrorCode = s:sendto(discoverDevice, “255.255.255.255”, 5500)
local msg, err, part = s:receive(15)
if (not msg) and (err ~= ‘timeout’) then
return nil, err
msg = msg or part
if not msg then return nil, ‘timeout’ end
Thanks in advance,