@mega-yfue/eufy-sdk / SolixDevice
Class: SolixDevice
A discovered Solix device with resolved category + capabilities. Feed live telemetry with applyReading (from SolixMqtt's reading events) to populate value accessors.
Constructors
Constructor
new SolixDevice(record, opts?): SolixDevice;Parameters
record
opts?
SolixDeviceOptions = {}
Returns
SolixDevice
Properties
productCode
readonly productCode: string;record
readonly record: SolixDeviceRecord;serial
readonly serial: string;Accessors
capabilities
Get Signature
get capabilities(): SolixCapability[];All capabilities this device carries.
Returns
family
Get Signature
get family(): SolixProductFamily;The device's SolixProductFamily — the classification a caller branches on to SORT devices (a site's power stations vs its meters), the Solix analogue of eufy's isHomeBase(). Distinct from has, which answers what the device can DO; family answers what KIND of device it is.
Returns
Methods
applyReading()
applyReading(reading): void;Merge a live telemetry reading (a SolixMqtt reading event) so accessors reflect it. Takes the WHOLE reading, not just its values, and drops one addressed to a different device: the documented wiring is mqtt.on("reading", r => device.applyReading(r)), and one MQTT stream carries every watched meter on the account — so without this filter two meters would cross-feed each other's floats. A reading with no deviceSn (a hand-built one) is accepted as-is.
Parameters
reading
deviceSn?
string
values
Record<string, number>
Returns
void
connectivity()
connectivity(): SolixConnectivity | undefined;Returns
SolixConnectivity | undefined
energyMeter()
energyMeter():
| SolixEnergyMeterReads
| undefined;The members-derived energyMeter reads, or undefined when the device has no meter. Each getter is installed only for a tag this device has actually reported, and reads this.values LIVE — a handle held across an applyReading reflects the newer values. Getter INSTALLATION is fixed at the time of this call, so re-call it to pick up a tag first seen since.
Returns
| SolixEnergyMeterReads | undefined
firmware()
firmware():
| {
version: string;
}
| undefined;Returns
| { version: string; } | undefined
has()
has(capability): boolean;Whether the device carries a capability — the only correct way to branch on behaviour.
Parameters
capability
Returns
boolean
identity()
identity(): SolixIdentity;Returns
telemetry()
telemetry(): Record<string, number>;All decoded float telemetry channels from the latest applied reading (raw, channel_<tag> keys).
Returns
Record<string, number>