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

Thanks. It’s working perfectly

Did anyone try to add a Tuya Zigbee gateway without any devices added on it? I’m trying to figure out whether my Lidl Silvercrest Zigbee gateway will work and I can’t add it without explicitly defining DPs 101 and 102, and when I do this, I need to choose the entity type, and there is no “gateway” or “hub” entity type. Can anyone who succesfully added a Tuya gateway give me some details about their configuration?

Add a device to you hub ! through the app

I’m trying to set this up but am stuck.
My device is being found by the integration and I do have the device ID & local key but I keep getting:

Try to change Theme, to default (dark/light)( Just during the setup !)
Is it your first device ?, do you have your devices in iot.tuya ?

1 Like

Hi, I changed the theme to HA default but still the same error.

I was using rospogrigio (which was working) his version but since it has not been upgraded for some time I wanted to switch over because HA was giving warnings for this integration.

As the error shows the device doesn’t return any status. What is this device you’re trying to set-up?

A bulb, filament, white & warm white

Check the DM

edit: another thing that I forgot to mention that if your device is connected to another local integration including the Smart Life and Tuya APPs the device may not return any status. so ensure the apps is closed when you connect to the device.

2 Likes

I have 40 Tuya devices in the "“Brilliant Smart” app. Tuya integration references only the official Tuya app and the install process fails with the scan QR code in the smart brilliant app so there must be some differences to the official Tuya app. Should I reset my devices and rediscover them in the official Tuya app which will take me ages or is there a better way to get them into HA from the Smart Brilliant app?

Hey there. I was wondering if there is a possibility to change from RGB to RBG? I am using the Tuya LED controller on an old strip at it seems that the cable configuration doesn’t match. I’ve seen that this is possible in the Magic Home Integration but I have’t seen anything like it with Tuya. Thanks in advance :slight_smile:

@umu_ugg :

Did you see this Pull Request on the forked Git, maybe you can get in contact with the Author and integrate it into your Release.

It adds Support for Ledvance and other vendors into localtuya, would be nice to have it in this fork too

@avataar / @umu_ugg : Maybe you two should get in Contact :wink:

1 Like

Never heard off “Brilliant Smart App”, but have you “added/binded” this app to your iot.tuya dev-account ?

Just finished migration 12 Tuya devices to this local implementation. Excellent performance so far. Thank you.

1 Like

Hya,

regarding the local tuya, i have two questions:

  • is it necessary to have a tuya account?
  • how do i add the tuya devices to the local tuya without having a tuya cloud account?

Thx in advance.

Im Pretty sure this is explained among the Post here and other Local_Tuya Topics
However

  1. NO
  2. Read the Docs
    Add new devices - Localtuya

Which btw is linked to on the page you initially used to install the integration :wink:

BR

1 Like

Thx,

after adding, is it necessary to keep the tuya cloud connection, can i delete the tuya account, and have the system running without internet access?

Depends on which Tuya Account you refers to, You have an Account in the App You initially used to “pair” your devices to i.e get it into Your Wifi/-Network, Im think you would still like to keep this, or you feel your are done eternally adding Tuya Device to your Network, or have other ways/apps to add these, new or resetted Devices ?

Yes that would work eternally internally :slight_smile:
PS: Block Your Device(from internet access) in your Router, just in case they have/want to live their own life, and don’t “snap up” a forsed-push-update(if such exist for specific Devices/Brands)
And if they have a HA-Auto-Update_entity associated with a Device, Disable it as-well

1 Like

Hi, I recently switched to this fork after saw the rospogrigio/localtuya: local handling for Tuya devices (github.com) is not being maintained for quite sometime. Specifically for using Tuya Zigbee devices connected to Zemismart M1 hub.

But the question I have is about a Tuya Wifi Heater (2400W Glass Panel Heater), it works fine when using Tuya cloud integeration as well as using rospogrigio/localtuya but when using this fork, only countdown is added to the UI.

