eques-elf-0.0.2
توضیحات
Eques Elf support for Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | eques-elf-0.0.2 |
| نام | eques-elf |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Joey Pereira |
| ایمیل نویسنده | joey@pereira.io |
| آدرس صفحه اصلی | https://github.com/lgo/eques_elf |
| آدرس اینترنتی | https://pypi.org/project/eques-elf/ |
| مجوز | - |
# 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
```sh
python src/main.py discover
```
```json
[
{
"ip": "10.0.0.123",
"mac": "dc-4f-22-25-ab-cd",
"password": "foobar",
"state": true
}
]
```
### Get status
```sh
python src/main.py send --cmd status --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
```
```json
[
{
"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._
```sh
python src/main.py send --cmd toggle --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
```
```json
[
{
"ip": "10.0.0.123",
"mac": "dc-4f-22-25-ab-cd",
"password": "foobar",
"state": false
}
]
```
### Set device on
```sh
python src/main.py send --cmd set_on --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
```
```json
[
{
"ip": "10.0.0.123",
"mac": "dc-4f-22-25-ab-cd",
"password": "foobar",
"state": false
}
]
```
### Set device off
```sh
python src/main.py send --cmd set_off --mac dc-4f-22-25-ab-cd --ip 10.0.0.123 --password foobar
```
```json
[
{
"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.
نحوه نصب
نصب پکیج whl eques-elf-0.0.2:
pip install eques-elf-0.0.2.whl
نصب پکیج tar.gz eques-elf-0.0.2:
pip install eques-elf-0.0.2.tar.gz