Home
HomeVisionXL
Schedule Recovery
Pronto Hex Converter
Pronto Hex Generator
Downloads
Links


The HomeVision controller has the possibility to test an infrared signal without the need to download a complete new schedule. The irledit tool makes use of this feature. For an explanation of how this is accomplished, two seperate items will be described. First of all some form of communication between the utility and the HomeVision software is needed. Second, the commands that need to be sent to the HomeVision controller will be explained.

Communication with the HomeVision application

Version 3.1 of the HomeVision software introduced the possibility for two instances of the software to communicate to each other. The irledit tool behaves as the client side towards the HomeVision application, which should be configured as the server.

The general layout of the data being exchanged between the client and the server is as follows:
Byte 1-6 -1 -5 -2 -4 -3 -7 Flag for synchronization after transmission error
Byte 7-13 Packet length Total length of the data packet as zero padded decimal ASCII string
Byte 14 Command code A single character indicating the kind of information in the packet
Byte 15-(n-1) Data The actual payload of the packet
Byte n Checksum Byte to make the sum of all bytes in the packet add up to90 (0x5A)

Simple connection

Before commands can be sent from the client to the server, the connection needs to be established. The client initiates the connection by opening a network socket to the HomeVision remote internet server port. The server will confirm that it has accepted the connection with a '1' command. The data bytes contain information on the connection from the server to the HomeVision controller. This can either be 'PORT=OPEN' or 'PORT=CLOSED'.

Password authorization

If a password is required for the connection, the first transmission from the server will be a 'W' command without any data. The client then has to send back a 'W' command with the password in the data bytes. If the password is incorrect, the server replies with a 'I' command without any data. The server can then try again by sending another 'W' command with a password. If the password is accepted, the connection will proceed as described for the simple connection.

HomeVision controller commands

The client application can send commands to the HomeVision controller by wrapping them in a 'S' type packet. The data should include the header character (comma) and the terminator character (carriage return).

HomeVision controller reports

Any output generated by the HomeVision controller will be forwarded to the client inside a 'S' type packet. This includes event reports and output generated by the program running in the HomeVision controller in addition to command responses. The command responses will include the carriage return, line feed, SOH sequence indicating the command has completed. Any other output should be discarded or dealt with appropriately by the client. The response to a command may be split into two or more packets. These will have to be reassembled by the client.

Terminating a connection

The connection is terminated by simply closing the network socket.

Example dialogue

Server Client
0000015W
FF FB FE FC FD F9 30 30 30 30 30 31 35 57 C3
0000024Wbadpasswd
FF FB FE FC FD F9 30 30 30 30 30 32 34 57 62 61 64 70 61 73 73 77 64 0A
0000015I
FF FB FE FC FD F9 30 30 30 30 30 31 35 49 D1
0000023Wpassword
FF FB FE FC FD F9 30 30 30 30 30 32 33 57 70 61 73 73 77 6F 72 64 51
00000241PORT=OPEN
FF FB FE FC FD F9 30 30 30 30 30 32 34 31 50 4F 52 54 3D 4F 50 45 4E 35
0000020S,G00\r
FF FB FE FC FD F9 30 30 30 30 30 32 30 53 2C 47 30 30 0D EB
0000023S17 Cmd: 
FF FB FE FC FD F9 30 30 30 30 30 32 33 53 31 37 20 43 6D 64 3A 20 D2
0000022SDone\r\n\1
FF FB FE FC FD F9 30 30 30 30 30 32 32 53 44 6F 6E 65 0D 0A 01 2B

Infrared signal test

The HomeVision controller has two 64Kb RAM areas. One is used for storing the main configuration settings, objects, actions, sunrise- and sunset table and the serial transmit and receive buffers. The other contains the object names, learned infrared signal pulse data, Thermostat data and the TV event log. The data log utilizes otherwise unused space in both areas. For the infrared test signal a 512 byte memory region has been reserved in the second 64Kb area. This region starts at address 0x2400. First the pulse information must be loaded into memory and subsequently a command must be issued to transmit the infrared signal.

Infrared pulse data

The infrared pulse data consists of a series of 4-byte elements. The first two bytes of each element indicate the number of pulses of the carier to be sent. The next two bytes contain the timer value for the idle period. This data is exactly the same as the pulse information stored in the IRL format and is described in more detail in the HomeVision IRL file format document.

Loading the HomeVision controller RAM

The data can be loaded into the RAM area with the HomeVision 'b' and ']' serial commands. The 'b' command will load 13 bytes into RAM while the ']' commands loads only 1 byte. The best way to load the pulse information would be to use 'b' commands until there are less than 13 bytes left and use ']' commands for the remaining bytes. Alternatively 'b' commands can be used to load all the data. The last command may have to be padded with some filler bytes to make up a total of 13 bytes.

Details of the load commands

The 'b' command requires 15 additional bytes. The first two bytes represent the binary value of the memory address to start loading the data. The remaining 13 bytes are the binary values of the data to be loaded. The ']' command must be followed by 6 bytes. The first 4 bytes make up an ASCII string of the memory address to load in hexadecimal representation. The last 2 bytes contain the byte to be loaded as a hexadecimal ASCII string.

Infrared test signal transmit command

To actually instruct the HomeVision controller to transmit the infrared signal, the '_' command should be used. This command takes 6 bytes as data. The first two bytes are a hexadecimal ASCII string specifying the number of pulse cycles to transmit. The next two bytes are a hexadecimal ASCII string specifying the timer value for the on duration of the carrier pulses. The last two bytes are a hexadecimal ASCII string specifying the timer value for the off duration of the carrier pulses. These values are also explained in detail in the HomeVision IRL file format document.

Example

We want to load a RC5 signal with a system code of 20 and a command code of 54. This translates to a pulse data sequence in hexadecimal representation of 0020 f6b0 0040 ed10 0040 ed10 0040 f6b0 0020 ed10 0020 f6b0 0040 ed10 0020 f6b0 0040 2a93. The carrier frequency of a RC5 signal is 36kHz and the duty cycle is 25%. The resulting data exchange with the HomeVision controller would then be:
 
Command Response
,b$....`.@...@...
2C 62 24 00 00 20 F6 B0 00 40 ED 10 00 40 ED 10 00 0D
32 Cmd: Done
33 32 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,b$.@.`.......`.@
2C 62 24 0D 40 F6 B0 00 20 ED 10 00 20 F6 B0 00 40 0D
32 Cmd: Done
33 32 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]241AED
2C 5D 32 34 31 41 45 44 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]241B10
2C 5D 32 34 31 42 31 30 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]241C00
2C 5D 32 34 31 43 30 30 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]241D20
2C 5D 32 34 31 44 32 30 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]241EF6
2C 5D 32 34 31 45 46 36 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]241FB0
2C 5D 32 34 31 46 42 30 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]242000
2C 5D 32 34 32 30 30 30 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]242140
2C 5D 32 34 32 31 34 30 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]24222A
2C 5D 32 34 32 32 32 41 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,]242393
2C 5D 32 34 32 33 39 33 0D
2D Cmd: Done
32 44 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01
,_09EDC6
2C 5F 30 39 45 44 43 36 0D
2F Cmd: Done
32 46 20 43 6D 64 3A 20 44 6F 6E 65 0D 0A 01


|Home| |HomeVisionXL| |Schedule Recovery| |Pronto Hex Converter| |Pronto Hex Generator| |Downloads| |Links|