I have tried adding the DPS manually as well as reconfiguring, it seems from the diagnostics log that they are being added, but never show up in the UI.

  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Australia/Sydney",
    "os_name": "Linux",
    "os_version": "6.6.25-haos",
    "supervisor": "2024.04.0",
    "host_os": "Home Assistant OS 12.2",
    "docker_version": "25.0.5",
    "chassis": "vm",
    "run_as_root": true
  },
  "integration_manifest": {
    "domain": "localtuya",
    "name": "Local Tuya",
    "codeowners": [],
    "config_flow": true,
    "dependencies": [],
    "documentation": "https://github.com/xZetsubou/hass-localtuya/",
    "integration_type": "hub",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/xZetsubou/hass-localtuya/issues",
    "requirements": [],
    "version": "3.2.5.2",
    "is_built_in": false
  },
  "data": {
    "device_config": {
      "friendly_name": "Nav Panel Heater",
      "host": "10.0.2.157",
      "local_key": "............",
      "protocol_version": "3.3",
      "enable_debug": false,
      "manual_dps_strings": "1,2,3,4,5,6,10,11,12,101,102,103",
      "entities": [
        {
          "friendly_name": "Set Countdown",
          "entity_category": "None",
          "select_options": {
            "1": "1 Hour",
            "2": "2 Hours",
            "3": "3 Hours",
            "4": "4 Hours",
            "5": "5 Hours",
            "6": "6 Hours",
            "cancel": "Disable"
          },
          "restore_on_reconnect": true,
          "is_passive_entity": false,
          "id": "11",
          "platform": "select",
          "icon": "mdi:timer-cog-outline"
        },
        {
          "friendly_name": "Nav Panel Heater Climate",
          "entity_category": "None",
          "target_temperature_dp": "2",
          "temperature_step": "1",
          "min_temperature": 5.0,
          "max_temperature": 113.0,
          "precision": "0.1",
          "target_precision": "1",
          "hvac_mode_set": {
            "off": "off",
            "heat": "hot"
          },
          "hvac_action_set": {
            "heating": "heating",
            "idle": "warming"
          },
          "preset_dp": "4",
          "preset_set": "auto/smart",
          "fan_speed_list": "low,high",
          "current_temperature_dp": "3",
          "eco_dp": "5",
          "eco_value": "False",
          "fan_speed_dp": "4",
          "temperature_unit": "celsius",
          "id": "103",
          "platform": "climate",
          "icon": ""
        },
        {
          "friendly_name": "Nav Panel Heater Switch",
          "entity_category": "config",
          "restore_on_reconnect": false,
          "is_passive_entity": false,
          "id": "1",
          "platform": "switch",
          "icon": ""
        },
        {
          "friendly_name": "Nav Panel Heater Climate",
          "entity_category": "config",
          "target_temperature_dp": "2",
          "current_temperature_dp": "3",
          "temperature_step": "1",
          "min_temperature": 7.0,
          "max_temperature": 35.0,
          "precision": "0.1",
          "target_precision": "0.1",
          "hvac_mode_set": {
            "off": false,
            "auto": "auto",
            "cool": "cold",
            "heat": "hot",
            "heat_cool": "heat",
            "dry": "wet",
            "fan_only": "wind"
          },
          "hvac_action_set": {
            "heating": "opened",
            "idle": "closed"
          },
          "eco_dp": "5",
          "eco_value": "False",
          "preset_set": {},
          "fan_speed_dp": "4",
          "fan_speed_list": "low,high",
          "temperature_unit": "celsius",
          "id": "3",
          "platform": "climate",
          "icon": ""
        }
      ],
      "model": "2400W Glass Panel Heater-Black",
      "product_key": "ijivuwpiraq4mkdz",
      "device_id": "52016624f4cfa2cdf36c",
      "node_id": null,
      "dps_strings": [
        "1 ( code: switch , value: True )",
        "2 ( code: temp_set , value: 20 )",
        "3 ( code: TempCurrent , value: 19 )",
        "4 ( code: Mode , value: low )",
        "5 ( code: ECO , value: False )",
        "6 ( code: ChildLock , value: False )",
        "10 ( code: Timer , value: 0 )",
        "11 ( code: Countdown , value: 0 )",
        "12 ( code: Fault , value: 0 )",
        "101 ( code: heat , value: False )",
        "102 ( code: sleep , value: True )",
        "103 ( code: switch , value: C )"
      ]
    },
    "device_cloud_info": {
      "active_time": 1659499382,
      "biz_type": 0,
      "category": "qn",
      "create_time": 1614725856,
      "icon": "smart/icon/1541578296zqm3146n9lm_0.jpg",
      "id": "52016624f4cfa2cdf36c",
      "ip": "1...2",
      "lat": "",
      "local_key": ".........",
      "lon": "",
      "model": "KASGSHT24BA",
      "name": "Nav Panel Heater",
      "online": true,
      "owner_id": "123123123",
      "product_id": "ijivuwpiraq4mkdz",
      "product_name": "2400W Glass Panel Heater-Black",
      "status": [
        {
          "code": "switch",
          "value": false
        },
        {
          "code": "temp_set",
          "value": 20
        },
        {
          "code": "temp_current",
          "value": 18
        }
      ],
      "sub": false,
      "time_zone": "+10:00",
      "uid": "eu1...7mw",
      "update_time": 1713439737,
      "uuid": "5201.....df36c",
      "dps_data": {
        "1": {
          "code": "switch",
          "custom_name": "",
          "dp_id": 1,
          "time": 1714093649336,
          "value": false,
          "type": "Boolean",
          "values": "{\"type\": \"bool\"}",
          "id": 1,
          "accessMode": "rw"
        },
        "2": {
          "code": "temp_set",
          "custom_name": "",
          "dp_id": 2,
          "time": 1714091207165,
          "value": 20,
          "type": "Integer",
          "values": "{\"type\": \"value\", \"max\": 113, \"min\": 5, \"scale\": 0, \"step\": 1, \"unit\": \"\u2103/\u2109\"}",
          "id": 2,
          "accessMode": "rw"
        },
        "3": {
          "code": "TempCurrent",
          "custom_name": "",
          "dp_id": 3,
          "time": 1714094023062,
          "value": 18,
          "id": 3,
          "accessMode": "ro",
          "values": "{\"type\": \"value\", \"max\": 176, \"min\": -9, \"scale\": 0, \"step\": 1, \"unit\": \"\u2103\"}"
        },
        "4": {
          "code": "Mode",
          "custom_name": "",
          "dp_id": 4,
          "time": 1714090466702,
          "value": "low",
          "id": 4,
          "accessMode": "rw",
          "values": "{\"type\": \"enum\", \"range\": [\"high\", \"low\"]}"
        },
        "5": {
          "code": "ECO",
          "custom_name": "",
          "dp_id": 5,
          "time": 1711980238431,
          "value": false,
          "id": 5,
          "accessMode": "rw",
          "values": "{\"type\": \"bool\"}"
        },
        "6": {
          "code": "ChildLock",
          "custom_name": "",
          "dp_id": 6,
          "time": 1711980238431,
          "value": false,
          "id": 6,
          "accessMode": "rw",
          "values": "{\"type\": \"bool\"}"
        },
        "10": {
          "code": "Timer",
          "custom_name": "",
          "dp_id": 10,
          "time": 1711980238431,
          "value": "0",
          "id": 10,
          "accessMode": "rw",
          "values": "{\"type\": \"enum\", \"range\": [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\", \"21\", \"22\", \"23\", \"24\"]}"
        },
        "11": {
          "code": "Countdown",
          "custom_name": "",
          "dp_id": 11,
          "time": 1714108710523,
          "value": 0,
          "id": 11,
          "accessMode": "ro",
          "values": "{\"type\": \"value\", \"max\": 1440, \"min\": 0, \"scale\": 0, \"step\": 1, \"unit\": \"\u5206\u949f\"}"
        },
        "12": {
          "code": "Fault",
          "custom_name": "",
          "dp_id": 12,
          "time": 1711980238431,
          "value": 0,
          "id": 12,
          "accessMode": "ro",
          "values": "{\"type\": \"bitmap\", \"label\": [\"1\", \"2\"], \"maxlen\": 2}"
        },
        "101": {
          "code": "heat",
          "custom_name": "",
          "dp_id": 101,
          "time": 1714091386144,
          "value": false,
          "id": 101,
          "accessMode": "ro",
          "values": "{\"type\": \"bool\"}"
        },
        "102": {
          "code": "sleep",
          "custom_name": "",
          "dp_id": 102,
          "time": 1714093638426,
          "value": false,
          "id": 102,
          "accessMode": "rw",
          "values": "{\"type\": \"bool\"}"
        },
        "103": {
          "code": "switch",
          "custom_name": "",
          "dp_id": 103,
          "time": 1711980238431,
          "value": "C",
          "id": 103,
          "accessMode": "rw",
          "values": "{\"type\": \"enum\", \"range\": [\"C\", \"F\"]}"
        }
      }
    }
  }
}

Any ideas what I could be doing wrong and how to get the normal climate card for the device?

Thanks!
Mannu

It’s probably because I forgot to remove old preset_set formatting in auto configure feature, this probably raised unexpected error.
you can go to LocalTuya → Configure → choose reconfigure device → select the climate → click submit to proceed to “climate entity configuration” On the option (Optional) Presets delete auto/smart

1 Like