1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-19 00:30:10 -07:00

286 Commits

Author SHA1 Message Date
pifou
1bcf1bd1f1 Update client.py 2020-10-26 23:35:33 +01:00
pifou
743622dea0 Update client.py 2020-10-26 23:28:57 +01:00
pifou
696f65e122 Update client.py 2020-10-26 23:26:32 +01:00
pifou
4fda55aba0 fix mypy errors 2020-10-26 23:19:52 +01:00
pifou
709e1de9c9 add a mapping for every subclass of Device with DeviceType enum as key
This make it easy to get the relevant subclasse of Device according to the DeviceType of the model info
2020-10-26 23:09:04 +01:00
Adrian Sampson
d14f1f96d8 Tweaks for #126 (fixes #64) 2020-10-14 07:47:47 -04:00
Adrian Sampson
45816884b9 Merge pull request #126 from pifou25/FixJsonError
try and catch JSONDecodeError
2020-10-14 07:44:00 -04:00
pifou
c6f822bffe fix flake8 criteria 2020-10-13 23:08:39 +02:00
pifou
810a3ce747 try auto fix json encoding error 2020-10-13 22:56:27 +02:00
pifou
5e47dd0bb2 try and catch JSONDecodeError
this is related to bug https://github.com/sampsyo/wideq/issues/64
2020-10-12 23:06:22 +02:00
Adrian Sampson
d7440be7a0
Merge pull request #123 from pifou25/FixApiError9003
Fix api error9003
2020-10-04 16:58:21 -04:00
pifou25
d78d5fbf3b
Delete example.php 2020-10-04 21:22:47 +02:00
pifou
8d918fad0f Create example.php 2020-10-04 14:57:35 +02:00
pifou
da8b3453fa Update core.py 2020-10-03 10:42:57 +02:00
Adrian Sampson
ade3d18f30
Merge pull request #121 from no2chem/patch-1
Update README.md to reflect v2 incompatibility
2020-09-30 08:54:43 -04:00
Michael Wei
0927ffb16d
Add link to PR discussion 2020-09-29 10:36:22 -07:00
Michael Wei
ccc0c06147
Update README.md to reflect v2 incompatibility
Hi @sampsyo! 

Thanks for the work on the SmartThinq API. The library doesn't seem to currently work on the v2 API, and until it does, I suggest this small change to the readme so that people aren't creating issues or are confused as to why it doesn't work for them. I was confused for a little bit until I went through the issue tracker to figure out why I wasn't getting any devices.

Of course, happy to help get v2 on track.
2020-09-28 11:50:20 -07:00
Adrian Sampson
7fed7cd9a4 Version bump: v1.5.0 v1.5.0 2020-08-07 07:26:37 -04:00
Adrian Sampson
ee8866b7d1
Merge pull request #114 from ehn/master
Set the refrigerator target temperature
2020-07-20 08:56:26 -04: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
Adrian Sampson
2e6eed2919
Merge pull request #110 from ankushduacodes/patch-2
added .DS_store to gitignore
2020-06-27 12:46:40 -04:00
ankushduacodes
aec22ce2e5
Update .gitignore
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2020-06-27 22:13:36 +05:30
ankushduacodes
5d145deaa3
added .DS_store to gitignore
its a mac system file
2020-06-27 22:10:34 +05:30
Adrian Sampson
9165c19571
Merge pull request #105 from ankushduacodes/add-ankush-dua
Added jet mode functionality to API
2020-06-15 14:22:34 -04:00
ankushduacodes
4d3d50a07c
Updated JET mode names in ac.py
simplified JET mode names and fixed doc strings
2020-06-15 08:30:39 +05:30
ankushduacodes
34f5fd6033
Update wideq/ac.py
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2020-06-15 08:19:07 +05:30
ankushduacodes
f7285a66d5
Update wideq/ac.py
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2020-06-15 08:18:51 +05:30
ankushduacodes
5aa212a9da
deleted DS store that was added accidentally 2020-06-15 08:17:58 +05:30
ankushduacodes
c9665038ef
Added jet mode functionality to API
Jet mode functionality seems to be known by different name at different models of AC
On my AC it is known as Himalayas mode

