1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-22 23:17:47 +01:00
Commit Graph

218 Commits

Author SHA1 Message Date
Piotr Paczynski
afce48207a add support for LifaAir air purifier 2024-07-14 11:19:38 +02:00
Felipe Martins Diel
0a9acab2b8
Make type hints compatible with Python 3.6 (#797) 2024-04-17 03:20:13 -03:00
Felipe Martins Diel
eb56e7a46f
Merge branch 'master' into dev 2024-04-17 02:58:03 -03:00
Felipe Martins Diel
ff4628de1b
Merge new product ids into master (#795)
* Add support for Broadlink SP4M-JP (0x756B) (#782)

* Add support for Luceco/BG Electrical A60 bulb (0x606D) (#766)

* Add support for Luceco EFCF60WSMT (0xA6EF) (#787)

* Add support for Broadlink WS4 (#792)

* Add support for Broadlink SP4D-US (0xA6F4) (#793)
2024-04-17 02:55:38 -03:00
Felipe Martins Diel
c4979562c8
Fix type hints (#794) 2024-04-17 02:49:13 -03:00
Felipe Martins Diel
1e11558613
Add support for Tornado 16X SQ air conditioner (0x4E2A) (#520)
* Add support for Tornado 16X SQ air conditioner

* Make Tornado a generic HVAC class

* Better names

* Clean up IntEnums

* Clean up encoders

* Fix indexes

* Improve set_state() interface

* Enumerate presets

* Rename state to power in get_ac_info()

* Paint it black

* Use CRC16 helper class

* Remove log messages

* Fix bugs

* Return state in set_state()
2024-04-17 02:06:36 -03:00
Felipe Martins Diel
fa44b54d88
Add support for Broadlink A2 (#791)
* Add support for Broadlink A2

* Add supported type

* Fix bugs

* Improve device name
2024-04-12 02:10:06 -03:00
Felipe Martins Diel
24b9d308b6
Fix s3.get_subdevices() (#790)
* Fix s3.get_subdevices()

* Fix docstring
2024-04-10 23:55:41 -03:00
Felipe Martins Diel
247be74c33
Expose IR/RF conversion functions (#788)
* 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>
2024-04-10 22:51:41 -03:00
Felipe Martins Diel
84af992dcc
Add support for Wistar smart curtain (0x4F6C) (#786)
* Add support for Wistar smart curtain (0x4F6C)

* Rename wsrc to wser
2024-04-10 16:35:25 -03:00
Felipe Martins Diel
4766d68289
Add support for Dooya DT360E (v2) (#785) 2024-04-09 20:32:41 -03:00
Felipe Martins Diel
821820c61e
Add support for BG Electrical EHC31 (0x6480) (#784) 2024-04-09 19:56:30 -03:00
Felipe Martins Diel
cacebe7f3c
Rename MP1S state parameters (#783)
* Rename MP1S state parameters

* Rename get_status to get_state
2024-04-09 19:43:29 -03:00
Hozoy
c6bf96da47
Add mp1s get_status function (#762) 2024-04-09 19:23:35 -03:00
Felipe Martins Diel
66744707f5
Merge new product ids into master (#781)
* Add support for Broadlink SP4L-AU (0xA576) (#731)

* Add support for Broadlink RM mini 3 (0x27B7) (#751)

* Add support for Broadlink LB27 C1 (0x6488) (#752)

* Add support for Broadlink SP mini 3 (0x7549) (#753)
2024-04-09 16:26:43 -03:00
Felipe Martins Diel
06c91ae394
Remove auxiliary functions from hysen class (#780) 2024-04-09 16:14:04 -03:00
irsl
d7ed9855b9
Thermostat: get the 1st decimal place (#772) 2024-04-09 16:06:38 -03:00
Ian Munsie
634370d878
Add ability to RF scan a specific frequency (#613)
* 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>
2024-04-09 15:40:00 -03:00
fustom
abcc9aaeed
Add heating_cooling state to Hysen (#722) 2023-01-22 01:50:37 -03:00
Felipe Martins Diel
d4dafa386c
Merge 'master' into 'dev' (#734) 2023-01-14 02:01:06 -03:00
Felipe Martins Diel
9d5339ab8e
Merge new product ids into master (#726)
* Add support for RM4C mini (0x520D) (#694)

* Add support for SP4L-US (0x648C) (#707)

* Add support for RM4C mate (0x5211) (#709)

* Add support for RM4 mini (0x521C) (#710)

* Add support for LB1 (0x644B) (#717)
2022-11-20 15:44:34 -03:00
Felipe Martins Diel
d5cf63bf45
Merge new product ids into master (#686)
* Add support for Broadlink RM4 mini (0x5216) (#671)

* Add support for Broadlink RM4 pro 0x520B (#673)

* Add support for SP4L-UK 0xA569 (#677)

* Fixing typo in rm4pro device definitions (#682)

* Add support for Bestcon RM4C pro (0x5218) (#683)

* Add support for Broadlink RM4 TV mate (0x5212) (#684)

* Add support for Broadlink RM4 mini (0x520C) (#685)
2022-05-23 02:35:28 -03:00
Felipe Martins Diel
70180cfbc6 Merge branch 'master' into dev 2022-03-19 19:37:31 -03:00
Steven Dodd
2b70440786
Add support for S3 Hub and LC-1 (1,2&3 gang) light switches (#654)
* https://github.com/mjg59/python-broadlink/issues/647

* Added get_state(did) and update documentation

* Fixed pwr3 set_state

* Added get_subdevices()

* Cleaned up get_subdevices

* Updated S3 documentation

* Added device id 0xA59C:("S3", "Broadlink")

* Improve logic of get_subdevices()

Prevents infinite loop.

* Black

* Move s3 closer to s1c

* Update README.md

Co-authored-by: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com>
2022-03-19 19:31:14 -03:00
Felipe Martins Diel
3bdb6dfb92
Merge new product ids into master (#667)
* Add support for Broadlink LB26 R1 (0x644E) (#636)

* Add support for Broadlink LB26 R1 (0x644E)

* Add Broadlink LB26 R1 to README.md

* Add missing device codes for LB27 R1 Smart Bulbs (#644)

These are two missing codes.
This closes issue #639

* Add support for Broadlink RM4 pro (0x5213) (#649)

* Add support for Broadlink RM4 TV mate (0x5209) (#655)

* Move 0x644C and 0x644E to the LB1 class (#666)

Co-authored-by: Mathew Verdouw <mathew@vtc.com.au>
2022-03-19 15:28:54 -03:00
Felipe Martins Diel
f2a582b8f9
Add support for Broadlink MP1 with power meter (#631) 2021-10-18 15:59:47 -03:00
Felipe Martins Diel
9873af9bc4
Standardize ip_address option (#630) 2021-10-18 14:19:41 -03:00
Felipe Martins Diel
b596984b44
Add ip_address option to setup() (#628)
* Add ip_address option to setup()

* Update README.md
2021-10-18 13:42:32 -03:00
Felipe Martins Diel
26ee3192d9 Change the type and model of the hysen class (#627) 2021-10-17 13:25:00 -03:00
Felipe Martins Diel
62f81bc281
Add support for Broadlink SCB1E (0xA56B) (#623) 2021-10-17 05:36:42 -03:00
1UPNuke
ca1634575e Add support for Clas Ohlson SL-2 E14 (0x6065) (#600) 2021-09-12 16:55:08 -03:00
Felipe Martins Diel
a84a628d1c
Add support for Broadlink RM mini 3 (0x27DC) (#594) 2021-05-15 15:06:38 -03:00
Felipe Martins Diel
3f92850a5f
Add support for Broadlink SP4L-EU (0xA56C) (#593) 2021-05-11 17:25:22 -03:00
Felipe Martins Diel
bc44166702
Refactor SUPPORTED_TYPES (#592) 2021-05-06 14:52:11 -03:00
Felipe Martins Diel
1ae12e7d1c
Remove local_ip_address option from hello() (#591) 2021-05-03 17:34:22 -03:00
Felipe Martins Diel
c6390924bf
Add support for Broadlink SP4L-AU (0x757B) (#590) 2021-05-03 16:02:54 -03:00
Felipe Martins Diel
b43b296ff3
Add support for Broadlink RM mini 3 (0x6507) (#589) 2021-05-01 15:05:31 -03:00
Felipe Martins Diel
2d863bd6c1
Rename the lb27r1 class to lb2 (#586) 2021-04-29 20:31:30 -03:00
Felipe Martins Diel
6a54803a36
Improve code quality (#585)
* Improve docstrings

* Fix line-too-long

* Disable unidiomatic-typecheck

* Move smart plugs to the top

* Use constants from const.py

* Run black
2021-04-29 19:51:22 -03:00
Felipe Martins Diel
d48d1347a3
Move constants to const.py (#584) 2021-04-29 18:59:58 -03:00
Felipe Martins Diel
e1f3b83efd Add support for Broadlink SP4L-EU (0xA5D3) (#582) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
49322ddaae Add support for Broadlink SP4L-CN (0x7568) (#577) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
fc5c33ee97 Use the absolute position to read the lock status (#575) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
12fdf01631 Improve code quality (#572)
* Improve typing

* Use better names

* Clean up switch.py

* Remove unused import

* Run black

* Remove unnecessary comments

* Clean up climate.py
2021-04-26 17:57:02 -03:00
Felipe Martins Diel
b77e803864 Use CamelCase for the Device class (#570) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
36b293bf05 Raise exceptions explicitly (#569) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
056434ab46 Add support for Broadlink RM4C pro (0x6184) (#568) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
67b674859f Segregate CRC16.get_table() from CRC16.calculate() (#567) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
4e1e690762 Encapsulate crc16() to avoid global (#566) 2021-04-26 17:57:02 -03:00
Felipe Martins Diel
86b5d0727c Improve CRC-16 function (#565)
* Rename calculate_crc16 to crc16

* Apply PEP-8 naming conventions

* Remove unnecessary import

* Accept any sequence type

* Remove unnecessary conversions

* Expose polynomial and initial value as kwargs

* Remove unnecessary bitwise operations

* Store the CRC-16 table for performance

* Add missing type hints

* Update docstring

* General improvements
2021-04-26 17:57:02 -03:00