Commit graph

133 commits

Author SHA1 Message Date
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
Brent Avery
4e33ef4465 Get rf scan learning working in CLI tool (#87) 2018-01-30 07:50:51 +11: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
dd6eb8767e Experimental RF code 2017-11-25 12:38:57 -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
wind-rider
2388808f41 Add device type mapping to protocol 2017-04-22 12:40:04 -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
Matthew Garrett
7a852b2084 Bump version to 0.3 2017-01-03 10:08:06 -06: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
Matthew Garrett
a4465a7515 Merge pull request #46 from Danielhiversen/patch-10
validate the authorization
2016-12-28 08:03:02 -06:00
Daniel Høyer Iversen
39e170c9e0 validate the authorization 2016-12-26 20:02:04 +01:00
Daniel Høyer Iversen
b30fc0d1c1 Ensure discover() returns devices and not None
There's a small race condition in the discover() method. If recv() returns
before the socket timeout is reached, but we hit the top of the loop after
the timeout is reached, we'll return None rather than the set of devices.
2016-12-25 11:16:53 +00:00