* Move IR duration<->Broadlink conversion down from CLI
* Fix --learn base64 to not crash with --durations
Also remove its b'...' wrapping.
* Fix IR/RF conversions
---------
Co-authored-by: William Grant <me@williamgrant.id.au>
* Add ability to RF scan a specific frequency
This adds an optional parameter to find_rf_packet(), along with a
corresponding --rflearn parameter (defaulting to 433.92) to
broadlink_cli that specifies the frequency to tune to, rather than
requiring the frequency be found via sweeping. This is almost mandatory
for certain types of remotes that do not repeat their signals while the
button is held, and saves significant time when the frequency is known
in advance or when many buttons are to be captured in a row.
Additionally:
- A get_frequency() API is added to return the current frequency the
device is tuned to.
- A check_frequency_ex() API is added to perform functions of both
check_frequency() and get_frequency() in a single call.
- broadlink_cli --rfscanlearn will now report the current frequency at 1
second intervals during sweeping, and will report the frequency it
finally locks on to.
* Clean up remote.py
* Clean up broadlink_cli
* Update conditional
* Fix message
---------
Co-authored-by: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com>
- Only start to count the timer inside the lock.
- Improve precision of the timeout option.
- Use a context manager for the connection.
- Remove SO_REUSEADDR option.
Amend: Revert retry_intvl (#506)
* Fix lint errors
* Remove rm2 class
* Rename cs to conn
* Add __repr__ to device class
* Make get_devices() a dictionary
* Clean up alarm kit
* Add module doscstrings
* Fix MAC address conversion