Local Tuya - Control Tuya devices locally (Fork from localtuya)

Check if it is actually functional and changes status when you activate it. In the instructions it does say select the hub (which would be WIFI) and then add the device.

I use:

You could buy any cheap Tuya GW to try it out it probably doesn’t require their own hub. Before I used Sonoff motion sensor SNZB-03 and connect it to some cheap Tuya GW it worked fine for my tests

you can also verify that your sensor isn’t BLE based by trying to re-pair it with phone Bluetooth is off.

Hi and thanks for the new fork. I have an issue that i would like to mention with version 3.4 and 3.5 i get “unknown error occured” with the below debug logs:

2025-08-16 12:32:36.147 DEBUG (MainThread) [custom_components.localtuya.config_flow] [bfc...cjo - Front LED strip] Detected DPS: {}
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 1031, in _negotiate_session_key
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 730, in exchange_quick
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 295, in wait_for
  File "/config/custom_components/localtuya/config_flow.py", line 523, in async_step_configure_device
    valid_data = await validate_input(self.localtuya_data, user_input)
  File "/config/custom_components/localtuya/config_flow.py", line 1312, in validate_input
  File "/config/custom_components/localtuya/config_flow.py", line 1225, in validate_input
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 909, in detect_available_dps
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 818, in status
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 763, in exchange
  File "/config/custom_components/localtuya/core/pytuya/__init__.py", line 1037, in _negotiate_session_key
  File "/config/custom_components/localtuya/config_flow.py", line 538, in async_step_configure_device
    except (OSError, ValueError, pytuya.DecodeError) as ex:
AttributeError: module 'custom_components.localtuya.core.pytuya' has no attribute 'DecodeError'

with version 3.3 and lower i get “Connection to device succeeded but no datapoints could be found. Please try set-up again. If problem persists, create a new issue (including debug logs).”

with these debug logs:

2025-08-16 12:32:23.942 INFO (MainThread) [custom_components.localtuya.config_flow] [bfc...cjo - Front LED strip] Connecting with protocol version: 3.3
2025-08-16 12:32:25.095 INFO (MainThread) [custom_components.localtuya.config_flow] [bfc...cjo - Front LED strip] Connected attempt to detect the device DPS
2025-08-16 12:32:26.205 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bfc...cjo] Connection lost: None

If you have zigbee co-ordinator setup on your Home Assistant, there are a number of zigbee motion detectors like the following one from Ikea:

I have the previous version from Ikea and it works well and the batteries last for some time.

Most battery operated motion sensors don’t use wifi as that would drain their batteries very quickly or if they do, the wifi is off most of the time and they only connect when motion is detected but this results in the response of the sensor to be very slow (eg. the Genio Motion Sensor).

Tuya “Dreamlight” Pixel LEDs — Decode, Headers, Defaults, and Custom Palettes (Home Assistant + LocalTuya)

Tested on both:

  • Genio RGB Pixel LED Curved Floor Lamp (FR-S1399-RGB-WF I006156)
  • Genio 30 cm Twin Bar Light (I005282)

What to use where

  • Dreamlight Music → Jazz (custom) = backlight (behind TV, reflecting off wall). Jazz respects custom band colours.
  • Dreamlight Music → Spectrum (custom) = direct-view (you see the strip). Center-out analyser. Set placeholder to 00 00 00.
  • Custom Dreamlight Scenes (dp51) = backlight. (behind TV, reflecting off wall) Smooth, non-reactive ambience.

How to send patterns in Home Assistant (LocalTuya)

LocalTuya set_dp takes only: device_id, dp, value.
Use entity_id only for light.turn_on.

Send pattern: the reliable sequence

  1. Turn the light on (brightness here, not in the body):
service: light.turn_on
data:
  entity_id: light.YOUR_ENTITY
  brightness: 180
  1. Select mode (dp: 21) — "music" or "scene":
service: localtuya.set_dp
data:
  device_id: "INSERT_YOUR_TUYA_DEVICE_ID"
  dp: 21
  value: music
  1. Wait ~300 ms (important).
  2. Send the bodydp: 52 (Music) or dp: 51 (Scene):
# Example: Music → Jazz Smooth Rainbow
service: localtuya.set_dp
data:
  device_id: "INSERT_YOUR_TUYA_DEVICE_ID"
  dp: 52
  value: AQEAAmRkAAAAZAAAZAA8ZAB4ZAC0ZADwZAEsZAAAAA==

