-
-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discovergy: add total energy (#2172)
- Loading branch information
Showing
2 changed files
with
61 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package discovergy | ||
|
||
const API = "https://api.discovergy.com/public/v1" | ||
|
||
type Meter struct { | ||
MeterID string `json:"meterId"` | ||
SerialNumber string `json:"serialNumber"` | ||
FullSerialNumber string `json:"fullSerialNumber"` | ||
} | ||
|
||
type Reading struct { | ||
Time int64 | ||
Values struct { | ||
EnergyOut int64 | ||
Energy1, Energy2 int64 | ||
Voltage1, Voltage2, Voltage3 int64 | ||
EnergyOut1, EnergyOut2 int64 | ||
Power1, Power2, Power3 int64 | ||
Power int64 | ||
Energy int64 | ||
} | ||
} |