Commit Graph

87 Commits

Author SHA1 Message Date
sibowler
da6e929cfc Merge branch 'master' into fix_semaphore_release_error 2023-01-23 13:00:56 +10:00
rospogrigio
1e3b0476f8 Merge branch 'master' into device_debugging_option 2023-01-10 22:42:30 +01:00
rospogrigio
0f3160f178 Fix for version not being set yet when calling _setup_dispatcher 2023-01-10 22:24:05 +01:00
rospogrigio
3bf69d69f0 Fixed tox issues 2023-01-10 22:24:05 +01:00
rospogrigio
c9d6bc521e Fixed sequence numbering on status update 2023-01-10 22:24:05 +01:00
rospogrigio
edc6752ecf Fixed negotiation and sequence numbers for protocol 3.4 2023-01-10 22:24:05 +01:00
rospogrigio
960f07b6bb Fixed requested DPs for type_0d devices 2023-01-10 22:24:05 +01:00
rospogrigio
a3914cc8ce Added debugging 2023-01-10 22:24:05 +01:00
rospogrigio
0fb619960c Fixed HEARTBEAT command 2023-01-10 22:24:05 +01:00
rospogrigio
957cf25dd0 Introduced pytuya with support for 3.4 protocol 2023-01-10 22:24:05 +01:00
rospogrigio
33e0033b0a Introduced the possibility to select which devices should have the pytuya debug enabled 2023-01-10 18:18:35 +01:00
rospogrigio
d8acf60076 Fix for version not being set yet when calling _setup_dispatcher 2023-01-10 11:31:37 +01:00
rospogrigio
966c3ec536 Fixed tox issues 2023-01-09 23:45:06 +01:00
rospogrigio
ecf66f76e6 Fixed sequence numbering on status update 2023-01-09 01:49:51 +01:00
rospogrigio
f23a945f5e Fixed negotiation and sequence numbers for protocol 3.4 2023-01-09 01:33:18 +01:00
rospogrigio
9efbcce0e4 Fixed requested DPs for type_0d devices 2023-01-08 07:42:53 +01:00
rospogrigio
9d94f1665d Added debugging 2023-01-07 23:24:02 +01:00
rospogrigio
24853b5de7 Fixed HEARTBEAT command 2023-01-07 22:59:08 +01:00
rospogrigio
4a5bf83867 Introduced pytuya with support for 3.4 protocol 2023-01-07 22:42:11 +01:00
sibowler
8c597bb18f Fix for AttributeError: 'TuyaMessage' object has no attribute 'release' error 2022-10-17 07:18:06 +11:00
sibowler
ad1f757818 Implementing RESET Tuya function to enable devices which are stuck in a zombie mode to start responding to commands. Added configurable DPS for Reset command as found devices wouldn't 'wake up' unless they had exactly the right entries 2022-07-20 06:14:12 +10:00
Martín Villagra
0db320ee36 add whitelist with 18,19,20 2021-12-01 15:43:33 +00:00
Martín Villagra
943bfa532e log dps_cache 2021-11-30 17:09:08 +00:00
Martín Villagra
3cbe6751d3 revert changes, dont wait for response but use all detected dps 2021-11-29 03:39:22 +00:00
Martín Villagra
23e48b791a revert defaulting to all dps 2021-11-28 10:46:28 +00:00
Martín Villagra
d6e7c7dec4 send updatedps with all detected dps by default 2021-11-28 01:46:12 +00:00
Martín Villagra
9c6de40731 handle updatedps response 2021-11-27 15:42:05 +00:00
Martín Villagra
515b3303e9 add polling option 2021-11-24 00:05:42 +00:00
Martín Villagra
47c4edc20d fix lint issues 2021-11-23 21:20:43 +00:00
Martín Villagra
e13f02a881 send update dps command with heartbeat 2021-11-23 21:18:17 +00:00
ultratoto14
3a4940387c Use debug message for timeout. 2020-12-17 15:01:02 +01:00
Pierre Ståhl
f72cbc0b5a Run pylint from tox (#243) 2020-12-17 09:26:55 +01:00
ultratoto14
89dabfc105 Reduce heartbeat interval. 2020-12-15 17:12:52 +01:00
Pierre Ståhl
10e55e67b4 Add support for passive devices (#171)
* Add support for passive devices

* Fix a few issues

* Fix broken handling of closing a connection

This fixes the following error:

  AttributeError: 'NoneType' object has no attribute 'write'

* Always use discovery broadcasts to trigger connects

From now on there's no connect loop but all attempts are initiated by
received discovery messages.

* Fix cancelling of heartbeat task

* Verify entry has been loaded before connecting

* Don't reset seqno when switching to type_d device
2020-12-15 09:08:46 +01:00
Pierre Ståhl
f376d8584a Fix broken exception logging (#173) 2020-11-20 10:40:35 +01:00
Pierre Ståhl
0531a284c7 Add contextual logging where applicable (#124)
* Add contextual logging where applicable

* Compress device id in log output
2020-11-17 12:54:01 +01:00
ultratoto14
657850e39c Add support of RGB lights (#120)
* Make set_dps available.

* Adding RGB support, brightness fix, color_temp range.

* Update README for light options

* Formatting

* Formatting

* Need to force to white to ensure color picker is updated.

* Detect color mode RGB/HSV based on color length.

* Extract rgb encoded color check in method.

* Make check method private.

* Fix exception when color is not available (maybe when powered off)

* Reformat.
2020-10-28 09:54:54 +01:00
Kendell R
c1878f82e2 Improve GitHub Actions (#97)
* Delete hassfest.yaml

* Update and rename ci.yaml to tox.yaml

* Create combined.yaml

* Update hacs.json

* Update README.md

* Update combined.yaml

* Remove unused import

* Restored wrongly deleted line in cover.py

* Update config_flow.py

* Update __init__.py

Co-authored-by: Pierre Ståhl <pierre.staahl@gmail.com>
Co-authored-by: rospogrigio <49229287+rospogrigio@users.noreply.github.com>
2020-10-22 11:43:47 +02:00
Pierre Ståhl
3f854337ad Fix status exception when no payload 2020-10-21 12:09:06 +02:00
Pierre Ståhl
e6538a4681 Fix bugs in pytuya
This handles responses without a return code and also fixes support for
unencrypted clients. Made a few tweaks to debug logs as well.
2020-10-19 10:43:31 +02:00
Pierre Ståhl
47d2900a2c Add set_dps to set multiple datapoints 2020-10-15 18:54:36 +02:00
Pierre Ståhl
44db913514 Rename set_dps to set_dp in pytuya 2020-10-15 18:54:36 +02:00
Pierre Ståhl
81c04bfc4e Fix broken support for 0d devices 2020-10-15 18:48:34 +02:00
Pierre Ståhl
136e44c549 Minor final fixes 2020-10-14 13:10:20 +02:00
Pierre Ståhl
b0603313ff Fixed some bugs 2020-10-14 13:10:20 +02:00
Pierre Ståhl
91f788865c Add more temporary logging 2020-10-14 13:10:20 +02:00
Pierre Ståhl
ff3ca99b29 Add logging and stability fixes 2020-10-14 13:10:20 +02:00
Pierre Ståhl
7384f1fc54 Add context to pytuya logging 2020-10-14 13:10:20 +02:00
Pierre Ståhl
59dfc35759 Fix bug when unloading an entry 2020-10-14 13:10:20 +02:00
Pierre Ståhl
b2c4e93a47 Disconnect on missing heartbeats 2020-10-14 13:10:20 +02:00