1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-14 03:20:14 +01:00
Commit Graph

75 Commits

Author SHA1 Message Date
hakana
4a3950a7c5
Add temperature and humidity for RM4 mini (0x610e) (#321)
* Add temperature and humidity reading for RM4 Mini

* Change divider for tem and humi (RM4 mini)
2020-03-23 21:23:05 +01:00
hakana
84e53c8d2b
Add support for RM4 mini with device type 0x610e (#320) 2020-03-16 19:56:06 +01:00
Felipe Martins Diel
1a1169f1a9
Add support for 0x5f36 devices and RM4 series (#317)
* Add support for 0x5f36 devices

This type of device requires a header in the payload. The rest is the same.

* Improve request header assignment

* Change code sending header

I just found out that this device uses a different header for sending codes. This update addresses this issue.

* Improve authentication

Use the error code to check if the authentication was successful.

* Use default value when devtype is None

* Use generic remote type if devtype is None

* Extend support to RM4 series

I just realized that RM4 devices use the same header. I will take the opportunity to extend support to these devices as well.

* Add device type 0x62be and create rm4 class 

The rm4 class will improve code scalability. Just add the RM4 type to this class and it will just work.

* Remove comma
2020-03-16 09:49:41 +01:00
Daniel Høyer Iversen
654db0935b
Fix new RM mini3 (#305)
* Fix new RM mini3

Some little change

* Fix new RM mini3

Some little change

Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
2020-03-04 22:26:23 +01:00
Daniel Høyer Iversen
e84becd05b
Add support for specifying destination IP address to use in discovery (#313)
Co-authored-by: Kja64 <Ken@lkv20.dk>
2020-03-04 22:25:00 +01:00
Daniel Høyer Iversen
ec4df39665
Add 27de RM Mini 3 (C) (#314)
I have a 0x27de RM Mini 3, as inspired by https://github.com/lprhodes/broadlinkjs-rm/blob/master/index.js, I added the identification and python-broadlink would handle it properly.
2020-03-04 22:24:33 +01:00
Daniel Høyer Iversen
8e7446f410
Fix CBC mode padding and use adler32 for checksums (#315)
* Fix CBC mode padding and use adler32 for checksums

* Change line order

This change comes to improve the readability of the code.

* Use zero-padding for CBC mode
2020-03-04 22:24:09 +01:00
Barnaby Gray
a05efe1c00 Add detail on return value for get_state() 2019-10-16 09:58:02 +01:00
Barnaby Gray
660c2269e4 Add support for BG Electrical Smart Sockets 2019-10-13 22:12:13 +01:00
Daniel Høyer Iversen
2e5361bd8e
Remove support for pyaes (#281)
* remove support for pyaes

* remove support for pyaes

* remove support for pyaes
2019-10-02 09:25:27 +03:00
Leonardo Brondani Schenkel
11c5981793 Use old IP address lookup logic as fallback (#275)
On some machines, resolving the local hostname results in a loopback IP
address (127.0.0.0/8). This breaks discovery. In these situations, fall
back to the old IP address lookup logic that was removed on commit 790edb9.
2019-08-16 12:13:53 +03:00
Johnson Chin
9d9b49c3db SP2: Add support for OEM SP2 (#251) 2019-06-24 20:06:50 +02:00
Daniel Høyer Iversen
9ec2da834b
handle none power raw (#250) 2019-06-10 09:12:50 +02:00
Daniel Høyer Iversen
38a40c5a19
Use cryptography instead of pycryptodome (#246)
* Use cryptography instad of pycryptodome

* Use cryptography instad of pycryptodome
2019-05-27 20:57:32 +02:00
AnilDaoud
b8fdf337c9 cleaner local ip address lookup (#244) 2019-05-22 07:27:34 +02:00
Daniel Høyer Iversen
a75f98720e
code clean up (#243) 2019-05-19 17:54:14 +02:00
Matthew Garrett
3ad4a9f0f8
Merge branch 'master' into rf_experiment_v0.9 2019-05-18 00:10:40 -07:00
ninstein
0db3179623 Update __init__.py
add new device: TMall OEM SPMini3
2019-05-18 00:08:52 -07:00
gpenverne
77f11c8d49 Allow string mac address in constructor 2019-05-18 00:06:47 -07:00
BAN
9996c252f7
Update __init__.py 2019-01-08 16:47:31 +09:00
Sergey Prilukin
2b4e6d91ff
Merge branch 'rf_experiment' into rf_experiment_v0.9
# Conflicts:
#	README.md
#	broadlink/__init__.py
#	cli/broadlink_cli
2018-11-26 00:21:37 +02:00
Nick Dimov
73fc5fc4b9 Support for a new SP2 device.
It returns different codes for check and checknl.
2018-10-27 16:15:47 +03:00
Mayeul Cantan
56b2ac36e5 Refactor the device list
It is now more readable, which should make it easier to parse the code
and add new devices.
2018-04-30 23:06:19 +02:00
lordneon
e724aec007 Fixed a bug within the SP2 class.
check_power and check_nightlight did not check to see if the payload was already an int before calling ord.
2018-04-15 10:22:19 +00:00
Daniel Høyer Iversen
3b6b55ae73
Merge pull request #164 from horse315/master
fixed Hysen thermostat ctor & added comments
2018-03-31 15:57:17 +02:00
ooo89
832a40c278
Update __init__.py 2018-03-28 16:56:36 +02:00
Aleksey Bogomolov
e9748ff0b4
fixed Hysen thermostat ctor & added comments 2018-03-24 19:05:44 +03:00
clach04
8b593beff9 Restore Python 3 support (#95)
Use explicit byte literals.

AES encryption padding broken with commit f7e30344c5 under Python 3.
Python 3 support when using pyaes (instead of Crypto.Cipher.AES) now works.
2018-03-18 15:12:20 -07:00
Nightreaver
33a2e4ae54 implemented method to toggle nightlight on some SP3 devices (#159)
* implemented method to toggle nightlight on some SP3 devices

* implement nightlight feature to cli

* check_power/check_nightligh fixes for py2.7
2018-03-18 15:03:46 -07:00
Peter Windridge
39cc64efce Basic support for Hysen Heating Controller (dev type 0x4ead) (#138)
* Initial support for Hysen heating controller device.  Only gets current temperature.

* Add switch_to_auto() to put the controller in (pre-programmed) timed mode

* Add set_temp() to manually set temperature.  Now requires PyCRC (payload needs modbus CRC16)

* Remove test script

* Get current timer schedule

* Get much more data from device

* Add PyCRC to install_requires setup.py

* Rewrite based on better understanding.  Allow setting schedule and changing 'loop mode'

* Add set_time function

* Support advanced settings and perform CRC check on responses

* Explain remaining unknowns for Hyson thermostat

The room_temp_adj (or simply 'adj') only applies to the room_temp. It's limited to -5.0..+5.0, but uses a 2 byte data type.
This leads to the assumption that external_temp could also use this data type, maybe for showing temperatures below 0 - but I cannot test this currently. Maybe I have to place it near a fridge to confirm.

* Fix get_temp and add get_external_temp for Hysen

Again: maybe payload[17] also belongs to the external temperature...

* remove comment about first 2 bytes and raise error if CRC check on response fails

* Remove comment about guessed meaning of unknown

Just confirmed, that lowest outside temp is 0. So it seems to only need 1 byte, as room temp does.

* add ability to toogle hysen device power

Turn display power on/off

* Update set_power() to support remote_lock for Hysen

Sorry, there was still one thing missing: set/unset remote_lock.
I captured again and changed the set_power accordingly.

* fix comments
2018-03-18 15:03:26 -07:00
Nightreaver
8754493951 broadlink_discovery returns wrong devtype (#157)
* few item in gendevice use `if` instead of `elif`

* passing `devtype` back to device
change `cli/broadlink_discovery` to display proper devtype
2018-03-18 14:58:15 -07:00
marconfus
26109aac67 Fix for environments where Crypto and pyaes are installed. (#151)
If both Crypto and pyaes are installed 'pyaes' is in sys.modules(), but as it is not imported (see top) it's not available.
Fix for #128
2018-03-18 14:54:17 -07:00
Daniel Høyer Iversen
00cc79daee
Merge pull request #149 from deel77/master
Default support for python3 in get_energy() for SP2
2018-03-10 15:30:42 +01:00
Steven Barthen
d186332b96 add new rmpro models - Pro Plus 3, Pro Plus 300, Pro Plus HYC, Pro Plus R1, Pro PP 2018-03-10 21:10:33 +09:00
Dominik Lakatoš
51ff890c7c
modified get_energy() to support python3 2018-02-08 13:47:28 +01:00
Brent Avery
4e33ef4465 Get rf scan learning working in CLI tool (#87) 2018-01-30 07:50:51 +11:00
Aleksandr Smirnov
82172f54ab support for dooya curtain motor (#134) 2017-12-25 00:34:37 +00:00
Matthew Garrett
dd6eb8767e Experimental RF code 2017-11-25 12:38:57 -08:00
jazzina
b8cf8d073e Add support for SmartOne Alarm Kit 2017-11-25 12:20:46 -08:00
Eugene Schava
2160488da2 sp2.get_energy 2017-11-25 12:11:05 -08:00
Eugene Schava
626b459b5b SP3S support (#117) 2017-11-25 12:08:58 -08:00
hackers365
1d7fba3d06 add honyar mp1 devtype 0x4ef7 2017-11-25 12:08:14 -08:00
mob41
2e2c8ef1a1 [Critical] Fixes invalid byte string (b) for padding (#97, #107) (#108)
* Fixes invalid byte string (b) for padding (#97, #107)

* Change version to 0.5
2017-06-13 19:30:27 -07:00
kost
f7e30344c5 pad the payload for AES encryption (16) (#92) 2017-05-07 11:32:52 -07:00
Robert Sullivan
babb3f83d3 Python3.5 syntax changes 2017-04-25 15:33:00 +01:00
Aydaen Lynch
d989c27d36 Add in AP Mode device setup for new Broadlink devices. (#53) 2017-04-22 12:48:02 -07:00
Daniel Høyer Iversen
19851ed423 bug fix in timeout (#70) 2017-04-22 12:38:02 -07:00
Dimitrij
d346476e63 fix check_power for SP2/SP3 (#72)
Fixed up to avoid merge conflict with #78
2017-04-22 12:36:50 -07:00
Thomas Järvstrand
4f03ffb963 Add support for pure python AES implementation (#78) 2017-04-22 12:34:37 -07:00
Víctor Ferrer García
63e097d73f check_power_raw included for mp1 devices
Export raw power state for MP1 devices
2017-01-02 23:31:04 -06:00