Author Topic: Here are some Tips for iTach, IR and UI7  (Read 10400 times)

Offline PrincessCleavage

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: +4/-1
Here are some Tips for iTach, IR and UI7
« Reply #30 on: November 29, 2017, 02:21:31 am »
Let's try some simple things first.

Try this first (from step 3):
luup.reload()

If that doesn't help confirm the Lua file is still in its location and is the correct version.

Also try a reboot on Vera.
I have already attempted several restarts and luup engine reload and also replacing/creating a simplified ircommand.lup file on the vera unit. I have my IR commands working again and I hope the system is now stable. In case this may help someone else below is what I believe ( but mostly luck ) that got my system working again:
1. Enable notifications Users & Account Info → Notification Settings → and check; ?Notification Header?, then Update Notification Settings
2. I then notice device 171 was stalling the Luup engine to load successfully (which I think Vera not so helpful support may of added)
3. Then ran the below code to list all active devices
local file = io.open("/www/devlist.txt", "w")
file:write("[DeviceNo / id] device names on " .. os.date() .. "\n")
 
for deviceNo,d in pairs(luup.devices) do
if d.id ~= "" then
file:write(string.format('[%03d / %s] %s \n', deviceNo, d.id, d.description))
end
end
 
file:close()
View your device list at - http://vera i.p/devlist.txt
4. I then compared the output of the above list to device listed under, create new scene goto advanced editor add new task and compare from the drop down selectable device list. Note any device ID that look safe to delete
5. Delete safe list made from step 4 using below code
http://vera i.p:3480/data_request?id=device&action=delete&device=deviceID
Then restarted the unit and tested IR codes which were working as expected. I then added all my IR scenes back as per normal operations.

Thanks for your time to make suggestions!
« Last Edit: November 29, 2017, 02:25:38 am by PrincessCleavage »

Offline rock

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #31 on: December 19, 2017, 11:38:07 am »
OK, first off, apologies if I hijacked this discussion, but this appears to be the most current thread I could find that is germane to what I'd like to accomplish.

I've got a Vera Lite running version 1.7.987 of the firmware.
I'm trying to get it to talk to my GC-100 so I can send RS232 commands. End goal is control of my Lutron Radio RA (not RA 2) system through the RS232 port on the Chronos System Bridge (I've got two, hence the two ports on the GC-100).
I'm pretty well versed with RS232 and IR communication as I have a slew of Global Cache devices running my entertainment systems via iRule.

From what I've read the GC-100 Plugin and Lutron Plugins (there are two) are a time sink with no joy at the end and indeed I can find almost no doc on these and my efforts to get any of them to work were unsuccessful.

I have no problem coding up a text file and dumping it on the Vera, in fact I'd prefer to do it that way.

Is that the way to go. Are there any example files out there that have a GC-100 (both ports) working with a Vera Lite? How to I connect to the Vera via terminal, ssh? telnet? How do I push files to the Vera, scp? Where do I put them, is there a standard Posix type directory structure? How do I then get the code to run? Are there debugging tools?

Offline rock

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #32 on: December 20, 2017, 09:41:38 am »
After much digging I believe I've answered most of my own questions.

If I were to code up functions in a .lua file (which seems pretty straight forward), then drop the file in the /usr/lib/lua directory on the Vera, how to I associate the functions with the various aspects (ON / OFF for example) of a gui device in the devices tab. Or can I only associate those functions with scenes?

Offline PrincessCleavage

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: +4/-1
Here are some Tips for iTach, IR and UI7
« Reply #33 on: December 20, 2017, 02:54:34 pm »
After much digging I believe I've answered most of my own questions.

If I were to code up functions in a .lua file (which seems pretty straight forward), then drop the file in the /usr/lib/lua directory on the Vera, how to I associate the functions with the various aspects (ON / OFF for example) of a gui device in the devices tab. Or can I only associate those functions with scenes?
I have an air conditioner unit that has one on/off button (same ir code for on off) in the lua file that I have uploaded to Vera the air conditioner ir line is ?airconcool? so I the created a scene called Aircon On/off and under advance section add the below code to ?also execute the following lup code? and set the triggers.

