Tuya - Ivation Dehumidifier Help - Solved

I have this and added to mysmarthome app. App has full features. When it integrates with Tuya (cloud) it only comes in as a switch. Few questions…

  1. Where in github should I post the enhancement request?
  2. If I use Local Tuya, could I create my own sensors?

Here is data:

 "data": {
   "endpoint": "https://openapi.tuyaus.com",
   "auth_type": 0,
   "country_code": "1",
   "app_type": "smartlife",
   "mqtt_connected": true,
   "disabled_by": null,
   "disabled_polling": false,
   "name": "Ivation 50 Pint Energy Star Dehumidifier",
   "model": "IVADH70PW",
   "category": "cs",
   "product_id": "gywqtqpgiu74ozok",
   "product_name": "Ivation 50 Pint Energy Star Dehumidifier",
   "online": true,
   "sub": false,
   "time_zone": "-05:00",
   "active_time": "2022-09-26T20:49:21+00:00",
   "create_time": "2022-09-26T14:50:05+00:00",
   "update_time": "2022-09-26T21:59:05+00:00",
   "function": {
     "switch": {
       "type": "Boolean",
       "value": {}
     }
   },
   "status_range": {
     "switch": {
       "type": "Boolean",
       "value": {}
     }
   },
   "status": {
     "switch": true
   },
   "home_assistant": {
     "name": "Ivation 50 Pint Energy Star Dehumidifier",
     "name_by_user": null,
     "disabled": false,
     "disabled_by": null,
     "entities": [
       {
         "disabled": false,
         "disabled_by": null,
         "entity_category": null,
         "device_class": null,
         "original_device_class": "dehumidifier",
         "icon": null,
         "original_icon": null,
         "unit_of_measurement": null,
         "state": {
           "entity_id": "humidifier.ivation_50_pint_energy_star_dehumidifier",
           "state": "on",
           "attributes": {
             "min_humidity": 0,
             "max_humidity": 100,
             "device_class": "dehumidifier",
             "friendly_name": "Ivation 50 Pint Energy Star Dehumidifier",
             "supported_features": 0
           },
           "last_changed": "2022-09-27T11:24:03.420065+00:00",
           "last_updated": "2022-09-27T11:24:03.420065+00:00"
         }

I am thinking now it is on the Tuya side…

curl  --request GET "https://openapi.tuyaus.com/v1.0/iot-03/devices/20143356bcff4d1c1a97/functions" --header "sign_method: HMAC-SHA256" --header "client_id: qsp8ddmrg3ax5r4kehxj" --header "t: 1664279223348" --header "mode: cors" --header "Content-Type: application/json" --header "sign: EDF018E559FA10EB3AC84B0A01A9D16A48BB53F8971CB6843467747E068A7BF6" --header "access_token: 1119ad363dfd04e8441df63646686baa" 
{
  "result": {
    "category": "cs",
    "functions": [
      {
        "code": "switch",
        "desc": "switch",
        "name": "switch",
        "type": "Boolean",
        "values": "{}"
      }
    ]
  },
  "success": true,
  "t": 1664279223463,
  "tid": "1ab206c03e5a11ed820d56272be83099"
}

OK - Switched to LocalTuya - Looks like more data. Anyone know how I can set up sensors etc? It does not come through attributes, but these values make since (humdity setting/value, fan settings etc)

  "integration_manifest": {
    "domain": "localtuya",
    "name": "LocalTuya integration",
    "version": "4.1.0",
    "documentation": "https://github.com/rospogrigio/localtuya/",
    "dependencies": [],
    "codeowners": [
      "@rospogrigio",
      "@postlund"
    ],
    "issue_tracker": "https://github.com/rospogrigio/localtuya/issues",
    "requirements": [],
    "config_flow": true,
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "device_config": {
      "friendly_name": "Humidifier",
      "local_key": "7c5ee9d6de5ce51e",
      "host": "192.168.3.239",
      "device_id": "20143356bcff4d1c1a97",
      "protocol_version": "3.3",
      "dps_strings": [
        "1 (value: False)",
        "3 (value: 62)",
        "4 (value: 60)",
        "6 (value: 1)",
        "11 (value: 0)",
        "12 (value: 0)",
        "13 (value: 0)",
        "109 (value: 76)",
        "110 (value: False)",
        "111 (value: False)",
        "112 (value: f)",
        "113 (value: False)",
        "114 (value: 67)",
        "115 (value: False)",
        "116 (value: 3)",
        "117 (value: False)"
      ],
      "entities": [
        {
          "id": 1,
          "friendly_name": "Garage Humidifier",
          "restore_on_reconnect": false,
          "platform": "switch"
        }
      ]
    },
1 Like

Painful, but found out via this video how to add all the sensors and switches

1 Like

For those that find themselves here with the same humidifier. Local Tuya does work. The power switch come through fine as a switch. I can use the service localtuya.set_dp to set values.

This changes the set point to 55%

service: localtuya.set_dp
data:
  device_id: 20143356bcff4d1c1a97
  dp: 4
  value: 55

Follow the about video to set up entities. Here are the IDs mapped (some still TBD):

"data": {
    "device_config": {
      "friendly_name": "Dehumidifier",
      "local_key": "7c5ee9d6de5ce51e",
      "host": "192.168.3.239",
      "device_id": "20143356bcff4d1c1a97",
      "protocol_version": "3.3",
      "dps_strings": [
        "1 (value: False)",
        "3 (value: 61)",
        "4 (value: 65)",
        "6 (value: 1)",
        "11 (value: 0)",
        "12 (value: 0)",
        "13 (value: 0)",
        "109 (value: 72)",
        "110 (value: False)",
        "111 (value: False)",
        "112 (value: f)",
        "113 (value: False)",
        "114 (value: 44)",
        "115 (value: False)",
        "116 (value: 3)",
        "117 (value: False)"
      ],
      "entities": [
        {
          "id": 1,
          "friendly_name": "Power",
          "restore_on_reconnect": false,
          "platform": "switch"
        },
        {
          "id": 3,
          "friendly_name": "Humidity",
          "device_class": "humidity",
          "platform": "sensor"
        },
        {
          "id": 109,
          "friendly_name": "Temperature",
          "unit_of_measurement": "F",
          "device_class": "temperature",
          "platform": "sensor"
        },
        {
          "id": 4,
          "friendly_name": "Set Point",
          "min_value": 0.0,
          "max_value": 100.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        },
        {
          "id": 116,
          "friendly_name": "Fan",
          "min_value": 0.0,
          "max_value": 1.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        },
        {
          "id": 114,
          "friendly_name": "Coil Temp",
          "unit_of_measurement": "C",
          "device_class": "temperature",
          "platform": "sensor"
        },
        {
          "id": 110,
          "friendly_name": "110",
          "state_on": "True",
          "state_off": "False",
          "platform": "binary_sensor"
        },
        {
          "id": 111,
          "friendly_name": "111",
          "state_on": "True",
          "state_off": "False",
          "platform": "binary_sensor"
        },
        {
          "id": 113,
          "friendly_name": "113",
          "state_on": "True",
          "state_off": "False",
          "platform": "binary_sensor"
        },
        {
          "id": 115,
          "friendly_name": "115",
          "state_on": "True",
          "state_off": "False",
          "platform": "binary_sensor"
        },
        {
          "id": 117,
          "friendly_name": "117",
          "state_on": "True",
          "state_off": "False",
          "platform": "binary_sensor"
        },
        {
          "id": 6,
          "friendly_name": "6",
          "min_value": 0.0,
          "max_value": 100.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        },
        {
          "id": 11,
          "friendly_name": "11",
          "min_value": 0.0,
          "max_value": 100.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        },
        {
          "id": 12,
          "friendly_name": "12",
          "min_value": 0.0,
          "max_value": 100.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        },
        {
          "id": 13,
          "friendly_name": "13",
          "min_value": 0.0,
          "max_value": 100.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        },
        {
          "id": 112,
          "friendly_name": "113",
          "min_value": 0.0,
          "max_value": 100.0,
          "step_size": 1.0,
          "restore_on_reconnect": false,
          "platform": "number"
        }

I have the same dehumidifier and have taken all the steps you have. One problem - any time I attempt to change the setpoint through local tuya, the dehumidifier changes the setpoint to zero. I’m not sure how to further troubleshoot so if anyone has any suggestions I’m all ears.

1 Like

I have the same issue but everytime I try to change the setpoint it reverts to AU on the device itself which shows as 95% in the LocalTuya integration.
I have no idea on how to solve this as well.