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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for eques_elf-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b73061e13af0aebe08ccd0be3084c9eafd3f3a6824d43b24bc00303ffa2df97 |
|
MD5 | f459f386f5a17e7d8a7cecd791d727bf |
|
BLAKE2b-256 | e60167287859da770767f5be7b1c88a46dae46f17eded5785799dbdbadc6e844 |