What it does
IR-Man is a simple IR receiver interface, manufactured by Evation and available by mail-order in Europe for around £25. It connects to a spare serial port, and once initialised will output a continuous stream of pseudo-random data. If a remote control is pointed at the device, instead of pseudo-random data, a code uniquely identifying the remote button is generated.
The IR-Man connector for xAP listens to the data stream generated by IR-Man, and if an IR code matches one held in the internal database, a xAP event message is generated. In addition, a user-specified canned message may be also be sent over the network from a file. This provides a quick and easy mechanism for remote control of dedicated X-10 devices, for example, as well as the execution of more sophisticated actions.
Configuration
The IR-Man connector must be configured in order to map a given IR-code to a xAP event (or file). The configuration process is carried out via xAP messages.
To configure a mapping, send a message (e.g. using xap-send) that complies with the following schema:
xap-header { v=12 hop=1 uid=<...uid...> class=ir.set source=acme.my.controller target=rocket.irman.rx } ir.set { code=010000000000 event=Channel 1 file=lights_on.xap }
where code is the code generated by IR-man in response to a given remote activity. These can be determined by running the xap-irman connector with a debug level of 1 and operating the remote - the code will be displayed in response. event is an arbitrary value which is sent in the notification message when the remomte control is operated. file is optional, and specifies the canned message which is sent in addition to the standard event message in response to the remote button being pressed.
The IR mappings are automatically stored on disk and re-read at startup, so the IR-man connector only has to be configured once.
Event Message Schema
When a remote is operated, a message which mirrors the following schema is broadcast on the xAP network.
xap-header { v=12 hop=1 uid=<...uid...> class=ir.notify source=rocket.irman.rx } irman.event { event=Channel 1 }
Command Line Options
xap-irman <serial port>[instance name] [network interface] [udp port] [debug level]
where:
serial port is the serial port the IR-Man is connected to, specified ascom1 under windows or /dev/ttySx
instance name is the xAP instance name assigned to this clock instance. Typically this might identify the time source the clock connector is identified to. The default instance name is BigBen.
network interface is the network interface used for outgoing xAP messages. On a Linux and Windows PC host these are named eth0, eth1. Under OSX they are named ne0 etc. By default, eth0 is used. On a Windows PC which has multiple adapters installed, even if they are not active, eth0 may not represent the active interface - some experimentation may be required!
udp port is the UDP port xAP broadcasts on. By default xAP uses its officially allocated port, 3639. Using an alternative port can be useful during isolated testing, however. Be aware that the use of ports below 1024 will fail unless the application is run by a user with administrative privileges. The use of ports below 1024 therefore has security implications and is not recommend.
debug level determines the verbosity of the output written to stdout. Verbose output can be useful for debugging unexpected behaviour. By default, the debug level is 0. Increasing levels of detail may be specified, up to a maximum of 4.
Download
IR-Man Project
Irman connector source (requires xAP-lib) Irman connector windows executable (requires cygwin dll)
|