Skip to main content

Interface for Electrolux Connectivity Platform API

Project description

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.

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

import pyelectroluxconnect
ses = pyelectroluxconnect.Session(username, password, tokenFileName = ".electrolux-token", country = "US", language = None, deviceId = "CustomeDeviceId", raw = False, verifySsl = True)

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)
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)
raw - display HTTP requests/responses (default: False)
verifySsl - verify ECP servers certs (default: True)

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.

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:

  • LAN with AllJoyn protocol
  • 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

ses.setHacl(appliance, hacl, value)

hacl - hex number of param (HACL)
value - value to set (it could be number or list of parameters (for container HACL type))

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}])
  • pause program:
ses.setHacl(appliance, "0x0403", 4)

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 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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyelectroluxconnect-0.1.2.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyelectroluxconnect-0.1.2-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file pyelectroluxconnect-0.1.2.tar.gz.

File metadata

  • Download URL: pyelectroluxconnect-0.1.2.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for pyelectroluxconnect-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5581ca09fe3c00d45b2dcc23ee0a958749cf33030cb4fe0dfe6010a2b3d110e5
MD5 1b7ce3ab77e7ad4cc154be356bbf7154
BLAKE2b-256 c08d98c29434e22d3034377b936bed2b2e90e7841e38d0f3d0c316ba6519f0b0

See more details on using hashes here.

File details

Details for the file pyelectroluxconnect-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyelectroluxconnect-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for pyelectroluxconnect-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f96d212409189556e418f6204e1efd467c5f778d253a8194020047bc9025a557
MD5 dba7f74317c88d2959a3effd3f93d657
BLAKE2b-256 a74d656fd4f3c82df6e3494d4885b74ae93d330014f7cd501ba9db84491ba9c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page