aboutsummaryrefslogtreecommitdiff
path: root/inform_protocol.md
diff options
context:
space:
mode:
Diffstat (limited to 'inform_protocol.md')
-rw-r--r--inform_protocol.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/inform_protocol.md b/inform_protocol.md
index bb26f36..cadbe24 100644
--- a/inform_protocol.md
+++ b/inform_protocol.md
@@ -9,7 +9,7 @@ disable.
9 9
10Everything appears to be pull-based, even provisioning. This makes sense with 10Everything appears to be pull-based, even provisioning. This makes sense with
11the cloud controller where the controller has no access to your network. I 11the cloud controller where the controller has no access to your network. I
12haven't documented yet how anything works within the protocol, that's next. 12have not documented yet how anything works within the protocol, that is next.
13This documents the overall protocol itself. 13This documents the overall protocol itself.
14 14
15The device will inform by executing an HTTP POST with an encrypted payload to 15The device will inform by executing an HTTP POST with an encrypted payload to
@@ -21,14 +21,14 @@ appear to contain multiple commands.
21 21
22Raw Packet Structure 22Raw Packet Structure
23-------------------- 23--------------------
244 bytes magic number integer 244 bytes magic number integer
254 bytes version integer 254 bytes version integer
266 bytes hwaddr string 266 bytes hwaddr string
272 bytes flags short 272 bytes flags short
2816 bytes initialization vector string 2816 bytes initialization vector string
294 bytes data version integer 294 bytes data version integer
304 bytes data length integer 304 bytes data length integer
31n bytes encrypted payload string 31n bytes AES encrypted payload string
32 32
33Raw Packet Constraints 33Raw Packet Constraints
34---------------------- 34----------------------
@@ -41,7 +41,7 @@ Payload Types
41------------- 41-------------
42The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the 42The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the
43device auth key from the database or a master key that is hard coded if the 43device auth key from the database or a master key that is hard coded if the
44device hasn't been provisioned yet. The master key is hard coded in the 44device has not been provisioned yet. The master key is hard coded in the
45controller code in the DeviceManager class and pretty easy to find. 45controller code in the DeviceManager class and pretty easy to find.
46 46
47MASTER_KEY = "ba86f2bbe107c7c57eb5f2690775c712" 47MASTER_KEY = "ba86f2bbe107c7c57eb5f2690775c712"
@@ -118,8 +118,8 @@ following output payloads.
118Input Payloads 118Input Payloads
119-------------- 119--------------
120Incoming packets appear to be a JSON version of the out put of the `mca-dump` 120Incoming packets appear to be a JSON version of the out put of the `mca-dump`
121command on the device. There is definitely some AirOS legacy in here. I don't 121command on the device. There is definitely some AirOS legacy in here. I do not
122document the whole input payload since most of it isn't interesting. 122document the whole input payload since most of it is not interesting.
123 123
124 callback from device: javascript object 124 callback from device: javascript object
125 alarm: list of sensors 125 alarm: list of sensors