Skip to main content

Eques Elf support for Python

Project description

Eques Elf python

Kudos to iamckn who has in-depth posts describing their work reverse engineering the Eques Elf smart plug devices and has gocode alongside it, at https://github.com/iamckn/eques

This module is adapted from it to provide a Python module to be used in HomeAssistant.

Command line usage

See helpdoc for specific details.

List devices

python src/main.py discover
[
  {
    "ip": "10.0.0.123",
    "mac": "dc-4f-22-25-ab-cd",
    "password": "foobar",
    "state": true
  }
]

Get status

python src/main.py send --cmd status --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
[
  {
    "ip": "10.0.0.123",
    "mac": "dc-4f-22-25-ab-cd",
    "password": "foobar",
    "state": true
  }
]

Toggle device

Toggle first fetches state (cmd: status) then sends a set command.

python src/main.py send --cmd toggle --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
[
  {
    "ip": "10.0.0.123",
    "mac": "dc-4f-22-25-ab-cd",
    "password": "foobar",
    "state": false
  }
]

Set device on

python src/main.py send --cmd set_on --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
[
  {
    "ip": "10.0.0.123",
    "mac": "dc-4f-22-25-ab-cd",
    "password": "foobar",
    "state": false
  }
]

Set device off

python src/main.py send --cmd set_off --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
[
  {
    "ip": "10.0.0.123",
    "mac": "dc-4f-22-25-ab-cd",
    "password": "foobar",
    "state": false
  }
]

API

See eques_local.py and use:

  • discover_command
  • status_command
  • off_command
  • on_command

device.Device is used for carrying the device data.

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

eques_elf-0.0.2.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

eques_elf-0.0.2-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

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