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

HC3 and iTach IR?


robw
 Share

Question

Hi,

 

I'm asking for help here regarding getting iTach to work with HC3 via an QuickApp.

In HC2 it was easy, we did it like this: 

Please login or register to see this link.

 

@Sankotronic posted LUA code for a HC2 VD a little while ago, maybe a good HC3 QA-coder can help getting it to work? Grateful for any help!

 

Link below to @Sankotronic VD.

 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

on the end part of quick apps you got example

TCP connection sample (for devices like Global Caché)

Please login or register to see this link.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 4 hours ago, A.Socha said:

    on the end part of quick apps you got example

    TCP connection sample (for devices like Global Caché)

    Please login or register to see this link.

     

    Wonderful, thank's! :) I will test when I get back home this afternoon!

     

    Edit: Yes, it works! I changed IP-adress and Port number in the Variables section of the QA, then I entered this in a button:

    self:send("sendir,1:3,1,37878,1,1,340,169,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,63,22,21,22,21,22,63,22,63,22,21,22,63,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,63,22,63,22,21,22,21,22,63,22,21,22,63,22,63,22,21,22,21,22,1500,340,84,22,3631,340,84,22,37000x0D0x0A", true)

     

    Remember to add "0x0D0x0A" in the end of the IR code, and also add ", true" after the IR code.

    Edited by robw
    Updated info.
    • Like 1
    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 4/19/2020 at 2:05 AM, antoniopll said:

    Hello!

    Can you share your example? I want to add a similar IR device 

     

    I ended up with adding functions to the main code that refer to a button. So, in the end of the code A. Socha refers to, add a function. In the below example it is a power button for a BD player:

     

    function QuickApp:uibtn_Power_1OnReleased(event)
    self:send("sendir,1:3,23,37537,1,1,171,169,20,18,20,18,20,18,20,18,20,18,20,55,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,169,20,55,20,55,20,55,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,18,20,55,20,55,20,55,20,55,20,55,20,55,20,55,20,55,20,37000x0D0x0A"true)
    end
     
    Then make a button,
    ID: bnt_Power_!
    Name: Power
    onReleased: uibtn_Power_1OnReleased
    • Like 1
    Link to comment
    Share on other sites

    • 0

    Hello

     

    I'm trying to get this to work but am having no joy. The Itach works from my old Vera controller so I know I have the Ip and port correct but I'm not a coder and am confused what the on and off buttons are for ? I have added the function above but with a IR string that I now works with vera but no joy any help would be great thanks

    Link to comment
    Share on other sites

    • 0
    3 hours ago, Dacron said:

    Hello

     

    I'm trying to get this to work but am having no joy. The Itach works from my old Vera controller so I know I have the Ip and port correct but I'm not a coder and am confused what the on and off buttons are for ? I have added the function above but with a IR string that I now works with vera but no joy any help would be great thanks

    see attachment for a Samsung TV. I combine the On / Off button and tested on my HC3.

    Works perfect.

    ps; for other IR devices, you must changer de HEX codes (

    Please login or register to see this link.

    )

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    Sorry but I still can't get this to work. I have the unit working with my VERA which I'm moving away from so I know the ip 192.168.1.38 is correct, the port 4998 and the HEX code sendir,1:1,1,37914,1,1,342,170,22,21,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,21,22,63,22,63,22,63,22,63,22,63,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,63,22,1538,\r

    works to turn my TV on/off. I have tried ,0x0D0x0A after 1538 as well as the below function. I haven't altered the code at all other than the IP, Port and the first function to the one below. Thanks

     

     

    function QuickApp:buttonOnOffOnReleased(event)
    self:send("sendir,1:1,1,37914,1,1,342,170,22,21,22,21,22,63,22,21,22,21,22,21,22,21,22,21,22,63,22,63,22,21,22,63,22,63,22,63,22,63,22,63,22,21,22,21,22,21,22,63,22,21,22,21,22,21,22,21,22,63,22,63,22,63,22,21,22,63,22,63,22,63,22,63,22,1538x0D0x0A",true)
    end
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 14 hours ago, Dacron said:

    Sorry but I still can't get this to work.

     

    Here is a snippet from the code for my reciever:

     

    function QuickApp:uibtn_PowerOnReleased(event)
    self:send("sendir,1:1,1,37878,1,1,340,169,22,21,22,63,22,21,22,21,22,63,22,21,22,63,22,63,22,21,22,21,22,63,22,63,22,21,22,63,22,63,22,21,22,63,22,63,22,21,22,63,22,21,22,21,22,63,22,63,22,21,22,21,22,63,22,21,22,63,22,63,22,21,22,21,22,1500,340,84,22,3633,340,84,22,3633,340,84,22,3633,340,84,22,3633,340,84,22,37000x0D0x0A"true)
    end
     
    Have you named the button itself correctly? In my example above, the name in the "onReleased" text field up in the right has the text "uibtn_PowerOnReleased". I've also set the ID of the button to "btn_Power", and the label to "Power".
    All the functions of the buttons I put last in the code, after:
     
    function QuickApp:onInit()
        self:debug("onInit")
        self.ip = self:getVariable("ip")
        self.port = tonumber(self:getVariable("port"))
        self.sock = net.TCPSocket()
    end
    Link to comment
    Share on other sites

    • 0

    Which itach unit are you using robw ? I have the Wi Fi connected Flex units.

    I didn't change your buttons at all, I changed the IR command string only in your first function and entered the IP and port of the device. If I use iTest the IR emitter blinks but if I try any of the buttons in test mode in HC3 the emitter doesn't blink. I know the buttons all work for you so I would expect the IR emitter to blink on my unit but nothing.

    Link to comment
    Share on other sites

    • 0

    Thanks robw, I've finally figured what I was doing wrong ! I was putting the ip and port numbers in the code and not changing it in the Variables tab. Lesson learnt and all works perfectly.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 2/13/2021 at 1:43 PM, Dacron said:

    Thanks robw, I've finally figured what I was doing wrong ! I was putting the ip and port numbers in the code and not changing it in the Variables tab. Lesson learnt and all works perfectly.

    Glad it work for you now! :)

    Link to comment
    Share on other sites

    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.

     Share

    ×
    ×
    • Create New...