Commit graph

92 commits

Author SHA1 Message Date
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
Matthew Garrett
766b7b00fb Version 0.9 2018-04-24 08:33:05 -07:00
Daniel Høyer Iversen
75b323c640
Merge pull request #179 from tochev/feature-energy-cmd
Add energy option to broadlink_cli
2018-04-23 10:39:33 +02:00
Tocho Tochev
b2c4bed94a Add energy option to broadlink_cli 2018-04-19 23:45:50 +03:00
Daniel Høyer Iversen
9c238e1717
Merge pull request #178 from lordneon/master
Fixed a bug within the SP2 class.
2018-04-15 19:04:05 +02:00
lordneon
e8421343e3 Merge branch 'master' of https://github.com/lordneon/python-broadlink 2018-04-15 10:22:42 +00: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
lordneon
90af3b7437 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:19:05 +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
Daniel Høyer Iversen
e9f4bb6372
Merge pull request #169 from ooo89/master
Add support for Clas Ohlsson OEM branded SP3
2018-03-31 15:56:06 +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
Daniel Høyer Iversen
ed6cec9b7f
Merge pull request #161 from mikalstill/patches
Add the RM3 mini to the supported device list.
2018-03-24 14:47:44 +01:00
Michael Still
53b213ea85 Add the RM3 mini to the supported device list.
I picked one of these up cheap on ebay and it totally works.
2018-03-19 18:19:51 +11:00
Matthew Garrett
9286d9a1d9 Version 0.8 2018-03-18 15:12:47 -07: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
Matthew Garrett
8d3c9f1e9f Version 0.7 2018-03-18 15:08:21 -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
Marcin Koperski
21d96bd140 Add option to switch state (#160)
Find lacking for an option in one line to switch a state of SP2 switches
2018-03-18 14:55:03 -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
Daniel Høyer Iversen
0742039477
Merge pull request #156 from Nightreaver/master
add new rmpro models
2018-03-10 15:30:10 +01:00
Daniel Høyer Iversen
e8795ac1ae
Merge pull request #150 from balloob/patch-1
Depend on pycryptodome instead of pycrypto
2018-03-10 15:29:33 +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
Paulus Schoutsen
38aa6dc37e Depend on pycryptodome instead of pycrypto 2018-02-27 00:26:07 -08:00
Dominik Lakatoš
51ff890c7c
modified get_energy() to support python3 2018-02-08 13:47:28 +01:00
Valter Vicente
dd0e908317 New flags: check power state and turn device on & off (#132)
Added new flags so it is possible to check device's current power state and to turn device on & off from CLI
2017-12-25 00:35:09 +00:00
Aleksandr Smirnov
82172f54ab support for dooya curtain motor (#134) 2017-12-25 00:34:37 +00:00
Sergey Bogatyrets
9ff6fa817b Checking device arg too for defining dev instance (#129) 2017-11-26 11:10:19 -08:00
Matthew Garrett
8bc67af6d7 Bump version 2017-11-25 12:21:48 -08:00
jazzina
b8cf8d073e Add support for SmartOne Alarm Kit 2017-11-25 12:20:46 -08:00
blapid
c85f6ac213 Cli venv support (#127)
* Update broadlink_cli

* Update broadlink_discovery
2017-11-25 12:14:34 -08:00
Michael Kaiser
71f320638e Fix protocol description (#125)
* Fix discovery packet format description

* fix MAC address offset

* Command packet format description

* Data description
2017-11-25 12:14:12 -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
Bengt Martensson
4f902342e7 New options for broadlink:cli: --convert and --durations. (#105)
Now takes several data arguments.
2017-11-25 12:06:12 -08:00
Julian Pastarmov
3d4789305e Only get temperature for devices that support it. (#102)
Calling check_temperature is only possible on the RM family of devices. The program used to crash if other types of devices were discovered (A1, MP1 etc.).
2017-11-25 12:04:10 -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
Daniel Høyer Iversen
f1d62380c9 Merge pull request #86 from RobSullivan/master
Python3.5 syntax changes
2017-04-26 11:09:57 +02: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
Ivan Martinez
5195856200 included sensors option 2017-04-22 12:42:32 -07:00
Ivan F. Martinez
de7c5c2a2a basic documentation for cli programs 2017-04-22 12:42:32 -07:00
Ivan Martinez
76dd4cfc70 command line programs to control broadlink devices 2017-04-22 12:42:32 -07:00
tobiaswaldvogel
846cc35366 More details about the data structure for IR and RF pulses (#58)
* Added more details to payload structure
2017-04-22 12:41:30 -07:00
wind-rider
3c44422b60 Update protocol.md 2017-04-22 12:40:04 -07:00