-
Notifications
You must be signed in to change notification settings - Fork 3
Hub v2 v3 Data Format
The hub sends data via POST requests to the /h2 or /h3 endpoint. The body of this request contains a pipe-delimited string with the sensor data.
| Key | Value | Purpose |
|---|---|---|
| X-Hash | 082eeedc72f70e96 | Unknown hash algorithm, 64 bit. |
| X-TS | 69244940:46 | Uptime seconds as 32-bit hex timestamp (epoch seconds) : offline duration seconds (optional). |
| X-Uptime | 778677 | Seconds since boot. |
| X-Version | 2.3.7 | Firmware version. |
| X-Mode | E1 | |
| X-Pair | P | |
| Content-Type | application/eh-data | Known values, application/eh-data, application/eh-datalog, application/eh-ping. |
Content types:
- eh-data - Single sensor reading.
- eh-datalog - Assumed bulk updates to make up for when the hub was unable to communicate to the host. Unknown encoding.
- eh-ping - Ping check for each sensor that is available.
Energy packet: 741459|1|EFCT|P1,2479.98
Here is a breakdown of the data structure:
| Index | Value | Purpose |
|---|---|---|
| [0] | 741459 |
Sensor ID (sid): This is the unique ID for your transmitter. This is the primary value used by the logger. |
| [1] | 1 |
Transmitter Port: The Efergy transmitter has 3-5 ports. This 1 likely indicates the data is from Port 1. |
| [2] | EFCT | Sensor type: A "Channel ID" that likely stands for EF (Efergy) + CT (Current Transformer). |
| [3] | P1,2479.98 |
Port, Value: Contains the port identifier (P1) and the actual power reading in milliamps (2479.98). |
The Python server parses the energy string to extract the Sensor ID (741459) and the Value (2479.98).
It then logs this value to the database under a label like efergy_h2_741459.
Energy packet (application/eh-data): 815751|1|EFCT|P1,391.86|-66
| Index | Value | Purpose |
|---|---|---|
| [0] | 815751 |
Sensor ID (sid): This is the unique ID for your transmitter. This is the primary value used by the logger. |
| [1] | 1 |
Transmitter Port: The Efergy transmitter has 3-5 ports. This 1 likely indicates the data is from Port 1. |
| [2] | EFCT | Sensor ID: A "Channel ID" that likely stands for EF (Efergy) + CT (Current Transformer). |
| [3] | P1,391.86 |
Port, Value: Contains the port identifier (P1) and the actual power reading in deciWatts (391.86). |
| [4] | -66 | Signal strength: An indication of the signal strength between the sensor and hub. |
Ping packet (application/eh-ping): 815686|815751|747952
Pipe seperated sensor IDs.
Unknown packet: 747952|0|EFMS1|M,96.00&T,0.00&L,0.00|-67
Bulk packet (application/eh-datalog, sent to /h3bulk) is binary.
| Offset | Size | Format | Purpose |
|---|---|---|---|
| 0x00 | 4 | little-endian uint32
|
Base timestamp (epoch seconds) |
| 0x04 | 15 | 5 x 24-bit little-endian integers | Up to 5 sensor IDs |
| 0x13 | 1 | byte | Reserved / observed constant 0x20
|
| 0x14+ | 8 each | frame | Repeated reading frames |
| end | 2+ | 0xFFFF... |
Padding / end marker |
The header stores up to five sensor IDs. Each sensor ID is a 24-bit little-endian integer.
Example header bytes:
21 B3 AE 69 D0 51 0C AB 60 0C 4A 63 0C 73 5F 0C 00 62 0C 20
This decodes as:
- Base timestamp: 0x69AEB321 = 1773056801
- Sensor IDs:
- 807376
- 811179
- 811850
- 810867
- 811520
| Offset in frame | Size | Format | Purpose |
|---|---|---|---|
| +0 | 2 | big-endian uint16
|
Offset seconds from base timestamp |
| +2 | 2 | bytes | Checksum like field |
| +4 | 4 | middle-endian float | Reading value in watts |
Reverse Engineering
Hosting guides