Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
morsink 2
Hello,
I'm a starter in programming for my HC2.
I made a Virtual Device (KMTronice, UDP Relay) and wanne send this code:
local ip, port = "192.168.100.166", 12345
local message = "FF0100"
local socket = require "socket"
sock, msg = socket.udp()
if sock then
sock:setpeername(ip, port) end -- connect to destination
sock:send(message)
sock: close()
end
But I get this error:
[ERROR] 13:32:10: line 2: unexpected symbol near '%'
[ERROR] 13:40:35: line 9: '' expected near 'end'
What I'm doing worng @ this script ?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.