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
Ananta Creation 0
Hi,
I am using HC-2 to configure all my Home Automation system.
I have created Virtual device to control IR devices. As to show case Lable I need to code using Lua.
Can any one tell me what's wrong with following Lua code.
local hc = fibaro:getSelfId();
local ip = fibaro:getValue (hc, 'IPAddress');
local port = fibaro:getValue (hc,'TCPPort');
tcpSocket = Net.FTcpSocket (ip,port);
fibaro:debug(hc);
fibaro:debug(ip);
fibaro:debug(port);
tcpSocket:setReadTimeout(3000);
tcpSocket:write("sendir,1:1,1,36337,1,1,95,33,16,16,16,16,16,32,16,32,32,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,16,16,32,16,16,16,4651\r");
tcpSocket:disconnect();
fibaro : call(hc, "setProperty", "ui.Label1.value","20°C");
For debugging purpose, I have used socket tester. On it, some time I am able to receive string, some time not. Some time socket connection remain open.
Can any one help me.
Is there any possibility to have problem with router?
Please login or register to see this attachment.
2 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.