require "ircommand"
ircommand.airconcool()

Information is scattered but I believe there is an attachment at the start of one of the threads where you can use the attached files as a template to upload to Vera, also be sure to test your code in develop apps section as I have observed bad calls can introduce unpredictable delays into your system.
I hope this is of some help
« Last Edit: December 20, 2017, 02:57:44 pm by PrincessCleavage »

Offline avigo2000

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #34 on: May 12, 2018, 08:52:47 am »
I am not seeing the attachment here.. Any help with posting it, or pointing me in the right direction. Thanks

Offline Dacron

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #35 on: July 03, 2018, 12:46:42 pm »
I just can't access vera to place the file, I've used a number of programs and have used root, IP, wifi password from the bottom of the unit and port 22 but I just can't sign in to place the file.

Please help !

Thanks

Offline neverathome

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #36 on: July 09, 2018, 01:29:46 am »
Does any one know a code to control the relays on the GC100?

Offline sebpoterie

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #37 on: August 07, 2018, 09:19:02 am »
I just can't access vera to place the file, I've used a number of programs and have used root, IP, wifi password from the bottom of the unit and port 22 but I just can't sign in to place the file.

Please help !

Thanks

Have U try with winSCP ? (see attachment)

login : root
password : located on the label under your Vera unit assigned to "WiFI Pass"

It works for my VeraEdge


On Vera Lite's, the root password isn't printed on the bottom. So you need to access to the 'Tech Support' settings. Depending on your UI version, this is either under the Advanced tab, the Settings tab, or the Account tab. There will be an 'enable' button. Click that to turn on the tech support service. You will see a message like this:

Tech support full control enabled, access code 3000000-436969

The first number is your serial number, which is always printed on the bottom. The second number is a temporary password created for a user called "remote". So, follow the same login instructions, but, instead of typing root for the login, type remote. And instead of using the normal password, use that temporary password, 436969 in this case. Once you have gotten in to the console, you can see the actual root password using this command: nvram show | grep pass

You'll see something like this:

root@MiOS_30000000:~# nvram show | grep pass vera_wifipass=shade83forest

So in this case, shade83forest, is the actual root password. Write it down, and from now on login as 'root' as explained earlier, and use that password. The temporary password for the remote user will only be valid for 24 hours or until you click 'Disable it' on the tech support page.


Offline Talisker

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #38 on: September 03, 2018, 04:55:15 pm »
Have just changed my IP address for my iTach.  Prior to that it's been working (as set up following this post) for months. Now the commands won't run.  If I paste the following in to "Apps | Develop apps | Test luup code (LUA)"

require "ircommand"
ircommand.LS1()

I get error messages 'failed to test code please try again'.  Similarly if I run a scene with similar code I get 'Scene failed to run'.

I have double checked my IP address in my ircommand.lua file.  The commands work if I use the iLearn sofware so I have the correct IP address.

Any suggestions would be gratefully received.


« Last Edit: September 03, 2018, 05:30:08 pm by Talisker »

Offline rostmo

  • Newbie
  • *
  • Posts: 15
  • Karma: +1/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #39 on: September 29, 2018, 04:51:13 am »
@Talisker, did you solve this?

If not, start with
1: confirming you actually have the latest version of the LUA-file in /usr/lib/lua. I have noticed it have been overwritten in my system once or twice with an older version (from the auto backup folder)
2: Make sure you execute step 3 from the original post: "luup.reload()"

If this didn't help please tell, and I'll try to look forther into it.
« Last Edit: September 29, 2018, 05:04:06 am by rostmo »

Offline Talisker

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #40 on: October 01, 2018, 03:58:27 pm »
rostmo,

I fixed it.....  It would appear that my LUA-file in /usr/lib/lua was somehow replaced with an older version.  I replaced it with the correct file and it is now working OK.

Thanks.

