General > AV Control

Here are some Tips for iTach, IR and UI7

(1/10) > >>

After trying for a long time to add a device to control an IR command, it suddenly dawned on me that that I actually don't want devices at such tasks. I don't want to have a device where I can lower the screen etc. Because Vera is not an extra remote, it's a "scene tool". The screen should be lowered based solely on a scene. Watching Netflix is a scene where many things happen, not a collection of devices. So here are my tips.

Tip 1.
Don't use devices for IR commands. Instead:

* You don't need the Global Cache GC100 app for this. Actually, no app is needed on Vera for this to work.

* Create a text file called "ircommand.lua" (see attachement), and saved it under "/usr/lib/lua".
NOTICE: You MUST configure this file based on your needs and settings. See below.

* Execute the command "luup.reload()".  From "Apps | Develop apps | Test luup code (LUA)"Now you can send IR commands to the AV system using LUA in scenes. There are no need for any Vera devices. I put the LUA code into a scene like this example:

require "ircommand"

This will lower the Screen, turn on the projector and turn on the AVR and activate the HDMI where Chromecast is connected. (Yes, I now use this method instead of an app for the AVR.)
I also have other devices configured normally in the same scene like turning off the lights etc.

About step 2:
You will need to adjust the IP address in the file. Only IP though, the port is correct. Look for this line:

c = assert(socket.connect("", 4998))

The need for IR commands to end with ",\r" is handled in the code. Do not apply this at the end of your IR codes.
Add your IR codes based on your need and name the functions thereafter. The module name and the function name builds the command you will use in your scene.
The file I attached have some comments which might assist.

Tip 2.
When using iLearn to fetch IRs from the remote, set the Format to "GC Compressed" when learning. This will solve the problems reading long IR commands. E.g. I was not able to fetch any working code from my Onkyo AVR remote before using the compressed format. After iTach has read it, set the Format back to "Global Cache" before you press Edit. Then it will be copied correctly into the "Edit view" field, and is now ready to be copied to the file mentioned in Tip 1.

Tip 3.
Try the commands in "Apps | Develop apps | Test luup code (LUA)" before applying them to scenes. Remember to start with: require "ircommand".

If anyone see any issue in the LUA file, or suggestions to do it better please give feedback.

Hope this can be of help. (It would have been for me when first starting on the "iTach, IR and UI7" path  ;) )

Thanks to wilme2 for the code I reused here. See,32420.msg299775.html#msg299775

Other resources used was:

Worked really well and an elegant simple approach to Ir control with the iTach. Had spent 6 hours trying to add my devices and given up  :'(....thank you for sharing

Works Great! months waiting to use my itach vith Vera. Thank You!

thanks very much for sharing this approach that will allow me to control air conditioners by vera

after review and implement all the steps for implement your solution, i stopped in the step 2:
"Create a text file called "ircommand.lua" (see attachement), and saved it under "/usr/lib/lua".

i've the "ircommand.lua" whit the IR codes for my equipement created and stored in my windows pc, but i can't figurite out how transfer it to /usr/lib/lua dir in vera
i must reocnginze that i don?t have any expirience and knowledge about unix and SSH

i need step by step instructions to transfer de file from my pc to the vera system

could yo please help me?

Best Regards


Step 1:
You will need to connect to your Vera with a file browser. If you are using Windows I recommend you download WinSCP. Download from here:

Step 2:
After installation of WinSCP you should be able to log into Vera by using it's IP.
Username is: root
password is noted under your Vera as the WIFI password

After you press login. You will then see all the files in Vera in the right pane.

Step 3:
You should now be able to navigate to the following path in the Vera File system:


Step 4:
In WinSCP locate the new lua file from your local drive. Navigate in the left pane to the correct path where the fie is located.

Than drag it over to the right pane, so it is copied to Vera. IMPORTANT: Make sure you are on the correct location in Vera, that is /usr/lib/lua

That should be it. Remember Tip 1, #3 in the original post. That is: luup.realod().

Please inform if I can assist further.


[0] Message Index

[#] Next page

Go to full version