Sending TCP commands upon IR reception

Ethernet specific questions and answers - IRTrans LAN, LAN Controller devices

Moderator: marcus

Sending TCP commands upon IR reception

Postby davidlefevre » Mon 30. Sep 2013, 12:20

Hello,

I recently bought an IRTRANS LAN I/O device, and i am now testing all the possibilities of the device.

I have a question about the action part in the device database.
I managed to set the device so that when it recives certain codes that i press on my remote control, it sends diferents commands to a specific IP adress and port.
My only problem is that these codes seems to be UDP only, while all the device that i want to control that way only accept TCP commands.

Do you know of a way to send specific commands in TCP upon recieving IR codes ?

(I managed to set a TCp connection with the device with a PC, the problem is that the command format is specific, and in my application there is no PC to start teh communication. I need the IRTRANS to be connected directly to another device which only accepts TCP commands)

Thanks for your help
davidlefevre
 
Posts: 5
Joined: Mon 30. Sep 2013, 09:48

Re: Sending TCP commands upon IR reception

Postby eric » Mon 30. Sep 2013, 15:02

Hi,

it's not possible to send custom TCP commands for received IR codes. All the IRDB actions are UDP only.

best regards
eric
Administrator
 
Posts: 157
Joined: Mon 22. Oct 2012, 10:05

Re: Sending TCP commands upon IR reception

Postby davidlefevre » Tue 1. Oct 2013, 09:11

thank you for your answer.

i have 2 additional questions :

Is it possible to conrol the 2 relays with a LAN command, or send a command from lan directly to RS232 ? (without using the infrared possibilities of the device)

Could you explain how to command the 2 relays with an infrared remote control ? I thought I could do it, but it doesn't seem to work. Here is what i do :
in the device database, i select a remote, then edit the actions for one command
in this action, i select Rel1 in Relaiscontrol, and tick toggle.
I flash the device, then push that button on my remote control
I check the output of the relay 1 with a jack cable, but the 2 pins of the jack are always unconncted. The relay doesn't seem to close.
I tried on Relay 2, same thing.
It is written in the hardware manual that the relay can be controlled by software commands too, but i didn't see anything in the server or client to control them directly.

Thank you !
david
davidlefevre
 
Posts: 5
Joined: Mon 30. Sep 2013, 09:48

Re: Sending TCP commands upon IR reception

Postby eric » Tue 1. Oct 2013, 10:44

Hi,

sending RS232 is pretty straightforward: In the Learn IR Code window enter a remote name and command name and then click "add RS232 command". Then enter the RS232 data. Also refer to the software manual chapter 3.6 on page 13.
The code can then be sent just like any IR code but will only transmit data via RS232.

With regard to the relays: You seem to have set up everything correctly. In the IR database window, mark and select the remote to be used. Then right click on the command and enter the relay and its behaviour as desired (see attached picture). When set up like shown the relay is toggled everytime the IR code is received.

to access relays directly there is a special "remote" and commands for the udp and html APIs:
the remote name is "***relais_#" where # stands for the number you want to control. The commands are:
0 - switch off
1 - switch on
T - toggle
I - switch on 2 seconds, then switch off (Impulse)
To switch on relay number 1 you would have to send "snd ***relais_1,1" via UDP to port 21000.
Attachments
relais.png
relais.png (107.8 KiB) Viewed 58393 times
eric
Administrator
 
Posts: 157
Joined: Mon 22. Oct 2012, 10:05

Re: Sending TCP commands upon IR reception

Postby davidlefevre » Wed 2. Oct 2013, 10:13

Thank you Eric,
i managed to control the relais both with IR and TCP : a jumper was misplaced for relay 1, that's why it wasn't working.

Could you tell me if I can get a list of all TCP commands available for the IRTRANS LAN I/O ?
We are now interested in geting the value of the Analog inputs, i suppose it is possible to get this value (as it is available on the server software), but the commands are not in the API document, as well as the relay commands.

David
davidlefevre
 
Posts: 5
Joined: Mon 30. Sep 2013, 09:48

Re: Sending TCP commands upon IR reception

Postby davidlefevre » Thu 12. Dec 2013, 13:06

Hi Eric,

Do you have an update as how to get the value of the analog inputs with a TCP command ? Or a list of accepted TCP commands perhaps ?
davidlefevre
 
Posts: 5
Joined: Mon 30. Sep 2013, 09:48


Return to Ethernet

Who is online

Users browsing this forum: No registered users and 7 guests

cron