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

IR Remote Control for HC2


FJW

Question

Hi,

 

I was looking fora n IR remote control to use with my HC2 but found nothing that suited my needs.

A few weeks ago I came across a linux programm called “TriggerHappy”. Triggerhappy claimed to trigger events for key presses.

Although I am NO linux expert I looked around the internet for more information about triggerhappy and now I have a working IR remote control that does everything I wanted.

If you can control HC2 via api calls, you can control it via triggerhappy. I use “curl” to send the commands.

 

I had on old Raspberry Pi (I thing model 3) and an extra Flirc USB IR receiver and, of course, a power supply.

The Flirc IR receiver converts ir remote control signals to key presses. This can easily be configured with the software from Flirc.

 

On the RPI I installed Raspbian Buster, this comes with “TriggerHappy preinstalled”.

 

The triggers for triggerhappy must be stored in: /etc/triggerhappy/triggers.d and can be any name but must have the extension: .conf. I called mine: remote.conf.

 

In this conf file you can add all the keys for your remote control. Together with the curl command to execute.

 

After creating / changing the conf file you must restart triggerhappy to activate the changes with the following command:

 

sudo systemctl restart triggerhappy

Or

sudo /etc/int.d/triggerhappy restart

 

On my HC2 I created a Virtual Device with buttons for my remote. I have a “remote” users that only has rights to this VD (but you could also access scenes). Just a safety precaution. I use this user in the curl command.

Now you should have a working IR remote control for your Home Center. I am not sure if it also would work with HC Lite.

Here are a few of my conf file entries: (see TriggerHappy for explanations)

 

KEY_P   1       /usr/bin/curl -u USER:PWD -S "http://HC_IP/api/callAction?deviceID=309&name=pressButton&arg1=4"

 

KEY_P is the key on the keyboard, 1 stands for key press and after that is the curl command.

 

Ctrl End key combination:

KEY_END+KEY_LEFTCTRL    1       /usr/bin/curl -u USER:PWD -S "http://HC_IP/api/callAction?deviceID=309&name=pressButton&arg1=1"

 

Press VD button:

KEY_SPACE   1       /usr/bin/curl -u USER:PWD -S "http://HC_IP/api/callAction?deviceID=309&name=pressButton&arg1=4"

 

Call scene:

KEY_F1   1       /usr/bin/curl -u USER:PWD -S "http://KODI:[email protected]/api/sceneControl?id=65&action=start"

 

 

 Cheers,

FJW.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

So Flirc is not only a receiver, but also a IR transmitter?

 

Tnx for the howto.

Edited by rvelthoen
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.

×
×
  • Create New...