Public Access
Refine GoldenMate UPS protocol documentation
Updated protocol description and field mappings for GoldenMate UPS.
This commit is contained in:
1 parent
d9a8260a73
commit
d5d81ab445
1 file changed
+16
-20
@@ -6,29 +6,25 @@ namespace esphome {
|
|||||||
namespace ups_hid {
|
namespace ups_hid {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GoldenMate / BMS Smart-Battery HID Protocol
|
* GoldenMate LiFePO4 UPS Protocol
|
||||||
*
|
*
|
||||||
* Vendor: 0x06DA (-BMS-), Product: 0xFFFF (Smart-Battery)
|
* Vendor: 0x075D, Product: UPS Pro
|
||||||
* Used by GoldenMate 1000VA Pro and similar BMS-based UPS units.
|
* Used by GoldenMate UPS with USB port.
|
||||||
*
|
*
|
||||||
* Data sources:
|
* Data sources:
|
||||||
* Report 0x01 (Feature, 21 bytes) - binary status:
|
* Report 0x01 (Feature, 21 bytes) - binary status:
|
||||||
* byte 11: battery % (0-100)
|
* byte 11: battery % (0-100)
|
||||||
* bytes 12-13 LE16: runtime to empty (seconds)
|
* bytes 12-13 LE16: runtime to empty (seconds)
|
||||||
* byte 16: nominal input voltage (static)
|
|
||||||
* byte 20: temperature (°C, BMS internal)
|
|
||||||
*
|
*
|
||||||
* Report 0x0C (Feature, 65 bytes) - contains packed Megatec ASCII at bytes 30-61:
|
* Report 0x0C (Feature, 64+ bytes) - contains packed BMS ASCII at bytes 30-61:
|
||||||
* "LLLL FFFF OOOO BBB FFF VVV TTT SSSSSSSS"
|
* Field 1 (4 chars): Current × 100 (e.g., "1491" = 14.91 A) -> mapped to load_percent
|
||||||
* Field 1 (4 chars): Load % × 10 (e.g., "0107" = 10.7%)
|
* Field 2 (4 chars): Voltage × 100 (e.g., "1400" = 14.00 V) -> mapped to battery.voltage
|
||||||
* Field 2 (4 chars): Low voltage transfer (e.g., "1400" = 140.0V)
|
* Field 3 (4 chars): Power × 10 (e.g., "2084" = 208.4 W) -> mapped to input_voltage
|
||||||
* Field 3 (4 chars): High voltage transfer (e.g., "2084" = 208.4V)
|
* Field 4 (3 chars): SOC % (e.g., "100" = 100 %) -> mapped to battery.level
|
||||||
* Field 4 (3 chars): Battery % (e.g., "099" = 99%)
|
* Field 5 (3 chars): Capacity Ah × 10 (e.g., "599" = 59.9 Ah) -> mapped to frequency
|
||||||
* Field 5 (3 chars): Frequency × 10 (e.g., "599" = 59.9 Hz)
|
* Field 6 (3 chars): Cycles (e.g., "205" = 205) -> mapped to output_voltage
|
||||||
* Field 6 (3 chars): Battery voltage × 100 (e.g., "205" = 2.05V)
|
* Field 7 (3 chars): Temp × 10 (e.g., "350" = 35.0 °C) -> mapped to input_transfer_low
|
||||||
* Field 7 (3 chars): Temperature × 10 (e.g., "350" = 35.0°C)
|
* Field 8 (8 chars): Status bits
|
||||||
* Field 8 (8 chars): Status bits ("01000000" = on battery)
|
|
||||||
* bit 6: on battery (1 = AC lost)
|
|
||||||
*/
|
*/
|
||||||
class GoldenMateProtocol : public UpsProtocolBase {
|
class GoldenMateProtocol : public UpsProtocolBase {
|
||||||
public:
|
public:
|
||||||
@@ -38,7 +34,7 @@ class GoldenMateProtocol : public UpsProtocolBase {
|
|||||||
bool initialize() override;
|
bool initialize() override;
|
||||||
bool read_data(UpsData &data) override;
|
bool read_data(UpsData &data) override;
|
||||||
DeviceInfo::DetectedProtocol get_protocol_type() const override { return DeviceInfo::PROTOCOL_GENERIC_HID; }
|
DeviceInfo::DetectedProtocol get_protocol_type() const override { return DeviceInfo::PROTOCOL_GENERIC_HID; }
|
||||||
std::string get_protocol_name() const override { return "GoldenMate BMS"; }
|
std::string get_protocol_name() const override { return "GoldenMate"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint8_t REPORT_ID_STATUS = 0x01;
|
static const uint8_t REPORT_ID_STATUS = 0x01;
|
||||||
|
|||||||
Reference in new issue
Block a user