intelligent Home Automation System


smartHAuS© does the thinking for you.

icanHAS - Protocol

The communication protocol that the Arduino currently accepts. (Subject to change.)

Upon start up the Arduino sends the command out on port 10001, "Arduino online"

The Arduino reads all serial communication until it reaches a max of 100 characters or finds a newline before the hundredth character.

The Arduino then splits the string into two parts, the split is on a ":" character. If no ":" is present the whole string is treated as the command word.

The first half of string is the command word. The second half is a list of parameters, each separated by a space. (e.g. Command:param1 param2 param3)

Each parameters can be no longer than 30 characters and a maximum of 10 parameters.

The Arduino then attempts to run the command given. If no command is matched the Arduino responds with the string "unknown command".

If a command is found the Arduino will run the code specified for each command. The code for each command then has the parameters available for use in an array.

The following is a list of the current operating commands:

no parameters
restarts the Arduino device
no parameters
list the current commands supported by the device (command separated)
no parameters
acknowledges the command with the response "icanHAS:Cheeseburger"
one parameter
sets the name of the device to the what is in the first parameter string.
no parameters
retrieves the name of the device. Responds with the string "device_name=" followed by the device name string(e.g.device_name=catShark)
no parameters
retrieves the current temperature from the device in Celsius. responds withe the string "temp=" followed by the temperature(e.g. temp=26)
no parameters
turns on the relay to control the 120vac circuit. responds with the string "device on"
no parameters
turns off the relay to control the 120vac circuit. responds with the string "device off"