Placement-ready examples

Music → Jazz (backlight voice mode)

service: light.turn_on
data: { entity_id: light.YOUR_ENTITY, brightness: 180 }
service: localtuya.set_dp
data: { device_id: "INSERT_YOUR_TUYA_DEVICE_ID", dp: 21, value: music }
service: localtuya.set_dp
data:
  device_id: "INSERT_YOUR_TUYA_DEVICE_ID"
  dp: 52
  value: AQEAAmRkAAAAZAAAZAA8ZAB4ZAC0ZADwZAEsZAAAAA==   # Jazz Smooth Rainbow

Music → Spectrum (direct-view; placeholder fix required)

service: light.turn_on
data: { entity_id: light.YOUR_ENTITY, brightness: 220 }
service: localtuya.set_dp
data: { device_id: "INSERT_YOUR_TUYA_DEVICE_ID", dp: 21, value: music }
service: localtuya.set_dp
data:
  device_id: "INSERT_YOUR_TUYA_DEVICE_ID"
  dp: 52
  value: AQEDEGRkAAAAZAAAZAA8ZAB4ZAC0ZADwZAEsZAAAAA==
#          └── after header, the 3-byte placeholder must be 00 00 00 → base64 "AAAA"

Scene → Follow (smooth rainbow backlight)

service: light.turn_on
data: { entity_id: light.YOUR_ENTITY, brightness: 140 }
service: localtuya.set_dp
data: { device_id: "INSERT_YOUR_TUYA_DEVICE_ID", dp: 21, value: scene }
service: localtuya.set_dp
data:
  device_id: "INSERT_YOUR_TUYA_DEVICE_ID"
  dp: 51
  value: AckIMjIAAABkAChkAFBkAHhkAKBkAMhkAPBkARhkAUBk

Decode (short and plain)

Dreamlight Music body (dp52)

[Header ×6] [Placeholder ×3] [7 bands × (Sat, Hue_hi, Hue_lo)] [optional 0x00]
  • Sat = 0–100. Hue = 0–359° (big-endian: hi, lo).

Known music headers (first 6 bytes → base64):

  • Rock 01 01 00 03 64 64AQEAA2Rk
  • Jazz 01 01 00 02 64 64AQEAAmRkuses your colours
  • Classic 01 01 00 12 64 64AQEAEmRk
  • Scroll 01 01 01 02 64 64AQEBAmRk
  • Energy 01 01 02 00 64 64AQECAGRk
  • Spectrum 01 01 03 10 64 64AQEDEGRkcenter-out analyser

Spectrum quirk (do this or colours get ignored):
The 3-byte placeholder after the header must be 00 00 00.
In base64 for Spectrum:

  • Header 01 01 03 10 64 64 = AQEDEGRk
  • Placeholder bad 01 00 00 = AQAA
  • Placeholder good 00 00 00 = AAAA

So your dp52 should start like:
AQEDEGRkAAAA… (not AQEDEGRkAQAA…)


Dreamlight Scene body (dp51)

[01 C9 <style> 32 32 00] + 9 × [Hue_hi, Hue_lo, Sat]
  • Sat = 0–100. Hue = 0–359° (big-endian).

Scene styles (header → base64):

  • Gradient 01 C9 01 32 32 00AckBMjIA
  • Follow 01 C9 08 32 32 00AckIMjIA
  • Flowing 01 C9 0A 32 32 00AckKMjIA
  • Rainbow 01 C9 0B 32 32 00AckLMjIA
  • Switch 01 C9 10 32 32 00AckQMjIA

Defaults (reference)

Music (dp52) — set dp21 to "music" then dp52

Rock     AQEAA2RkAAAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAA==
Jazz     AQEAAmRkAAAAZAAAUAB4UADwUAA8UAC0UAEsUAAAAA==
Classic  AQEAEmRkAAAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAA==
Scroll   AQEBAmRkAQAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAA==
Energy   AQECAGRkAQAAZAAAZAB4ZADwZAA8ZAC0ZAEsZA==
Spectrum AQEDEGRkAQAAZAAAZAB4ZADwZAA8ZAC0ZAEsZAAAAA==

Scene (dp51) — set dp21 to "scene" then dp51

