Jump to content

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


Search the Community

Showing results for tags 'tcp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 3 results

  1. When do I use the following code in lua:? tcpSocket:disconnect(); i some sample code it has been added to the sample in others not. example: -- Volume 40dB -- tcpSocket:write("MV40".."\r") fibaro:sleep(500); result, err = tcpSocket:read(); tcpSocket:disconnect(); if (err == 0) then fibaro:log("transfer OK"); fibaro:debug("transfer OK"); else fibaro:log("transfer failed"); fibaro:debug("transfer failed"); end ------------------------------------ -- HERE its not been used -- tcpSocket:write(string.char(0x53, 0x49, 0x49, 0x52, 0x41, 0x44, 0x49, 0x4f, 0x0d)); fibaro:sleep(1000); result, err = tcpSocket:read(); if (err == 0) then fibaro:log("Transfer OK: Internet Radio"); else fibaro:log("Transfer failed: extra check"); -- check source: needs 2 times... otherwise still failed... tcpSocket:write(string.char(0x53, 0x49, 0x3f, 0x0d)); fibaro:sleep(500); result, err = tcpSocket:read(); tcpSocket:write(string.char(0x53, 0x49, 0x3f, 0x0d)); fibaro:sleep(500); result, err = tcpSocket:read(); if (err == 0) then if ( trim(string.sub(result, 1, string.len(result)-9)) == 'SIIRADIO' ) then fibaro:log("Transfer OK: Internet Radio"); else fibaro:log("Transfer failed"); end else fibaro:log("Transfer failed"); end end
  2. Hi, I`m novice in Fibaro and LUA I have some TCP device in my network transmits a txt data to custom TCP port on HC2 if some event happens (e.g. alarm) How I can always listen that TCP port on HC2 via LUA and start to a custom action in case the txt data appear on the port?
  3. Hi, I tried to get messages from my alarm system Honeywell Vista 10. To connect to the alarm system I use AD2Pi installed on Raspberry Pi. On Raspberry Pi started ser2sock program that redirect messages from serial to tcp. On HC2 I created VD, in which I can arm/disarm alarm system. I just sent the code for disarming I created a scene to get messages from alarm system, but always I see error message: [DEBUG] 11:35:40: line 12: attempt to index global 'Net' (a nil value) --[[ %% properties %% events %% globals --]] local ip = "10.0.1.5" local port = 10000 -- Initialising TCP-port if (tcpSocket == nil) then tcpSocket = Net.FTcpSocket(ip, port); tcpSocket:setReadTimeout(2000); end response, errorCode = tcpSocket:read() fibaro:log(tostring(response)); fibaro:debug(tostring(response)); My question: ser2sock sends messages about all alarm system events. How I can read and parsing messages from tcp? I always have to keep an open TCP connection, and when I get a new line, must run the parser. How to do this?
×
×
  • Create New...