Hawk - Control Output from Server
Table of Contents
The Hawk has various digital outputs available, based upon which plug in I/O card is used.
- Switched Ground
- 3V3 output
- VBoost Output (can be configured to 5V or 12V)
See Hawk Baseboard + Plug in Cards - Wiring+Pin Out
All 3 outputs can be controlled from the server. However the Hawk also has the ability to configure a variety of on-board control options - such as turning on an output based on a certain sensor reading - i.e. turn on a pump if tank level is too low.
The output active levels are configured on the Plug In Card parameter tabs
OEM WebAPI
Contact Support who can provide you with an OEM WebAPI doc, which details messages which can be sent to OEM Server and actioned on devices. Messages will be received and actioned by devices the next time they connect in.
To control outputs, message 0x004 - Set Digital Output is used. Users must authenticate with their OEM username and password.
Payload
Data structure for to set digital outputs.
Offset | Length | Data Type | Description |
0 | 2 | UINT16 | Logical level b0 – output 0 logical level: On = 1; Off = 0 b1 – output 1 logical level: On = 1; Off = 0 b2 – etc. |
2 | 2 | UINT16 | Change mask b0 – set output 0 according to logical level b1 – set output 1 according to logical level |
JSON Example
{
"MessageType":4,
"CANAddress":4294967295,//0xFFFFFFFF,//HOST_ADDRESS
"Data":[15,15,6,0],
"ExpiryDateUTC":"2020-03-18T18:25:43.511Z"
}
This results in:
Change mask of 0xFF - i.e. set all outputs according to the logical level.
Output 1 and 2 (0110 = 6) are turned on, all others turned off.
Monitoring Output State
We can see if the change to the output has been made by checking the state of outputs in the Digital Data field (FID=2)
Additionally if we configure the Input Monitor to log when the output changes, we will see log reason 10 - Digital Output Changed when the output changes.
Controlling the Output from Telematics Guru
Please see Digital Outputs - Introduction for more information on how to remotely control the Hawk's digital output from Telematics Guru.
- 3v3 - Digout 0
- Vboost - Digout 1
- SWGND- Digout 2