-
Notifications
You must be signed in to change notification settings - Fork 5
Serial API
A place to document the API as we figured things out - this is for the "Serial" API on TCP port 1487. See WebSockets API for details on the WS API. The documentation provided by Automate are available here.
Connectivity to the hub is on TCP port 1487. The format is roughly the same as v1 serial protocol.
The hub only supports one connection at a time. When connecting, any other existing connections are terminated.
Commands and responses start with a ! and end with a ;, new lines etc are ignored. After the !, the ID of the device is next, with 000 used to refer to the hub itself. Next following the action / type of data. See below for more details.
Much of this is documented by using the Pulse LINQ Control Utility.
Below is a table of known / useful commands for communicating with the Pulse 2 Hub.
The format of the actual commands shows variables between curly brackets ({}). If the variable is a fixed length (most are), then the :X shows the number of characters dedicated to that variable.
| Query | Format | Response Format | Eg Query | Eg Response | Comments |
|---|---|---|---|---|---|
| Hub Name | !000NAME?; |
!000NAME{name}; |
!000NAME?; |
!000NAMEdefault; |
Unsure how spaces and ; are handled |
| Mac Address | !000MAC?; |
!000MAC{mac:17}; |
!000MACc4:4f:33:aa:bb:cc; |
The MAC address of the Hub (unsure if the WiFi and Ethernet share the same MAC, or which MAC address is selected). | |
| Serial Number | !000SN?; |
!000SN{serial}; |
!000SN?; |
!000SN1234567; |
|
| Firmware Version | !000FWV?; |
!000FWV{version:6}; |
!000FWV?; |
!000FWV010000; |
Format is assumed to be 2 digits per version section, eg, the example is v1.0.0
|
| Device and Motor info | !000v?; |
!{id:2}v{type:1}{version:2}; - one for each device |
!000v?; |
!BR1vB10; or !D55vD24;
|
There is one response one per associated device, including the hub. See Device Info below for more information. |
Responses in the format !{id:2}v{type:1}{version:2}; are providing information about the mentioned device (by id). This typically comes from a !000v?; query.
The id appears to be case insensitive, but it's recommended you always run it in upper case.
type is a single letter, currently known (best guess) types are:
| Letter | Type |
|---|---|
| A | AC motor |
| B | Hub/Gateway |
| C | Curtain motor |
| D | DC (battery?) motor |
| S | Socket |
| L | Lighting devices |
version is the version of the device (best guess)
| Query | Format | Response Format | Eg Query | Eg Response | Comments |
|---|---|---|---|---|---|
| Device Name | !{id:3}NAME?; |
!{id:3}NAME{name}; |
!S1SNAME?; |
!S1SNAMEWindow; |
Unsure how spaces and ; are handled |
| Query Current Position | !{id:3}r?; |
!{id:3}r{open-percent:3}b{tilt-percent:3},R{signal:2}; |
See below for more details | ||
| Open | !{id:3}o?; |
!{id:3}o,R{signal:2}; |
!D55o; |
!D55o,R80; |
See below for more details, when operation is complete, an updated status will also be sent |
| Close | !{id:3}c?; |
!{id:3}c,R{signal:2}; |
!D55c; |
!D55c,R80; |
See below for more details, when operation is complete, an updated status will also be sent |
| Move to Position | !{id:3}m{open-percent:3}?; |
!{id:3}m{open-percent:3},R{signal:2}; |
!D55m020; |
!D55m020,R80; |
See below for more details, when operation is complete, an updated status will also be sent |
| Status updates | N/A | `!{id:3}r{open-percent:3}b{tilt:3},R{signal:2}; | See below for more details | ||
| Voltage | !{id:3}pVc?; |
!{id:3}pVc{voltage:5},R{signal:2}; |
!D55pVc?; |
!D55pVc01142,R7F; See below for more details |
The ID of the device. Each device connected to a hub is assigned a (assumed to be static) 3 letter ID.
The percentage the blind is open (from the top, ie: 0% is fully open, 100% is folly closed).
This is assumed to be the tilt. It is untested and unconfirmed.
(Unconfirmed)
The signal strength in hex. This is a best guess based on looking at data. From looking at the app, it appears 90 (0x5A) separates green and yellow.
It's assumed the voltage is used to update the UI as to the battery level, however the formula is unclear.
The voltage is the voltage *100. ie: a value of 01142 is a voltage of 11.42v
Below is a table of some responses, and the corresponding UI value. Note the UI in the App can take a few moments to update, so they are not the exact same second.
| Response | App Level |
|---|---|
| !Q46pVc01125,R62; | 51% |
| !S1SpVc01134,R6A; | 54% |
| !0R5pVc01131,R63; | 54% |
| !YQXpVc01130,R7E; | 54% |
| !YQXpVc01129,R81; | 54% |
| !YQXpVc01130,R81; | 54% |
| !YQXpVc01130,R7F; | 54% |
| !YQXpVc01129,R7F; | 54% |
| !35WpVc01143,R52; | 57% |
| !PF8pVc01149,R72; | 59% (charging) |
| !PF8pVc01153,R71; | 62% (charging) |
| !PF8pVc01156,R71; | |
| !PF8pVc01162,R7C; | 62% (charging) |
| !PF8pVc01196,R7D; | 73% (charging) |
| !PF8pVc01232,R7C; | 81% (charging) |
| !PF8pVc01246,R7B; | 86% (charging) |
| !PF8pVc01266,R7B; | 92% (charging) |