Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
make-all authored Feb 6, 2025
2 parents bf7dee3 + 252fce8 commit 5425744
Show file tree
Hide file tree
Showing 114 changed files with 5,348 additions and 442 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ body:
options:
- label: I am sure this is a bug or improvement, that is well enough described that it can be implemented.
required: true
- label: This report is for tuya-local, **not** for localtuya.
required: true
- label: |
If this is for a specific device, the device config is mentioned above, or diagnostics are included.
required: false
Expand Down
29 changes: 25 additions & 4 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Further device support has been made with the assistance of users. Please consid
- [daitj](https://github.com/daitj) for contributing support for Wilfa Haze humidifier.
- [Utopia69](https://github.com/Utopia69) for providing additional info on his Fairland IPH45 heatpump (matching Madimack)
- [Seopgroenten](https://github.com/Soepgronten) for assistance with W'eau pool heatpumps.
- [choppedpork](https://github.com/choppedpork) for contributing support for QS Wifi curtain modules.
- [choppedpork](https://github.com/choppedpork) for contributing support for QS Wifi curtain modules and Homebase 12" oscillating fan.
- [Swiftnesses](https://github.com/Swiftnesses) for assistance with Devola patio heaters and Atomi string lights.
- [odeBuXTeR](https://github.com/odeBuXTeR) for contributing support for Poolex Q-line pool heatpumps.
- [peterforeman](https:github.com/peterforeman) for assistance with improving Fairland/Madimack support.
Expand Down Expand Up @@ -608,7 +608,7 @@ Further device support has been made with the assistance of users. Please consid
- [levineds](https://github.com/levineds) for contributing support for Moes motion sensor smart switch.
- [tomassanjuann](https://github.com/tomassanjuann) for contributing support for Tera W01 EV charger.
- [rorydcampbell](https://github.com/rorydcampbell) for comtributing support for WellToBe WB S36D pet feeder.
- [FreemanJD](https://github.com/FreemanJD) for assisting with support for SOP10 water sprinkler.
- [FreemanJD](https://github.com/FreemanJD) for assisting with support for SOP10 water sprinkler and contributing improvements to PC321-TY meter.
- [liquidand](https://github.com/liquidand) for assisting with support for Wolf Guard WTR alarm.
- [cw-cdz](https://github.com/cw-cdz) for contributing support for Heatstorm HS-1500 heater.
- [sveos](https://github.com/sveos) for assisting with support for Nedis ZBRC10WT remote contol.
Expand Down Expand Up @@ -808,9 +808,9 @@ Further device support has been made with the assistance of users. Please consid
- [rackxp](https://github.com/rackxp) for assisting with support for Brilliant Smart twin flood lights with motion detection.
- [toxacj](https://github.com/toxacj) for assisting with support for C30W gas leak detector.
- [Ramon-E80](https://github.com/Ramon-E80) for assisting with support for Clean Air Optima CA-702 dehumidifier.
- [fate8383](https://github.com/fate8383) for assisting with support for Siguro AP-K50 purifier.
- [fate8383](https://github.com/fate8383) for assisting with support for Siguro AP-K50 purifier and Kanchou pet fountain.
- [szemkhel](https://github.com/szemkhel) for assisting with support for Protmex PT-19DW alarm clock with temperature and humidity monitor.
- [dimis7](https://github.com/dimis7) for assisting with support for Inventor Rise Pro dehumidifier.
- [dimis7](https://github.com/dimis7) for assisting with support for Inventor Rise Pro dehumidifier and contributing support for Rohnson SmartChef XL air fryer.
- [Bryla2507](https://github.com/Bryla2507) for assisting with support for LSC dual band outdoor camera.
- [PaPa1ya](https://github.com/PaPa1ya) for assisting with support for generic RGB "dreamlight" garland.
- [jcconnell](https://github.com/jcconnell) for contributing support for Gosund SW2 dimmer switch.
Expand All @@ -819,3 +819,24 @@ Further device support has been made with the assistance of users. Please consid
- [salbr](https://github.com/salbr) for contributing support for Wenzhi WZ-M100-W presence sensor.
- [DLV111](https://github.com/DLV111) for contributing product details for Arlec downlight matching RGBCW lightbulb.
- [mikita-liaukovich-epam](https://github.com/mikita-liaukovich-epam) for contributing support for Clofte Duo 400 humidifier.
- [tal6203](https://github.com/tal6203) for assisting with support for Delixing aroma diffuser.
- [rclarkmorrow](https://github.com/rclarkmorrow) for contributing support for Powersav AHR-083 powerstrip (which was merged to generic quad powerstrip with timer) and Gosund WP9 powerstrip with USB, child lock and initial state.
- [ralsinn](https://github.com/ralsinn) for contributing support for Absina Wallbox EV charger.
- [ShawnBuckley](https://github.com/ShawnBuckley) for contributing support for OGACFO humidifier and improvements to TYTE-D1 thermostat switch.
- [gurtjun](https://github.com/gurtjun) for contributing support for Sunred Triangle patio heater.
- [josefelixh](https://github.com/josefelixh) for contributing support for KB15A Bluetooth keypad lock.
- [JackM-521](https://github.com/JackM-521) for assisting with support for Rohnson R-9530 dehumidifier.
- [fra-iesus](https://github.com/fra-iesus) for assisting with support for Ketotek KTEM06pro energy meter.
- [davidjmdev](https://github.com/davidjmdev) for contributing support for PetSnowy Snow+ litter box.
- [yaro24](https://github.com/yaro24) for contributing support for Jiahong ET-44W thermostat.
- [point2start](https://github.com/point2start) for assisting with support for Atorch AT4PTW thermostat.
- [maLLoud86](https://github.com/maLLoud86) for assisting with support for iSparkle Curtain Micro Lights.
- [josvink66](https://github.com/josvink66) for assisting with support for Easybaby GS-801 infant formula maker.
- [Karlsons88](https://github.com/Karlsons88) for assisting with support for Nulite monobloc heat pump.
- [Watanuki-kun](https://github.com/Watanuki-kun) for assisting with support for Smart Amari ceiling fan with light.
- [aherbjornsen](https://github.com/aherbjornsen) for assisting with support for Arida Venti 160 ventilation fan.
- [lewiatanx](https://github.com/lewiatanx) for assisting with support for Climative Cube ION dehumidifier.
- [storebatfar](https://github.com/storebatfar) for assisting with support for Swim & Fun InverBoost pool heat pump.
- [qvqn](https://github.com/qvqn) for assisting with support for Inkbird ISC-007BW smoker fan controller.
- [smue86](https://github.com/smue86) for contributing support for Recteq RT700 grill.
- [K900](https://github.com/K900) for contributing support for Petoneer Fresco EzGo pet fountain.
32 changes: 28 additions & 4 deletions DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
- Semptec ZX7007 infrared heater
- SolAire Vitra S2 panel heater
- Sonnenkonig Eco 700 IR panel heater (probably also other Eco/Elegance series heaters)
- Sunred Smart Triangle Dark patio wall heater
- Taurus Agadir Connect oil column heaters
- Touchstone Sideline electric fireplace
- VTA+ Axial fan heater
Expand Down Expand Up @@ -141,6 +142,7 @@
- Pool Systems IPS Pro pool heat pump (also Fairland Inver-X)
- Pro-Energy PE08 pool heat pump
- Remora pool heat pump
- Swim & Fun InverBoost pool heat pump
- W'eau pool heat pump (simple model and a more complex 13kW model)

- these seem to use a small number of common controllers with minor variations, and many other Pool heat pumps will work using the above configurations.
Expand All @@ -163,6 +165,7 @@
- ITS-4.5HD super water heat pump
- Koi Duo HTW-TD-080KOID
- Modena ES-15-SKY water heater
- Nulite NL-B245 monobloc heat pump
- Powerworld PW58330 hot water and climate heat pump
- Powerworld PW58410 hot water and climate heat pump
- Sanden GAU-A45HPD WiFi heat pump controller
Expand All @@ -172,6 +175,7 @@
### Thermostats

- Arlec PCTH01HA temperature/humidity smart switch
- Atorch AT4PTW DIN rail thermostat
- Avatto ME81 thermostat
- Avatto WT100 thermostat
- Awow/Mi-heat TH213 thermostat (two variants)
Expand Down Expand Up @@ -204,6 +208,7 @@
- Inkbird IPT-2CH v2.0 reptile thermostat
- Inkbird ITC306A thermostat smartplug
- Inkbird ITC308 thermostat smartplug
- Jiahong ET-44W thermostat (also sold under the TheroLife brand)
- Jiahong ET-72W thermostat
- Kiturami NCTR-100 water and heating thermostat
- KKMoon knob thermostat
Expand Down Expand Up @@ -234,6 +239,7 @@
- Aeratron AE3+ ceiling fan (may match other Aeratron models with same WiFi module)
- Amico 52" ceiling fan with light
- Anko HEGSM40 fan
- Arida Venti 160 small through-wall heat-recovery ventilation fan
- Arlec ceiling fan and light remote control kit (CFR225HA also works for Sulion Cadillac)
- Arlec Grid Connect smart ceiling fan (with and without light)
- Arlec 12 speed tower fan
Expand Down Expand Up @@ -266,6 +272,8 @@
- Goldair GCPF315 fan
- Goldair Platinum tower fan (2 variants)
- Hiper T3 bladeless fan
- Hoenofly Smart Amari ceiling fan with light
- Homebase 12" oscillating fan
- Hunter Pacific 9 speed ceiling fan with light
- HYD WeAir Plus bladeless fan with heating function
- Immax Neo Lite Vento ceiling fan with light
Expand Down Expand Up @@ -341,6 +349,7 @@
- Cecotec BigDry 4000 dehumidifier
- Clean Air Optima CA-702 dehumidifier
- Cleverio AD100 dehumidifier
- Climative DH-20S Cube ION dehumidifier
- DH-CSK03W dehumidifier
- Ebac DJ4000 dehumidifier
- Eberg Rico R12E2 dehumidifier
Expand Down Expand Up @@ -373,6 +382,7 @@
- MeacoDry Arete Two 10L dehumidifier
- Pro Breeze 30L dehumidifier
- Qlima D812 and D820A dehumidifiers
- Rohnson R-9530 dehumidifier
- Shinco 30D dehumidifier (also matches Klarstein DryFy Connect)
- Siguro SGR DH-F300W dehumidifier
- Sygonix Smarter dehumidifier
Expand All @@ -394,6 +404,7 @@
- Inkbird IHC-200 humidity controller
- Klarta Humea humidifier
- Kyvol EA200 humidifier
- OGACFO LFHM055 humidifier
- RZTK Aqua Pro humidifier
- Stadler Eva humidifier
- Stadler Form Karl/Karl Big humidifier
Expand All @@ -406,6 +417,7 @@
- Asakuki aroma diffuser with light (newer devices seem to require the Ditua config below)
- Cadance ultrasonic aroma diffuser with light and music playback
- Calex V2 aroma diffuser
- Delixing KCL-1802A-M aroma diffuser
- Ditua DT-1522-YN aroma diffuser
- Etersky aroma diffuser with light
- Maxico aroma diffuser with light (cannot be differentiated automatically from Ditua above)
Expand All @@ -425,15 +437,19 @@
- Inkbird iBBQ-4T cooking probe thermometer (separate and combined measurement variants)
- Inkbird IBS-M1S temperature probe hub
- Inkbird IBT-26S BBQ thermometer
- Inkbird ISC-007BW smoker fan controller
- Inkbird sous vide cooker (also supports Silvercrest sous vide sticks)
- Klarstein Amazonia dishwasher
- Kogan glass 1.7L smart kettle
- Leoffen LFIM6000 ice cube maker
- Recteq RT700 grill
- Rohnson R-2858 SmartChef XL soft cooking air fryer
- Setti+ KT950W smart kettle
- Silvercrest 1.7L smart kettle
- Silvercrest coffee maker
- Silvercrest HF-6602T air fryer
- Ultenic K10 air fryer
- Wandai GS-801 infant formula maker (sold as Easybaby, Gustino)
- Weekett smart kettle

### Smart Meter/Circuit Breaker
Expand All @@ -455,6 +471,7 @@
- ERZ04C smart meter
- Gaqqee KWS-302-WF energy meter
- Geonav HISB80A energy meter
- Ketotek KTEM06pro energy meter
- MatSee Plus bidirectional two channel clamp meter (multiple variants)
- Meterk single phase clamp meter
- Parkside PG/PMW-300 solar inverter
Expand Down Expand Up @@ -487,6 +504,7 @@

### Battery Charger

- Absina Wallbox EV charger (also sold as Dé Wallbox and supporting 16, 32, 40 and 50A single and 3-phase variants)
- AFYEEV 16A portable EV charger
- AFYEEV 32A 22kW portable EV charger
- EcoPoint EV charger
Expand Down Expand Up @@ -533,7 +551,8 @@ the best option.
- ES01 3 outlet + USB powerstrip with individual timers
- ESP Fort EC-SPSP USB and mains smartplug
- Gosund P1 3 outlet + USB powerstrip with power monitoring
- Gosund SP112 RTL energy monitoring smartplug with USB
- Gosund SP112-RTL energy monitoring smartplug with USB
- Gosund WP9-RTL 3 outlet + USB powerstrip with child lock and initial state
- Grid Connect double outlet wall socket
- Grid Connect double outlet with Energy Monitoring, Master and Individual switches and Child Lock
- Grid Connect USB charger with power socket
Expand Down Expand Up @@ -639,6 +658,7 @@ of device.
- HDMI TV ambient lighting 65
- iHD001 LED controller
- Ion LED WiFi dimmer
- iSparkle Curtain Micro Lights
- Kojima motion sensor RGBCW nightlight
- Ledvance Smart+ Planon panel light with backlight
- Lexi Lighting string light Wifi adapter
Expand Down Expand Up @@ -802,7 +822,7 @@ port and password.
- Door peephole camera
- Kerui 200W camera
- Kerui JS-P162 300W camera
- LSC Smart Connect dual band outdoor camera
- LSC Smart Connect dual band outdoor camera
- LSC Smart Connect PTZ camera
- Moes PTZ indoor security camera
- Nedis outdoor camera
Expand Down Expand Up @@ -836,15 +856,18 @@ port and password.
- HoneyGuardian S56 pet feeder
- iLonda L88 fish feeder
- iPettie W5 pet feeder
- Kanchou pet fountain
- Leo's Loo Too pet toilet
- Littepets MA2 series Cute Baby cat litter box
- LSC Smart Connect pet feeder
- Mypin 6L Video pet feeder
- Nedis pet feeder
- Petlibro PLAF103 pet feeder
- Petlibro PLAF203 pet feeder with camera
- Petoneer Fresco EzGo pet fountain
- Petoneer Fresco Hydrate Ultra pet fountain (2 versions)
- Petoneer Fresco Mini pet fountain
- PetSnowy Snow+ litter box
- Petrust TK-WF002 pet fountain
- PNI water feeder
- Puppy Kitty automatic pet feeder
Expand Down Expand Up @@ -898,7 +921,7 @@ port and password.
- CO2-Box air quality monitor
- C30W gas leak detector
- CT20W PIR motion detector
- EM3390TF weather station (tested with Viflykoo branded device, probably identical to the same model number branded as Uzoli, Jely and others)
- EM3390TF weather station (tested with Viflykoo branded device, probably identical to the same model number branded as Uzoli, Jely and others)
- Emax EM3378 Weather Station (selling as Hiper P1 and other rebrands)
- EPT ultrasonic 3m tank level sensor
- Goldair Platinum SleepSmart electric blanket
Expand All @@ -920,7 +943,7 @@ port and password.
- PGST PA-010 indoor temperature and humidity sensor
- PH-W218 water quality monitor
- PlantsIO Ivy smart planter
- Protmex PT-19DW alarm clock with temperature and humidity monitor
- Protmex PT-19DW alarm clock with temperature and humidity monitor
- PV28-CW 8 in 1 air quality monitor
- RSE TY-WFH v3.01 gate controller
- RTCZ-03 human presence sensor
Expand Down Expand Up @@ -968,6 +991,7 @@ port and password.
- HCT-626 dual water timer
- HU06 smart lock
- Ironzon fingerprint lock
- KB150A keypad fingerprint lock
- MoistenLand water timer
- Nice Digi door lock
- Orion DL021HA lock
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ below](#finding-your-device-id-and-local-key).

#### protocol_version

    _(string or float) (Required)_ Valid options are "auto", 3.1, 3.2, 3.3, 3.4. If you aren't sure, choose "auto", but some 3.2 and maybe 3.4 devices may be misdetected as 3.3 (or vice-versa), so if your device does not seem to respond to commands reliably, try selecting between those protocol versions.
    _(string or float) (Required)_ Valid options are "auto", 3.1, 3.2, 3.3, 3.4, 3.5, 3.22. If you aren't sure, choose "auto", but some 3.2, 3.22 and maybe 3.4 devices may be misdetected as 3.3 (or vice-versa), so if your device does not seem to respond to commands reliably, try selecting between those protocol versions. Protocol 3.22 is a special case, that enables tinytuya's "device22" detection with protocol 3.3. Previously we let tinytuya auto-detect this, but it was found to sometimes misdetect genuine 3.3 devices as device22 which stops them receiving updates, so an explicit version was added to enable the device22 detection.

At the end of this step, an attempt is made to connect to the device and see if
it returns any data. For tuya protocol version 3.1 devices, the local key is
Expand Down
9 changes: 7 additions & 2 deletions custom_components/tuya_local/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,17 @@ def __init__(
self.__hass = hass
self._manager = manager

def update_device(self, device: CustomerDevice) -> None:
def update_device(
self,
device: CustomerDevice,
updated_status_properties: list[str] | None,
) -> None:
"""Device status has updated."""
_LOGGER.debug(
"Received update for device %s: %s",
"Received update for device %s: %s (properties %s)",
device.id,
self._manager.device_map[device.id].status,
updated_status_properties,
)

def add_device(self, device: CustomerDevice) -> None:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tuya_local/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
CONF_POLL_ONLY = "poll_only"
CONF_DEVICE_CID = "device_cid"
CONF_PROTOCOL_VERSION = "protocol_version"
API_PROTOCOL_VERSIONS = [3.3, 3.1, 3.2, 3.4, 3.5]
API_PROTOCOL_VERSIONS = [3.3, 3.1, 3.2, 3.4, 3.5, 3.22]

CONF_APP_TYPE = "tuya_app_type"
CONF_ENDPOINT = "endpoint"
Expand Down
9 changes: 8 additions & 1 deletion custom_components/tuya_local/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ async def async_inferred_type(self):

async def async_refresh(self):
_LOGGER.debug("Refreshing device state for %s", self.name)
if self.should_poll:
if not self._running:
await self._retry_on_failed_connection(
lambda: self._refresh_cached_state(),
f"Failed to refresh device state for {self.name}.",
Expand Down Expand Up @@ -680,6 +680,13 @@ async def _rotate_api_protocol_version(self):
self.name,
new_version,
)
# Only enable tinytuya's auto-detect when using 3.22
if new_version == 3.22:
new_version = 3.3
self._api.disabledetect = False
else:
self._api.disabledetect = True

await self._hass.async_add_executor_job(
self._api.set_version,
new_version,
Expand Down
7 changes: 6 additions & 1 deletion custom_components/tuya_local/devices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,14 @@ sense with one UI mode, then this is provided to handle those cases.

### `hidden`

*Optional, default=false*
*Optional, true/unavailable, default=false*

If `hidden` is `true`, then the entity will be disabled by default.
If `hidden` is `unavailable`, then the entity will be disabled by default if
the entity's `available` dp indicates it is unavailable. This may not work
correctly if the device has not returned data yet when HA checks
for this at startup.

This can be used with advanced config or diagnostic entities that general
users will not be interested in. To use such entities, the user must explicitly
enable them after adding the device to Home Assistant.
Expand Down
Loading

0 comments on commit 5425744

Please sign in to comment.