Offline thumper702

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #41 on: October 06, 2018, 03:44:45 pm »
I have been unable to get this to work, any help would be appreciated.

I am using a Vera3 running UI7. I also have a GC-100 rack mounted device (GC-100-18R). Module 1 and 2 are for the serial ports, thus module 4 is the correct module when using the code for this device. I use the Global Cache learner attached to the 1st serial port and can pull the code using iLearn. Using iTest I can send the command and the projector responses. I can send the command using repeat 2 and it turns the projector off.

Additionally, the IP address is correct as I can visit the Global Cache GC-100 UI. I also set the device to maintain a static IP address (so it never changes).

I have created the ircommand.lua file and it is located in the proper location (usr/lib/lua) and has to proper name ircommand.lua
the Lua file itself is as followed:
Code: [Select]
module("ircommand", package.seeall)

local cmd

function epsonon()
cmd = 'sendir,4:1,0,38000,1,1,340,168,22,62,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,62,22,20,22,62,22,20,22,62,22,20,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,20,22,20,22,62,22,62,22,62,22,62,22,62,22,20,22,62,22,62,22,20,22,3800'
sendir(cmd)
end

function epsonoff()
-- Epson needs the On/Off button to be pressed two times.
cmd = 'sendir,4:1,0,38000,1,1,340,168,22,62,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,62,22,20,22,62,22,20,22,62,22,20,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,20,22,20,22,62,22,62,22,62,22,62,22,62,22,20,22,62,22,62,22,20,22,3800'
sendir(cmd)
sendir(cmd)
end

function sendir(commandtosend)
commandtosend = commandtosend .. ',\r'
local socket = require("socket")
c = assert(socket.connect("192.168.1.253", 4998))
c:settimeout(5)
local sres, serr = c:send(commandtosend)
local data, rerr = c:receive(5)
c:close()
end

When I reloaded the luup and attempt to test on the test luup code (lua) under Apps/Develop Apps in Vera UI7 I use the following code.

Code: [Select]
require "ircommand"
ircommand.epsonon()

I get the code successfully sent. However, no action is done by the project. Where am I messing up? Again, any help is appreciated.

Thank you.
« Last Edit: October 06, 2018, 04:43:31 pm by thumper702 »

Offline rostmo

  • Newbie
  • *
  • Posts: 15
  • Karma: +1/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #42 on: October 06, 2018, 05:29:37 pm »
Try swap 4:1,0 with 4:1,1

Sent fra min E6653 via Tapatalk


Offline thumper702

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Here are some Tips for iTach, IR and UI7
« Reply #43 on: October 06, 2018, 06:18:02 pm »
Thank you for a swift reply. I appreciate the assistance.

However, I switched the 0 to a 1 and it still did not work. I also reloaded Luup after making the changes.

sendir,4:1,0,38000,1,1,340,168,22,62,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,62,22,20,22,62,22,20,22,62,22,20,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,20,22,20,22,62,22,62,22,62,22,62,22,62,22,20,22,62,22,62,22,20,22,3800

and

sendir,4:1,1,38000,1,1,340,168,22,62,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,62,22,20,22,62,22,20,22,62,22,20,22,62,22,20,22,20,22,20,22,20,22,20,22,62,22,20,22,20,22,62,22,62,22,62,22,62,22,62,22,20,22,62,22,62,22,20,22,3800

both work as codes using iTest (and turns on/off the projector).
Vera stats the code sent was successful, but not luck in getting it to work.
« Last Edit: October 06, 2018, 06:38:45 pm by thumper702 »

Offline PrincessCleavage

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: +4/-1
Re: Here are some Tips for iTach, IR and UI7
« Reply #44 on: October 06, 2018, 07:32:31 pm »
Originally I had similar issues and the best way I found to move forward was to go back to the original lua example file posted in this thread and just change the code and the name description on one of his items (as a test) then upload and test. Usually I will find that it works and I slowly modify and test from that working point (I.e usually an error on my part but buggered if I could see it).