Skip to main content

pyelectroluxconnect

Python client package to communicate with the Electrolux Connectivity Platform (ECP) used by some home appliances, Electrolux owned brands, like: Electrolux, AEG, Frigidaire, Husqvarna. Tested with AEG washer-dryer, but probably could be used with some internet connected ovens, diswashers, fridges, airconditioners.
It is general client, and all parameters (called HACL), that can be read or set, names and translations are dynamically generated, based on appliance profile file, downloaded from ECP servers.

Compatibility

This package is compatibile with home appliances registered with one of this ECP based mobile apps:

Unsupported devices

This package is not compatibile with appliances controlled with this mobile apps:

Features

  • list appliances paired with Electrolux account
  • get appliance profile with translations
  • get appliance state
  • send command to appliance
  • register/unregister Client with Electrolux MQTT cloud based broker

Usage

Initiate session

To use this library, there's an account with Electrolux/AEG/Frigidaire app must be created. By default, library is using EMEA region apps credentials. If account is created in other region app, region parameter must be set. If created account is not supported, You can manually set regionServer, customApiKey and customApiBrand parameters (from sniffed traffic or extracted from mobile app).

import pyelectroluxconnect
ses = pyelectroluxconnect.Session(username, password, region="emea", tokenFileName = ".electrolux-token", country = "US", language = None, deviceId = "CustomDeviceId", verifySsl = True, regionServer=None, customApiKey=None, customApiBrand=None)

or minimal input set:

import pyelectroluxconnect
ses = pyelectroluxconnect.Session(username, password)

where:
username, password - ECP (Electrolux site) credentials
tokenFileName - file to store auth token (default: ~/.electrolux-token)
region - account region (defalt emea. Tested with emea, apac, na, latam, frigidaire)
country - 2-char country code (default US)
language - 3-char language code for translations (All - for all delivered languages, default: None)
deviceId - custom id of client used in ECP, should be unique for every client instance (default: CustomDeviceId)
verifySsl - verify ECP servers certs (default: True)
regionServer - region server URL (default is based on selected region)
customApiKey - custom value of "x-ibm-client-id" and "x-api-key" HTTP headers (default is based on selected region)
customApiBrand - custom "brand" value (default is based on selected region)

Login to ECP

ses.login()

Get list of appliances registered to Electrolux account

appllist = ses.getAppliances()
print(appllist)

Get appliances connection state

for appliance in appllist:  
	print(ses.getApplianceConnectionState(appliance))

Get appliance profile

List of parameters (HACL's) with allowed values, translations, etc... Note, that not all parameters can be read, or set over ECP.
Each parameter is in "module:hacl" form. Module is internal appliance module symbol, hacl is parameter hex symbol, that can be read from or set to module.

print(ses.getApplianceProfile(appliance))

Get appliance latest state from ECP

Get latest appliance state from ECP. When appliance is online, current state updates are available over Internet with MQTT protocol. To get credentials to connect any MQTT client to ECP MQTT broker, use registerMQTT() method.

to get latest state from a platform:

print(ses.getApplianceState(appliance, paramName = None, rawOutput = False))

paramName - comma separated list of patrameter names (None (default) for all params)
rawOutput - get list of parameters in received form. False (default): parse output to more friendly form (with translations, etc)

Send param value to appliance

Send value to appliance (list of supported appliance destinations (destination) and parameters (hacl) with allowed values (value), You can get with getApplianceProfile() method):

ses.setHacl(appliance, hacl, value, destination)

hacl - hex number of param (HACL)
value - value to set (it could be number or list of parameters (for container HACL type))
destination - destination module name, from profile path (NIU, WD1, etc...)

washer-dryer examples:

  • set Wash+Dry "Cottons" program, with "Extra Dry" dryness Level:
ses.setHacl(appliance, "0x1C09", [{"50":"0x0000"},{"12":"128"},{"6.32":1},{"6.33":1}], "WD1")
  • pause program:
ses.setHacl(appliance, "0x0403", 4, "WD1")

Register client to MQTT broker

print(ses.registerMQTT())

returns parameters required to login to Electrolux MQTT broker with any MQTT client:
Url - Host of MQTT broker (with port number)
OrgId - Organization ID
ClientID - MQTT Client ID
DeviceToken - Token required to authentication (for IBM broker, use string use-token-auth as username, DeviceToken as password)

List of MQTT topics (QoS = 0) to subscribe:

  • iot-2/cmd/live_stream/fmt/+
  • iot-2/cmd/feature_stream/fmt/+

Unregister client from MQTT broker

ses.unregisterMQTT()

Parse received MQTT message

print(ses.getMqttState(mqttJsonPayload))

Parse message from MQTT broker, and return in getApplianceState(...) like form. mqttJsonPayload - MQTT message payload in JSON form.

Very simple MQTT example to receive online appliance state changes from ECP MQTT broker

Please Note: Electrolux moved MQTT broker from IBM servers. After that, this code is not valid.

import paho.mqtt.client as mqtt
import pyelectroluxconnect

def on_connect(client, userdata, flags, rc):
    print("Connected with result code "+str(rc))
    client.subscribe("iot-2/cmd/live_stream/fmt/json", 0)

def on_message(client, userdata, msg):
    print(ses.getMqttState(msg.payload))

ses = pyelectroluxconnect.Session(login, passwd, language = "pol", region="emea",  deviceId='MQTTHA2')
ses.login()

mqtt_params = ses.registerMQTT()

client = mqtt.Client(client_id = mqtt_params["ClientID"])
client.tls_set(ca_certs = ses.getSSLCert())
client.username_pw_set("use-token-auth", mqtt_params["DeviceToken"])
    
client.on_connect = on_connect
client.on_message = on_message
    
client.connect(mqtt_params["Url"].split(":")[0], int(mqtt_params["Url"].split(":")[1]), 60)
    
while True:
    client.loop()

Disclaimer

This library was not made by AB Electrolux. It is not official, not developed, and not supported by AB Electrolux.

Metadata

Release files for pyelectroluxconnect 0.3.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyelectroluxconnect 0.3.20
File Size Uploaded Provenance
pyelectroluxconnect-0.3.20.tar.gz 27.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyelectroluxconnect 0.3.20
File Interpreter ABI Platform
pyelectroluxconnect-0.3.20-py3-none-any.whl Python 3 none any Details

Total release size: 51.1 kB

Release files / pyelectroluxconnect-0.3.20.tar.gz

Download URL pyelectroluxconnect-0.3.20.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1886d843e117c2b12701f11a9f2ba0b4bfc71de1a85f8985a50ebd16903086d1
BLAKE2b-256 checksum
How to use checksums
336e1941f3cfa9845e6bf8c6c7009b0940f5af2aab81ec5619a3bd3bb2142b2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / pyelectroluxconnect-0.3.20-py3-none-any.whl

Download URL pyelectroluxconnect-0.3.20-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ee673ace877b3a16a10168117e4a01100737f2d418b9a692d3fe67d4e7392f6
BLAKE2b-256 checksum
How to use checksums
e1ee5f0aa5b0bc34d0768cdb12b6e8f1f2e66c8f5c282c884dcb92a54294b39b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for pyelectroluxconnect 0.3.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.20 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page