blob: 7e229e3eb557052af7e1f33a4354d9bf462dc4ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
Command line interface for python-broadlink
===========================================
This is a command line interface for broadlink python library
Tested with BroadLink RMPRO / RM2
Requirements
------------
You should have the broadlink python installed, this can be made in many linux distributions using :
```
sudo pip install broadlink
```
Installation
-----------
Just copy this files
Programs
--------
* broadlink_discovery
used to run the discovery in the network
this program withh show the command line parameters to be used with
broadlink_cli to select broadlink device
* broadlink_cli
used to send commands and query the broadlink device
device specification formats
----------------------------
Using separate parameters for each information:
```
broadlink_cli --type 0x2712 --host 1.1.1.1 --mac aaaaaaaaaa --temp
```
Using all parameters as a single argument:
```
broadlink_cli --device "0x2712 1.1.1.1 aaaaaaaaaa" --temp
```
Using file with parameters:
```
broadlink_cli --device @BEDROOM.device --temp
```
This is prefered as the configuration is stored in file and you can change
just a file to point to a different hardware
Sample usage
------------
Learn commands :
```
# Learn and save to file
broadlink_cli --device @BEDROOM.device --learnfile LG-TV.power
# LEard and show at console
broadlink_cli --device @BEDROOM.device --learn
```
Send command :
```
broadlink_cli --device @BEDROOM.device --send @LG-TV.power
broadlink_cli --device @BEDROOM.device --send ....datafromlearncommand...
```
Get Temperature :
```
broadlink_cli --device @BEDROOM.device --temperature
```
Get Energy Consumption (For a SmartPlug) :
```
broadlink_cli --device @BEDROOM.device --energy
```
Once joined to the Broadlink provisioning Wi-Fi, configure it with your Wi-Fi details:
```
broadlink_cli --joinwifi MySSID MyWifiPassword
```
|