General > AV Control

Here are some Tips for iTach, IR and UI7

<< < (3/10) > >>

rostmo:

--- Quote from: jjwork on May 19, 2017, 05:18:22 am ---Thank You Rostmo !!

You are a life saver !!

I have managed to get multiple Flex units working on IR.

Now for the holy grail of Serial ....

I am anxiously waiting to see if anyone has had any success.

I think it is a different beast as the serial commands are different to the IR ....

--- End quote ---
Can you show me (post here) a command that you know is correct for the serial? I can see if I can add it to the file.

Sent fra min E6653 via Tapatalk

shallowearth:
Here is a code example of how to you talk to a ITach Flex is that is configured for Serial comms
This is to talk to a Monoprice 6-zone audio amp


--- Code: ---local socket = require("socket")
host = "1.0.0.5"
c = assert(socket.connect(host, 4999))
c:settimeout(5)
 
local sres, serr = c:send("<10PR01\r")
local data, rerr = c:receive(8)
luup.sleep(1000)
c:close()

--- End code ---
Some things to know about the Serial.
They don't all require a return code at the end. Monoprice specifically asks for the "\r" return code at the end.
You do actually have to listen for a receive, the iTach won't take another send command if it gets a response and you don't call receive. (monoprice always sends back a 8 char response which is why I use 8.  Not sure if the buffer and response actually have to match though).
I also noticed you can close the connection too early and Monoprice will just stop processing the commands you sent.  So I put a sleep in before the closing of the socket particularly if you are sending a bunch of commands (I break them in to no more than 6 commands in a row than sleep for a second, etc).  Definitely sleep before you close the socket if sending more than 4 or 5 commands.

sebpoterie:

--- Quote from: jjwork on May 19, 2017, 05:18:22 am ---Thank You Rostmo !!


I have managed to get multiple Flex units working on IR.


--- End quote ---

Hello gentlemen,

How did you manage to use several units ?
The IP address of the unit is adjusted in the file "ircommand.lua".
Help appreciate
Regards.

rostmo:

--- Quote from: sebpoterie on August 03, 2017, 06:23:07 am ---
Hello gentlemen,

How did you manage to use several units ?
The IP address of the unit is adjusted in the file "ircommand.lua".
Help appreciate
Regards.

--- End quote ---

You can have two units by either:
1: Create another lua-file. E.g. ir2command.lua which have another IP set. This might be the easiest if you're not familliare with programming.

or

2: Add a parameter to the function, and use an IF-ELSE clause to set the IP into a variable at the top of the ircommand.lua file.

Hope this helps.

sebpoterie:
Many thanks.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version