{
"id": <string>, // optional
"type": <string>, // info|command|ack|error
"payload": { ... } // optional, message specific data
}Request
{
"id": "my_message_id",
"type": "info"
}Response
{
"id": "my_message_id",
"type": "ack",
"payload": {
"api_rev": 2,
"model": "Melexis Compact Master LIN",
"firmware_version": <string>
}
}Request
{
"id": "my_message_id",
"type": "command",
"payload": {
"endpoint": <string>,
"command": <string>,
"params": { ... }
}
}Response
{
"id": "my_message_id",
"type": "ack",
"payload": { ... }
}{
"id": "my_message_id",
"type": "error",
"payload": {
"message": <string>
}
}Request
{
"id": "my_message_id",
"type": "command",
"payload": {
"endpoint": "bootloader",
"command": "program",
"params": {
"hexfile": <string>,
"memory": <string>,
"manpow": <boolean>,
"bitrate": <number>,
"fullduplex": <boolean>,
"txpin": <number>,
"flashkeys": <array of numbers>
}
}
}Memory key can have values flash, nvram or eeprom.
Response
{
"id": "my_message_id",
"type": "ack",
"payload": { }
}Request
{
"id": "my_message_id",
"type": "command",
"payload": {
"endpoint": "bootloader",
"command": "verify",
"params": {
"hexfile": <string>,
"memory": <string>,
"manpow": <boolean>,
"bitrate": <number>,
"fullduplex": <boolean>,
"txpin": <number>,
"flashkeys": <array of numbers>
}
}
}Memory key can have values flash, nvram or eeprom.
Response
{
"id": "my_message_id",
"type": "ack",
"payload": { }
}Request
{
"id": "my_message_id",
"type": "command",
"payload": {
"endpoint": "power_out",
"command": "control",
"params": {
"switch_enable": <boolean>
}
}
}Response
{
"id": "my_message_id",
"type": "ack",
"payload": { }
}Request
{
"id": "my_message_id",
"type": "command",
"payload": {
"endpoint": "power_out",
"command": "status"
}
}Response
{
"id": "my_message_id",
"type": "ack",
"payload": {
"switch_enabled": <boolean>
}
}Request
{
"id": "my_message_id",
"type": "command",
"payload": {
"endpoint": "system",
"command": "wifi"
}
}Response
{
"id": "my_message_id",
"type": "ack",
"payload": {
"link_up": <boolean>,
"ip": <number>,
"netmask": <number>,
"gateway": <number>,
}
}TBD
TBD
TODO
Request
{
"__ping__": true
}Response
{
"__pong__": true
}