Iceland Blue       ARUKUlLgAABkAMFhALQwALVSAMRj
Glacier Express    ARYKZGRgAABkAJJfAMZg
Sea of Clouds      ARcDXl5gAABkADgvAB5cANVFARpk
Fireworks at Sea   ARgCZGTgAABkALI5AQpkAS1kAT9k
Hut in the Snow    ARkKVFRgAABkALEsAMBk
Firefly Night      ARoDS0vgAABkAOA5AQlT
Northland          ARsDX19gAABkAK45AMRdAPlk
Grassland          ARwKWlrgAABSAJ1kAI5k
Northern Lights    AR0DUlLgAABkAK5kAKZkAMFkAMxk
Late Autumn        AR4KUlLgAABkABlkACJeACxbABRkAAxk
Dream Meteor       AUcFTU0AAABkAQNFAMFD
Early Spring       AUoIMjIAAABkAPdQAClPAQ04AKMn
Spring Outing      AUkHDg4AAABkANo3AVJBAFw3
Night Service      AUoIMjIAAABkAPdQAClPAQ04AKMn
Wind Chime         AUsJMjIAAABkAQNFAEE6ACVLAF5C
City Lights        AUwMMjIAAABkANhNAMFDAQNFAFw3
Colour Marbles     AU0NMjIAAABkAChkAF5CAMFkAP9Q
Summer Train       AU4OMjIAAABkAD5fAL5c
Christmas Eve      AU8PGRkAAABkALxkAC1OAABkAGQ8
Dream Sea          AVAQMjIAAABkAOZHAGQ8ARlNALg5
Game               AR8CX19gAABkARBkANJkAK1kAItk
Holiday            ASAKVVVgAABkAMJYAT4zAP9GAR1k
Work               ASEDPDxgAABkAL8YAQQX
Party              ASIEZGRgAABkANdcALxTADceACw/AWE/
Trend              ASMCZGRgAABkAQhLALEvAM1X
Sports             ASQKS0tgAABkALwmANZVARhkAPlN
Meditation         ASUDQ0NgAABkALc1AJtUAM1h
Dating             ASYBWVngAABkARlHAUk9AM1hACZk
Christmas          ASkCYWHgAABkAAtkANlkACtkAJFkALlk
Valentines Day     ASoBZGRgAABkARVkAQVkAUVkAS9k
Halloween          ASsDWlrgAABkAABXARZkANpkALNkAJVk
Thanksgiving Day   ASwKSEhgAABkAD1kAQxbALpJABdh
Forest Day         AS0CWVlgAABkAJxjALxiAHtg
Mother's Day       AS4DWlpgAABkAT42AQxWAR8j
Father's Day       AS8CZGTgAABkANxCALZKAOFN
Football Day       ATACXl5gAABkAABkAHhkALtk
Summer Idyll       ATMDUlJgAABkAIhQANI5APsn
Dream of the Sea   ATQDXV1gAABkAPc2ATUrAMY0AJEp
Love and Dream     ATUDUlJgAABNARJiATBd
Spring Fishing     ATYCSUlgAABkAGY8ADxJAB5k
Neon World         ATcKWlpgAABkADNYABhkAQBFAONeAKww
Dreamland          ATgCV1fgAABkAQxkARpBAUdZABVkADw4
Summer Wind        ATkDSEjgAABkAFlkALNH
Planet Journey     AToCXV3gAABNALReARxkAOhJAMZf
Spectrum Rainbow   AckLMjIAAABkAABkAChkADxkAHhkALRkAPBkAQ5kASxk
Spectrum Flowing   AckKMjIAAABkAABkAChkADxkAHhkALRkAPBkAQ5kASxk
Spectrum Follow    AckIMjIAAABkAABkAChkADxkAHhkALRkAPBkAQ5kASxk
Spectrum Gradient  AckBMjIAAABkAABkAChkADxkAHhkALRkAPBkAQ5kASxk
Spectrum Switch    AckQMjIAAABkAABkAChkADxkAHhkALRkAPBkAQ5kASxk

My custom palettes (drop-in)

Scene (dp51)

