API Documentation available at https://docs.itron.nz
The ITRON HAB01 is compatible with the iTach API and has connectors/modules organised as follows:
Module 1 – Relay module – total of 8 connectors
Module 2 – IR transmitters – total of 3 connectors
Module 3 – Serial – total of 1 connector
Communication with the ITRONHAB01 is via a TCP connection on port 4998. All commands to IR and Relay modules are sent on this port. The serial module is accessed via port 5000.
IR Transmitters
The unit has 3 2.5mm IR outputs. They are compatible with the iTach API except there is no functionality to change the mode of the IR port. IR commands will also be accepted on module 1 from connector 1 to 3.
Relays
The unit has 8 10A 250V AC relays. 3 outputs of each relay are exposed via the screw terminal connector on the rear of the unit, N/O (Normally open), N/C (normally closed) and C (Common).
In addition to supporting the iTach API commands the following commands are also accepted:
setstate
supports toggle
As well as the standard state command of 0 for off and 1 for on, the setstate command accept 2 for toggle then expects an extra argument for on time.
command: setstate,1:1,2,20
response: state,1:1,2,20
Turns relay 1 on for 20 seconds. After 20 seconds it will turn off.
getgroup
Shows group membership.
command: getgroup,1:1
response: group,0:1,1,2
Which means relay 1 and 2 are members of group 1.
If there are no members it will display: group,0:1,
(a trailing comma)
setgroup
Sets group membership.
command: setgroup,1:1,3,4,5
response: group,1:1,3,4,5
Sets relays 3,4,5 as members of group 1. Any other relays that were in group 1 will no longer be members.
You can have a maximum of 4 groups (1,2,3,4) and a maximum of 5 relays per group.
Clearing Group:
command: setgroup,1:1
response: group,1:1,
(Note the trailing comma)
getgstate
Get group state
command: getgstate,1:2
response: N
Where N
is one of 0
(off) or 1
(on)
setgstate
Set group state
command: setgstate,1:2,N
response: gstate,1:2,N
Where N
is on of 0
(off) or 1
(on)
Serial
The RS232 serial port is accessible via tcp port 5000
Discovery Beacon
The HAB01 sends a beacon message which follows the AMX-B layout. The beacon is a UDP packet sent to the multicast IP address 239.255.250.250 on UDP port 9131. The beacon is broadcast every 15 seconds and has the following format:
AMXB<-UUID=ITRON_70B3D59B7111><-SDKClass=Utility>
<-Make=ITRON><-Model=itronhab01><-Revision=2.0.3>
<-Config-Name=HAB01><-Config-URL=http://10.0.0.91>
The UUID value contains the LAN MAC address of the ItronHAB01. The web configuration interface is available (in this instance) at http://10.0.0.91
Service Discovery
The unit also advertises itself via AVAHI (also known as Apple’s Bonjour and DNS Service discovery). The services advertised are:
- _itrond._tcp (itach compatible service running on port 4998)
- _http._tcp (web configuration page on port 80)