Jump to content
FIBARO Home Center App 1.0.0 - release Read more... ×
FIBARO Home Center App 1.0.0 - wydanie Read more... ×

Search the Community

Showing results for tags 'disconnect'.



More search options

  • 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

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 1 result

  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
×