Dense Rainbow        AckIMjIAAKBkAKpkALRkAL5kAMhkANJkANxkAOZkAPBk
Pastel Rainbow       AckIMjIAAAA8AB48ADw8AFo8AHg8AJY8ALQ8ANI8APA8
Warm Ember           AckIMjIAAABkAApfABRaAB5VAChQADJLADxGADJLAChV
Ocean Teal           AckIMjIAAKBkAKpkALRkAL5kAMhkANJkANxkAOZkAPBk
Neon Synthwave       AckIMjIAASxkAUBkAVRkAABkABRkAChkADxkALRkAPBk
Theatre              AckIMjIAAAAoADwoAHgoALQoAPAoASwoAAAoADwoAHgo
Fire and Ice         AckIMjIAAABkANJkAB5kALRkADxkAJZkAFpkAHhkAABk
Smooth Rainbow       AckIMjIAAABkAChkAFBkAHhkAKBkAMhkAPBkARhkAUBk
Aurora Sweep         AckIMjIAAIJkAIxkAJZkAKBkAKpkALRkAL5kAMhkANJk
Cinematic Sunset     AckIMjIAAABkAApfABRaAB5VAChQADJLAChGABlBAAo8
Pink Peach Sunset    AckIMjIAAUpkAVRfAV5aAABVAApQABRLAB5GABRQAApa
Party Pop            AckIMjIAAABkAHhkAPBkADxkALRkASxkAB5kANJkAFpk
Forest Canopy        AckIMjIAAABkAHhkAPBkADxkALRkASxkAB5kANJkAFpk
Firestorm            AckIMjIAAABkAApfABRaAB5VAChQADJLADxGAB5QAABk
Abyssal Fade         AckIMjIAAKBkAKpfALRaAL5VAMhQANJLANxGAOY8APAy

Music – Jazz (dp52; best for backlight voice)

Smooth Rainbow Jazz   AQEAAmRkAAAAZAAAZAA8ZAB4ZAC0ZADwZAEsZAAAAA==
Warm Beat Jazz        AQEAAmRkAAAAZAAAXwAPWgAeVQAtWgAeXwAPZAAAAA==
Cool Blues Jazz       AQEAAmRkAAAARgC0SwC+UADIVQDSUADcSwDmRgDwAA==
Pastel Rainbow Jazz   AQEAAmRkAAAAMgAAMgA8MgB4MgC0MgDwMgEsMgAAAA==
Red Blue Jazz         AQEAAmRkAAAAZAAAZADwZAAAZADwZAAAZADwZAAAAA==
Cyan Teal Jazz        AQEAAmRkAAAAZAC0ZAC0ZAC0ZAC0ZAC0ZAC0ZAC0AA==
Cyan Magenta Jazz     AQEAAmRkAAAAZAC0ZADSZADwZAEOZAEsZAFKZAAAAA==
Low-sat whites Jazz   AQEAAmRkAAAACgAAFAAAHgAAKAAAHgAAFAAACgAAAA==

Music – Spectrum (dp52; direct-view; placeholder fixed)

Smooth Rainbow Spectrum   AQEDEGRkAAAAZAAAZAA8ZAB4ZAC0ZADwZAEsZAAAAA==
Warm Beat Spectrum        AQEDEGRkAAAAZAAAXwAPWgAeVQAtWgAeXwAPZAAAAA==
Cool Blues Spectrum       AQEDEGRkAAAARgC0SwC+UADIVQDSUADcSwDmRgDwAA==
Pastel Rainbow Spectrum   AQEDEGRkAAAAMgAAMgA8MgB4MgC0MgDwMgEsMgAAAA==
Red Blue Spectrum         AQEDEGRkAAAAZAAAZADwZAAAZADwZAAAZADwZAAAAA==
Cyan Teal Spectrum        AQEDEGRkAAAAZAC0ZAC0ZAC0ZAC0ZAC0ZAC0ZAC0AA==
Cyan Magenta Spectrum     AQEDEGRkAAAAZAC0ZADSZADwZAEOZAEsZAFKZAAAAA==
Low-sat whites Spectrum   AQEDEGRkAAAACgAAFAAAHgAAKAAAHgAAFAAACgAAAA==

Whites (dp24)

Warm White  002302bc03e8
Cool White  00dc000003e8

Example NodeRED Flow


Gotchas (read this)

  • Always: light.turn_ondp:21~300 ms delaydp:52/51.
  • Brightness: set with light.turn_on (not in dp51/dp52).

