Last time I explained how to find the available Cubes on the network and get their IP-addresses.
This time we will say Hello to the Cube. And polite as it is, it will always reply with a nice Hello back.
When we connect to the Cube for the first time (with the correct IP-address on port 62910, or port 80 for older firm wares) we get a bunch of welcoming messages, the H, M, C and L responses.
Furthermore, when we send an h: message (by simply sending h:\r\n) we also get the H response. The H response is a comma separated list of fields starting with H: (like all Cube messages start with a character and a colon) An example of the H response with all fields:
H:JEQ0544923,03f25d,0113,00000000,299ca43f,00,32,0d0c1d,1013,03,0000 00: Serial Number : JEQ0544923 01: RF Address, hexadecimal : 03f25d 02: Firmware version : 0113 03: Unknown : 00000000 04: HTTP Connection ID, hexadecimal : 299ca43f 05: Duty Cycle : 00 06: Free Memory slots : 32 07: Encoded Cube Date : 0d0c1d 08: Encoded Cube Time : 1013 09: Clock Set (not sure what it is) : 03 10: unknown : 0000
The address and firmware should look familiar because they are also present in the UDP answer when finding a cube. I have yet to familiarise myself with the duty cycle and free memory slot fields. For the time being, I store them and ignore them. Same goes for the Clock Set field.
Lastly, the date and time (which the cube uses internally) are a bit encoded. You have to split the date into its bytes, so 0d, 0c and 1d. These (hexadecimal) figures represent year, month and day. In this case it would be 13, 12, 29 which is the 29th of December, 2013.
Same goes for time. Split it in bytes, so 10 and 13. These represent hour and minutes. In this case it would be 16, 19 which would be 16:19.
The cube date and time can be important to keep watch of because, obviously, the cube uses this time for its own weekly program.
Next time I shall talk about the ‘M’ (Meta Data) Response message which will tell us which rooms (or groups as they are called internally in the Cube) and devices are present.