Skip to content

Commit

Permalink
fix: device stop working because lacking of device_key (#724)
Browse files Browse the repository at this point in the history
* chore: fix device stop working because lacking of device_key

* Update scripts.md, control_device.py, and get_device_login_key.py

* Update control_device.py

* Update control_device.py

* Update scripts.md

* Update get_device_login_key.py
  • Loading branch information
YogevBokobza authored Jan 9, 2024
1 parent 6cd9e5f commit f4062c3
Show file tree
Hide file tree
Showing 10 changed files with 252 additions and 54 deletions.
48 changes: 36 additions & 12 deletions docs/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ python control_device.py control_thermostat -d 3a20b7 -i "192.168.50.77" -r ELEC
### script/control_device.py control_thermostat

```shell
usage: control_device.py control_thermostat [-h] [-v] -d DEVICE_ID -i
usage: control_device.py control_thermostat [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i
IP_ADDRESS -r REMOTE_ID
[-s {on,off}]
[-m {auto,dry,fan,cool,heat}]
Expand All @@ -140,6 +140,8 @@ options:
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-r REMOTE_ID, --remote-id REMOTE_ID
Expand All @@ -160,7 +162,7 @@ options:
### script/control_device.py create_schedule

```shell
usage: control_device.py create_schedule [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py create_schedule [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
-n START_TIME -f END_TIME
[-w [{Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday} ...]]
Expand All @@ -169,6 +171,8 @@ options:
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-n START_TIME, --start-time START_TIME
Expand All @@ -182,14 +186,16 @@ options:
### script/control_device.py delete_schedule
```shell
usage: control_device.py delete_schedule [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py delete_schedule [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
-s SCHEDULE_ID
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-s SCHEDULE_ID, --schedule-id SCHEDULE_ID
Expand All @@ -199,57 +205,65 @@ options:
### script/control_device.py get_schedules
```shell
usage: control_device.py get_schedules [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py get_schedules [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
```
### script/control_device.py get_state
```shell
usage: control_device.py get_state [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py get_state [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
```
### script/control_device.py get_thermostat_state
```shell
usage: control_device.py get_thermostat_state [-h] [-v] -d DEVICE_ID -i
usage: control_device.py get_thermostat_state [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i
IP_ADDRESS
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
```
### script/control_device.py set_auto_shutdown
```shell
usage: control_device.py set_auto_shutdown [-h] [-v] -d DEVICE_ID -i
usage: control_device.py set_auto_shutdown [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i
IP_ADDRESS -r HOURS [-m [MINUTES]]
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-r HOURS, --hours HOURS
Expand All @@ -261,13 +275,15 @@ options:
### script/control_device.py set_name
```shell
usage: control_device.py set_name [-h] [-v] -d DEVICE_ID -i IP_ADDRESS -n NAME
usage: control_device.py set_name [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS -n NAME
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-n NAME, --name NAME new name for the device
Expand All @@ -276,14 +292,16 @@ options:
### script/control_device.py set_shutter_position
```shell
usage: control_device.py set_shutter_position [-h] [-v] -d DEVICE_ID -i
usage: control_device.py set_shutter_position [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i
IP_ADDRESS -p POSITION
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-p POSITION, --position POSITION
Expand All @@ -293,42 +311,48 @@ options:
### script/control_device.py stop_shutter
```shell
usage: control_device.py stop_shutter [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py stop_shutter [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
```
### script/control_device.py turn_off
```shell
usage: control_device.py turn_off [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py turn_off [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
```
### script/control_device.py turn_on
```shell
usage: control_device.py turn_on [-h] [-v] -d DEVICE_ID -i IP_ADDRESS
usage: control_device.py turn_on [-h] [-v] -d DEVICE_ID -l DEVICE_KEY -i IP_ADDRESS
[-t [TIMER]]
options:
-h, --help show this help message and exit
-v, --verbose include the raw message
-d DEVICE_ID, --device-id DEVICE_ID
the identification of the device
-l DEVICE_KEY, --device-key DEVICE_KEY
the login key of the device
-i IP_ADDRESS, --ip-address IP_ADDRESS
the ip address assigned to the device
-t [TIMER], --timer [TIMER]
Expand Down
Loading

0 comments on commit f4062c3

Please sign in to comment.