1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-15 14:50:28 -07:00

76 Commits

Author SHA1 Message Date
Marcio Granzotto
6197fa42d1 Add fallback to v1 API 2021-03-22 16:08:01 -03:00
Michael Wei
0e5db00f05 print platform type in listing 2020-12-02 18:30:38 +00:00
Michael Wei
8617831453 Initial thinq2 support, works with LA090HSV5 ac 2020-11-30 21:15:41 +00:00
Adrian Sampson
8319b2ef97 Run Black on example.py 2020-11-28 17:05:17 -05:00
pifou
4ac98be936 fix latest discussion lower-level 2020-10-28 22:53:53 +01:00
pifou
649299eacf remove ac-mon command from example.py
remove ac-mon command, use only 'mon' command as generic command for any device
2020-10-28 22:33:42 +01:00
pifou
763b6e5005 refactoring
move mapping declaration into util.py with local import into the the module-level function device_classes
add client.get_device_class
adapt example.py with AC monitoring
2020-10-27 20:34:32 +01:00
Andreas Ehn
dddd42a7f3 Fix long lines to comply with style check 2020-07-20 15:08:17 +08:00
Andreas Ehn
31ba782ad9 Set the refrigerator target temperature 2020-07-20 14:54:10 +08:00
Jessica Stokes
78f09081f5
Request supported Operations from model info
This fixes #83 - I have the same LP1419IVSM Air Conditioner model, and it causes an error when turning on using wideq.

I've updated the ACDevice class with two new @properties, which are the list of Operations the device supports, and the best-supported ON operation from that list.

This makes the presumption that if the model reports ALL_ON as available, that it is appropriate to use (as the existing code did), but if ALL_ON is not supported by the particular model, it will fall back to using whichever ON Operation it reports as supporting. In the case of the LP1419, that will be RIGHT_ON.

Additionally, as a backstop, this will raise an error if ALL_ON is not supported but there are still more than one supported ON operation - from reading issues I haven't been able to find any evidence that such a device exists, but if one should pop up it'll likely need handling in some creative way.

These new values are now also reported in the ac-config subcommand of example.py.

Finally, this updates the set_on method to use the resultant operation name. This now means that example.py set [id] on works for my air conditioner again, and just in time for the warmer weather!
2020-05-10 11:17:50 -07:00
Frederik Gladhorn
919139d9e8 Add logging
Instead of using print, let's use Python's logging framework. That
allows switching verbosity easily and filtering out unwanted messages.
Some of the setup code is inspired by what Home Assistant does.
2020-01-31 22:01:17 +01:00
David
a62572e599 Merge remote-tracking branch 'upstream/master' 2020-01-22 12:19:26 -05:00
David
7b7f1e76f6 change power usage names and added units 2020-01-22 12:17:36 -05:00
Frederik Gladhorn
f44aa91b24 Make flake8 happy
For some reason I don't get the same error on my local machine, I guess
it's different flake8 versions.
2020-01-22 15:32:02 +01:00
David
4122d7d188 add power readings to ac_config 2020-01-22 00:28:53 -05:00
Frederik Gladhorn
cc3d60f882 Error out when language or country are invalid
Many people seem to stumble over this (I did, specifying en_US instead
of en-US for example). I don't know of any valid inputs other than two
letter combinations, but three letters could be valid.
2020-01-13 13:28:10 +01:00
Frederik Gladhorn
6461596219 Use f-strings for command line options
These are more readable than the .format strings.
2020-01-13 13:05:26 +01:00
Adrian Sampson
26fd47471b
Merge pull request #67 from gladhorn/exec_bit
Make example.py executable
2020-01-11 11:54:32 -05:00
Adrian Sampson
c5fb01e7cc Print error message to stderr (#66) 2020-01-11 11:43:48 -05:00
Adrian Sampson
a1cd9795c6 Wrap error message to 79 characters 2020-01-11 11:43:13 -05:00
Frederik Gladhorn
a727828064 Make example.py executable
This makes it easier to run the file on unix systems.
2020-01-09 22:00:42 +01:00
Frederik Gladhorn
ff8d0ba9e0 Print error on invalid command 2020-01-09 21:58:56 +01:00
Adrian Sampson
07b6a1ca21 Handle NotConnectedError in example 2019-11-28 09:34:51 -05:00
Adrian Sampson
b176cd26ee Nice error when device can't be found
Inspired by #17.
2019-06-20 13:17:02 -04:00
Adrian Sampson
8929123c8d Add country and language flags to example (#13) 2019-06-16 14:51:20 -04:00
Adrian Sampson
0317c81bdf Use argparse for example 2019-06-16 14:30:11 -04:00
nordron
4ad4946719 Revert changes 2018-09-12 00:17:56 +03:00
krocans
5a5e8bf47d DeviceInfo decodes monitor status data 2018-08-12 10:33:27 +03:00
krocans
910e55d018 Decode binary monitoring status data 2018-08-12 10:16:23 +03:00
root
0ee80dd122 Fix monitor data printed twice on missing 'value' 2018-08-11 23:32:08 +03:00
Adrian Sampson
4cde35597a Style fixes 2018-06-17 10:37:41 -04:00
bindismal
add21143d2 Accepted proposed changes 2018-06-17 23:50:33 +10:00
bindismal
3c59047d10 Added support for zone control for ducted HVAC that support zone control
Added support for reading / setting fan speed
2018-06-16 21:34:33 +10:00
Adrian Sampson
0a48345409 Get speaker volume setting
Still can't figure out how to *set* the light state.
2018-04-21 15:14:10 -04:00
Adrian Sampson
6d3e7b3fa6 Add method for reading light state 2018-04-21 14:59:53 -04:00
Adrian Sampson
597895b263 Expose AC config values I know of so far 2018-04-21 14:42:11 -04:00
Adrian Sampson
fe77d66e96 Show how to check device type 2018-04-03 10:45:58 -04:00
Adrian Sampson
c696489de2 Fetch device type 2018-04-03 10:40:38 -04:00
Adrian Sampson
86c63a92b5 Not all devices return JSON status data 2018-04-03 10:17:04 -04:00
Adrian Sampson
dd9ff96b39 Example to turn on/off a device 2018-02-18 11:40:31 -05:00
Adrian Sampson
7f7988effa Refactor example commands 2018-02-18 11:38:24 -05:00
Adrian Sampson
c7173124cd On/off status 2018-02-18 11:26:47 -05:00
Adrian Sampson
f8107ebc25 An enum for OpMode 2018-02-18 11:13:50 -05:00
Adrian Sampson
315dbd73e1 Example of higher-level monitoring 2018-02-18 11:00:27 -05:00
Adrian Sampson
9bf03ddb46 Used namedtuples for value info 2018-01-21 12:47:17 -05:00
Adrian Sampson
844d1c1bdb Look up value descriptions 2018-01-21 12:39:36 -05:00
Adrian Sampson
947ea8a647 DeviceInfo abstraction 2018-01-21 12:12:10 -05:00
Adrian Sampson
01366af56a Inline unnecessary helpers 2018-01-21 11:39:11 -05:00
Adrian Sampson
ebc9c5b679 Make load into a class method 2018-01-20 21:47:32 -05:00
Adrian Sampson
2ce09e9642 Move Client to main module 2018-01-20 21:43:02 -05:00