diff options
Diffstat (limited to 'inform_protocol.md')
-rw-r--r-- | inform_protocol.md | 24 |
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 | ||
10 | Everything appears to be pull-based, even provisioning. This makes sense with | 10 | Everything appears to be pull-based, even provisioning. This makes sense with |
11 | the cloud controller where the controller has no access to your network. I | 11 | the cloud controller where the controller has no access to your network. I |
12 | haven't documented yet how anything works within the protocol, that's next. | 12 | have not documented yet how anything works within the protocol, that is next. |
13 | This documents the overall protocol itself. | 13 | This documents the overall protocol itself. |
14 | 14 | ||
15 | The device will inform by executing an HTTP POST with an encrypted payload to | 15 | The device will inform by executing an HTTP POST with an encrypted payload to |
@@ -21,14 +21,14 @@ appear to contain multiple commands. | |||
21 | 21 | ||
22 | Raw Packet Structure | 22 | Raw Packet Structure |
23 | -------------------- | 23 | -------------------- |
24 | 4 bytes magic number integer | 24 | 4 bytes magic number integer |
25 | 4 bytes version integer | 25 | 4 bytes version integer |
26 | 6 bytes hwaddr string | 26 | 6 bytes hwaddr string |
27 | 2 bytes flags short | 27 | 2 bytes flags short |
28 | 16 bytes initialization vector string | 28 | 16 bytes initialization vector string |
29 | 4 bytes data version integer | 29 | 4 bytes data version integer |
30 | 4 bytes data length integer | 30 | 4 bytes data length integer |
31 | n bytes encrypted payload string | 31 | n bytes AES encrypted payload string |
32 | 32 | ||
33 | Raw Packet Constraints | 33 | Raw Packet Constraints |
34 | ---------------------- | 34 | ---------------------- |
@@ -41,7 +41,7 @@ Payload Types | |||
41 | ------------- | 41 | ------------- |
42 | The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the | 42 | The payload is AES encrypted in CBC mode using PKCS5 padding. They key is the |
43 | device auth key from the database or a master key that is hard coded if the | 43 | device auth key from the database or a master key that is hard coded if the |
44 | device hasn't been provisioned yet. The master key is hard coded in the | 44 | device has not been provisioned yet. The master key is hard coded in the |
45 | controller code in the DeviceManager class and pretty easy to find. | 45 | controller code in the DeviceManager class and pretty easy to find. |
46 | 46 | ||
47 | MASTER_KEY = "ba86f2bbe107c7c57eb5f2690775c712" | 47 | MASTER_KEY = "ba86f2bbe107c7c57eb5f2690775c712" |
@@ -118,8 +118,8 @@ following output payloads. | |||
118 | Input Payloads | 118 | Input Payloads |
119 | -------------- | 119 | -------------- |
120 | Incoming packets appear to be a JSON version of the out put of the `mca-dump` | 120 | Incoming packets appear to be a JSON version of the out put of the `mca-dump` |
121 | command on the device. There is definitely some AirOS legacy in here. I don't | 121 | command on the device. There is definitely some AirOS legacy in here. I do not |
122 | document the whole input payload since most of it isn't interesting. | 122 | document 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 |