Skip to content

Message Definitions

Corey Thompson edited this page Jan 22, 2023 · 3 revisions

V2 Messages

coilWriteMsgV1

{ 
"requestedValue" : 20, //uint16 
"contentType":"coilWriteMsgV1", //required 
"sessionId":"session-820923084792", //requestor supplied, not guaranteed unique 
"resTopic":"cmd/security/app1/res" //where to send results 
}

coilWriteResV1

Format of result message published to a command's resTopic
{ 
"requestedValue" : 20, //uint16
"actualValue" : 20, //unit16
"contentType":"coilWriteResV1",
"sessionId":"session-820923084792", //requestor supplied id, will be generated if empty
}

registerWriteMsgV1

{
"requestedValue" : true //boolean
"contentType":"registerWriteMsgV1",
"sessionId":"session-820923084792", //requestor supplied, not guaranteed unique
"resTopic":"cmd/security/app1/res" //where to send results
}

registerWriteResV1

Format of result message published to a command's resTopic
{ 
"requestedValue" : true, //boolean 
"actualValue" : true, //boolean
"contentType":"registerWriteResV1",
"sessionId":"session-820923084792", //requestor supplied id, will be generated if empty
}

V1 Messages

Messages in V1 are for incoming commands only with no response enabled.

Note: This message structure was an unnamed object at time of release in 0.1.0beta and 0.1.0

registerWriteMsg

{ "value" : 20 //uint16 }

Clone this wiki locally