Please Add Ankush Dua to Contributors list
2020-06-14 09:27:20 +05:30
ankushduacodes
d65bcd4e16
Added jet mode functionality to API
Jet mode functionality seems to be known by different name at different models of AC
On my AC it is known as Himalayas mode

Please Add Ankush Dua to Contributors list
2020-06-14 09:23:32 +05:30
ankushduacodes
b8237186f3
Added jet mode functionality to API
Jet mode functionality seems to be known by different name at different models of AC
On my AC it is known as Himalayas mode

Please Add Ankush Dua to Contributors list
2020-06-14 09:19:37 +05:30
Ankush Dua
86ca064065 Added jet mode functionality to API
Jet mode functionality seems to be known by different name at different models of AC
On my AC it is known as Himalayas mode
2020-06-14 08:48:45 +05:30
Adrian Sampson
64553d52e3 Version bump: 1.4.0 v1.4.0 2020-05-11 22:04:23 -04:00
Adrian Sampson
c92b20370e
Merge pull request #96 from ticky/request-operations-from-model-info
Request supported Operations from model info
2020-05-11 08:29:12 -04:00
Jessica Stokes
799709c2d6
Placate Flake8 2020-05-10 11:24:21 -07: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
Adrian Sampson
1c0e9f03a6
Merge pull request #95 from ncovercash/master
Add smart grid features to SmartSavingMode refrigerator enum
2020-05-08 18:26:52 -04:00
Noah Overcash
8f0e20c3fc
Add smart grid features to SmartSavingMode refrigerator enum
My refrigerator (LFXS28566D) supports the three added options as part of it's "smart grid" functionality.  None of the initial three options were in my fridge, so I figure they are mutually exclusive modes (although OFF and SMART_GRID_OFF are similar, as is CUSTOM and SMART_GRID_CUSTOM).

As best I can tell, SMART_GRID_OFF is for when the smart grid feature is disabled overall, SMART_GRID_DEMAND_RESPONSE is something certain power companies can do to tell the fridge not to defrost when the power grid is stressed (I cannot test as I am ineligible), and SMART_GRID_CUSTOM is used whenever the button on the fridge is pushed or "Seasonal Energy Saver" is enabled in the app.

For reference, here is an excerpt from my model's JSON dump:
```json5
{
...
"SmartSavingMode": {
    "type": "Enum",
    "default": "0",
    "option": {
        "0": "@CP_OFF_EN_W",
        "2": "@RE_TERM_DELAY_DEFROST_CAPABILITY_W",
        "3": "@RE_TERM_DEMAND_RESPONSE_FUNCTIONALITY_W"
    }
}
...
}
```
2020-05-08 10:18:15 -04:00
Adrian Sampson
fd5a695988 Recreate sessions on the fly
Adapts #88 to avoid a global session object.
2020-04-10 21:43:52 -04:00
Adrian Sampson
6af5eb1ce1 Uniform names for retry constants 2020-04-10 21:42:11 -04:00
Adrian Sampson
16a2a3ed3e Merge pull request #88 from swails/feature/improve-retries
Improve retry logic
2020-04-10 21:38:29 -04:00
Jason Swails
65efc281a3 Fix flake8 2020-04-10 09:29:31 -04:00
Jason Swails
c595749eb9 Incorporate review comments 2020-04-10 09:24:39 -04:00
Jason Swails
e7b5a7d28b Address review comments 2020-04-07 22:05:06 -04:00
Jason Swails
95e64dec1a Fix flake8 complaints 2020-04-07 08:07:42 -04:00
Jason Swails
6446595548 Improve retry logic 2020-04-05 10:11:12 -04: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
Frederik Gladhorn
be05e1b33e Allow strings in ModelInfo
The only instance where this is used is a comment,
see issue #62. For now it will just be ignored. The comment seems to
contain several times.

Fixes #62
2020-01-27 11:45:51 +01:00
Adrian Sampson
d8389f3bee
Merge pull request #81 from dacrypt/master
avoid crashing if DisplayControl is not supported
2020-01-22 16:09:34 -07:00