That’s it. Copy the YAML blocks, replace light.YOUR_ENTITY and "INSERT_YOUR_TUYA_DEVICE_ID", and you’re off.

If you have Zigbee try to avoid Tuya, in general. Or any of the Tuya rebrands, e.g. Lidls Silvercrest, Livarno etc

Look for something that follows the Zigbee standard properly, and doesn’t do it’s own custom cluster thing. There isn’t a single Tuya device that follows the standard.

My vote is for Aqara. Still relatively cheap (not as much as Tuya, but not much worse) and follows the standard fully. Don’t know if you have it in retail in Australia, but you can always order it. You guys are closer to China than we are in Europe.

Philips hue ones work really well and batteries last forever, integrate with zigbee2mqtt.

I’ve just setup this integration, but my device isn’t available in the ‘Choose device to configure’ popup. I do see my device (Sinji Robot Vacuum Gyro) in the Tuya Developer Platform under the created project. What else do I need to do to get the device into HA?

Good documentation here.

https://xzetsubou.github.io/hass-localtuya/

I’ve read the documentation, but I cannot figure out why my device isn’t discovered. The device is in the same network and subnet as my Home Assistant. According to my IoT account the device is online. What else can I do?

Have you tried entering the device manually using the IP address?

No, that’s what I’m trying to avoid using the cloud API option :slight_smile:
If I read correctly you need also the Device ID and Local Key of the device beside the IP address and that info is hard to get.

if you have an older account the free trial would of ended for you to get the local key
just make another account get your local and through the account away

I’ve managed to get the localkey via the Tuya IoT Platform (Query Device Details API call). When I’m trying to configure the device manually, I’m getting the error

Unknown error occurred

If I look into the system log I see:

Logger: aiohttp.server
Source: /usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py:481
First occurred: 08:45:58 (13 occurrences)
Last logged: 08:57:24

Error handling request from fe80::2852:8c61:7eed:3e22
Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 1268, in validate_input
    detected_dps = await interface.detect_available_dps(cid=cid)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'detect_available_dps'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 1270, in validate_input
    except (ValueError, pytuya.DecodeError) as ex:
                        ^^^^^^^^^^^^^^^^^^
AttributeError: module 'custom_components.localtuya.core.pytuya' has no attribute 'DecodeError'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 523, in async_step_configure_device
    valid_data = await validate_input(self.localtuya_data, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/config_flow.py", line 1297, in validate_input
    except (OSError, ValueError, pytuya.DecodeError) as ex:
                                 ^^^^^^^^^^^^^^^^^^
AttributeError: module 'custom_components.localtuya.core.pytuya' has no attribute 'DecodeError'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 510, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 41, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 83, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 282, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 121, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 382, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        flow, cur_step["step_id"], user_input
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 486, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/config_flow.py", line 538, in async_step_configure_device
    except (OSError, ValueError, pytuya.DecodeError) as ex:
                                 ^^^^^^^^^^^^^^^^^^
AttributeError: module 'custom_components.localtuya.core.pytuya' has no attribute 'DecodeError'

Is this something you can help me with @umu_ugg ?

I couldn’t find much details about your device however you may want to double check if your device is connected/online “locally” and the port 6668 is opened.
You can check with powershell

Test-NetConnection -ComputerName 192.168.1.102 -Port 6668

or use nmap in linux.

My result:

ComputerName           : 192.168.1.154
RemoteAddress          : 192.168.1.154
RemotePort             : 6668
InterfaceAlias         : Ethernet
SourceAddress          : 192.168.1.129
PingSucceeded          : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded       : False

It seems that port 6668 is unavailable. Is there a way to get this port available?

Not sure to be honest usually the device closes the port if there’s already max-client connected to it this is why we close Tuya APPs e.g. Smart Life before establish connection or another HA instance connected to it.

I’m not sure if the device uses different port other then the default one, never saw before such a case if so then you may need to sniff the traffic of the device while opening the Smart Life and see how they communicate.

Unfortunatelly, this is beyond my knowledge. For now I will stick to the official Tuya integration.

Has anyone integrated the Moes Smart Remote?

If so what sort of functionality does it have?

I have been using localtuya for over a year. But with the 2025.10.x updates it quit loading. and I can not figure out why. I have reverted to older versions of HA core but going back to 2025.9.4 did not change anything

Any clue as to how to debug and fix this would be appreciated.