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


  • 0

Virtual ON OFF Switch


Question

Posted (edited)

Hi all,

 

I would like to create a virtual switch to trigger infrared On Off actions in Quick Apps, Anyone help with this virtual device would be very much appreciated.

Edited by colhemm

5 answers to this question

Recommended Posts

  • 0
Posted

You mean On/Off Quick app (not virtual device)

You can do it in the same Quick Apps ....

  • 0
  • Inquirer
  • Posted (edited)

    Hi cagol4

     

    Yes, i need an On/Off Quick App to send 2 command to my global cache itach. I need the On/Off switch so it can keep track of the On/Off status.

    I'm not very good with the coding so I would very much appreciate any help on how to code the Quick App Binary switch to send the commands to my itech.

    Edited by colhemm
    • 0
    Posted

    Hello, try downloading these quick apps from the fibaro market place, the configuration is in the description.

    Maybe you just need to modify it for what you want to use it for.

     

    Please login or register to see this link.

     

     

    • 0
  • Inquirer
  • Posted

    Hi Marino Martin, thank you so much for this, it was exactly what I needed.

    After deleting the code I did not need,  the little bit of code below was all I needed.

    I can now keep a track of any infrared device as to whether it's on or off.

     
    function QuickApp:turnOn()
        self:debug("ON")
        self:updateProperty("value"true)
        self:send("sendir,1:3,9,37878,1,1,171,171,21,64,21,64,21,64,21,22,21,22,21,22,21,22,21,22,21,64,21,64,21,64,21,22,21,22,21,22,21,22,21,22,21,22,21,64,21,22,21,22,21,22,21,22,21,22,21,22,21,64,21,22,21,64,21,64,21,64,21,64,21,64,21,64,21,17790x0D0x0A",true)
    end
     
    function QuickApp:turnOff()
        self:debug("OFF")
        self:updateProperty("value"false)
        self:send("sendir,1:3,9,37878,1,1,171,171,21,64,21,64,21,64,21,22,21,22,21,22,21,22,21,22,21,64,21,64,21,64,21,22,21,22,21,22,21,22,21,22,21,22,21,64,21,22,21,22,21,22,21,22,21,22,21,22,21,64,21,22,21,64,21,64,21,64,21,64,21,64,21,64,21,17790x0D0x0A",true)
    end
     
    ---Initializing Functions----
    function QuickApp:onInit()
        self.ip = self:getVariable("ip")
        self.port = tonumber(self:getVariable("port"))
        print("Initializing device: ", self.name,"(",self.id,")")
        self.sock = net.TCPSocket()
    end
    • 0
    Posted

    Please login or register to see this code.

    ?

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...