1
0
Fork 0

Improve README.md (#629)

This commit is contained in:
Felipe Martins Diel 2021-10-18 14:05:39 -03:00 committed by GitHub
parent b596984b44
commit 11febb043b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -67,17 +67,19 @@ devices = broadlink.discover()
#### Advanced options
You may need to specify `local_ip_address` or `discover_ip_address` if discovery does not return any devices.
Using the IP address of your local machine:
```python3
devices = broadlink.discover(local_ip_address='192.168.0.100') # IP address of your local machine.
devices = broadlink.discover(local_ip_address='192.168.0.100')
```
Using the broadcast address of your subnet:
```python3
devices = broadlink.discover(discover_ip_address='192.168.0.255') # Broadcast address of your subnet.
devices = broadlink.discover(discover_ip_address='192.168.0.255')
```
If the device is locked, it may not be discoverable with broadcast. In such cases, you can use the unicast version `broadlink.hello()` for direct discovery:
```python3
device = broadlink.hello('192.168.0.16') # IP address of your Broadlink device.
device = broadlink.hello('192.168.0.16')
```
If you are a perfomance freak, use `broadlink.xdiscover()` to create devices instantly:
@ -112,7 +114,7 @@ packet = device.check_data()
### Learning RF codes
Learning IR codes takes place in five steps.
Learning RF codes takes place in five steps.
1. Sweep the frequency:
```python3