Code Monkey home page Code Monkey logo

ha-tuya-ce's People

Contributors

elad-bar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ha-tuya-ce's Issues

New Device Alarm Siren

Hello, first of all congratulations for the work and the HA project, it's great. I would like to be able to use this device in HA, it is a siren or alarm, which has a temperature and humidity sensor... I did the steps to add the devices from tuyaIoT, and the values appear in the json, but I cannot download it from the CE integration of yours, an error appears on the server when downloading the diagnosis. I leave the diagnosis of the alarm, of your integration.
Thanks in advance!

"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "34",
"app_type": "smartlife",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "Alarma",
"model": "NAS-AB02W0-1",
"category": "sgbj",
"product_id": "eISESdwVoVIV3axj",
"product_name": "Siren",
"online": true,
"sub": false,
"time_zone": "+01:00",
"active_time": "2019-12-31T18:15:03+00:00",
"create_time": "2019-12-11T14:44:08+00:00",
"update_time": "2023-02-17T07:29:09+00:00",
"function": {
"Alarmtype": {
"type": "Enum",
"value": {
"range": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18"
]
}
},
"AlarmPeriod": {
"type": "Integer",
"value": {
"unit": "\u79d2",
"min": 0,
"max": 1800,
"scale": 0,
"step": 10
}
},
"AlarmSwitch": {
"type": "Boolean",
"value": {}
},
"temperature_min_set": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -20,
"max": 80,
"scale": 0,
"step": 1
}
},
"temperature_max_set": {
"type": "Integer",
"value": {
"unit": "",
"min": -20,
"max": 80,
"scale": 0,
"step": 1
}
},
"humidity_min_set": {
"type": "Integer",
"value": {
"unit": "%RH",
"min": 1,
"max": 100,
"scale": 0,
"step": 1
}
},
"humidity_max_set": {
"type": "Integer",
"value": {
"unit": "%RH",
"min": 1,
"max": 100,
"scale": 0,
"step": 1
}
},
"C_F": {
"type": "Boolean",
"value": {}
},
"temperatureswitch": {
"type": "Boolean",
"value": {}
},
"humidityswitch": {
"type": "Boolean",
"value": {}
}
},
"status_range": {
"BatteryStatus": {
"type": "Enum",
"value": {
"range": [
"0",
"1",
"2",
"3",
"4"
]
}
},
"Alarmtype": {
"type": "Enum",
"value": {
"range": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18"
]
}
},
"AlarmPeriod": {
"type": "Integer",
"value": {
"unit": "\u79d2",
"min": 0,
"max": 1800,
"scale": 0,
"step": 10
}
},
"AlarmSwitch": {
"type": "Boolean",
"value": {}
},
"temperature": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -20,
"max": 80,
"scale": 0,
"step": 1
}
},
"humidity": {
"type": "Integer",
"value": {
"unit": "%RH",
"min": 1,
"max": 100,
"scale": 0,
"step": 1
}
},
"temperature_min_set": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -20,
"max": 80,
"scale": 0,
"step": 1
}
},
"temperature_max_set": {
"type": "Integer",
"value": {
"unit": "",
"min": -20,
"max": 80,
"scale": 0,
"step": 1
}
},
"humidity_min_set": {
"type": "Integer",
"value": {
"unit": "%RH",
"min": 1,
"max": 100,
"scale": 0,
"step": 1
}
},
"humidity_max_set": {
"type": "Integer",
"value": {
"unit": "%RH",
"min": 1,
"max": 100,
"scale": 0,
"step": 1
}
},
"C_F": {
"type": "Boolean",
"value": {}
},
"temperatureswitch": {
"type": "Boolean",
"value": {}
},
"humidityswitch": {
"type": "Boolean",
"value": {}
},
"Alarm_Status": {
"type": "Enum",
"value": {
"range": [
"0",
"1",
"2",
"3",
"4",
"6",
"8",
"9",
"12"
]
}
}
},
"status": {
"BatteryStatus": 4,
"Alarmtype": 12,
"AlarmPeriod": 60,
"AlarmSwitch": false,
"temperature": 16,
"humidity": 48,
"temperature_min_set": -5,
"temperature_max_set": 40,
"humidity_min_set": 45,
"humidity_max_set": 80,
"C_F": true,
"temperatureswitch": true,
"humidityswitch": false,
"Alarm_Status": 0
},
"home_assistant": {
"name": "Alarma",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": []
}
}

The values are in the status tag of the JSON!!

New device Pir sensor

Hi, I have a motion sensor not supported by HA, I'll leave it here. greetings!

"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "34",
"app_type": "smartlife",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "PIR Sensor",
"model": "DP-WP001",
"category": "pir",
"product_id": "XFD2nSDKxFlGV5sV",
"product_name": "PIR Sensor",
"online": true,
"sub": false,
"time_zone": "+01:00",
"active_time": "2021-04-22T20:30:14+00:00",
"create_time": "2019-12-11T14:50:16+00:00",
"update_time": "2021-12-21T01:02:50+00:00",
"function": {},
"status_range": {
"PIR": {
"type": "Enum",
"value": {
"range": [
"pir"
]
}
},
"battery": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 10000,
"scale": 0,
"step": 1
}
}
},
"status": {
"PIR": "pir",
"battery": 100
},
"home_assistant": {
"name": "PIR Sensor",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": "motion",
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "binary_sensor.pir_sensor",
"state": "unavailable",
"attributes": {
"restored": true,
"device_class": "motion",
"supported_features": 0
},
"last_changed": "2023-02-17T12:34:35.045157+00:00",
"last_updated": "2023-02-17T12:34:35.045157+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": "diagnostic",
"device_class": null,
"original_device_class": null,
"icon": null,
"original_icon": null,
"unit_of_measurement": "",
"state": {
"entity_id": "sensor.pir_sensor_battery",
"state": "unavailable",
"attributes": {
"restored": true,
"state_class": "measurement",
"friendly_name": "Battery",
"supported_features": 0,
"unit_of_measurement": ""
},
"last_changed": "2023-02-17T12:34:35.045657+00:00",
"last_updated": "2023-02-17T12:34:35.045657+00:00"
}
}
]
}
}

Unsupported Device - Smart IR S18

name": "IR (Escrit\u00f3rio)",
"model": "",
"category": "wnykq",
"product_id": "pwdxov5sa0tc4jky",
"product_name": "Smart IR",
"online": false,
"sub": false,
"time_zone": "+01:00",
"active_time": "2023-04-11T11:04:18+00:00",
"create_time": "2023-04-11T11:04:18+00:00",
"update_time": "2023-04-11T11:04:49+00:00",
"function": {},
"status_range": {},
"status": {},
"home_assistant": { "name": "IR (Escrit\u00f3rio)", "name_by_user": null, "disabled": false, "disabled_by": null, "entities": []

IMG_20230412_070442.jpg

Unsupported Device Request

Hey, the latest fix got it up and running thanks! after making the changes I think we have an unsupported device with our airfryer - as the entities are still not showing up (it feels so close !) - would it be possible to get it added when you have a chance please!
The diagnostics download wont work on the CE integration but from the original TUYA integration with DP it is (abbreviated the below) :
.....

"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "44",
"app_type": "smartlife",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "T22",
"model": "T22",
"category": "kqzg",
"product_id": "egd3t0rpwfqgcttg",
"product_name": "T22",
"online": false,
"sub": false,
"time_zone": "+00:00",
"active_time": "2023-01-21T18:10:32+00:00",
"create_time": "2023-01-21T17:55:44+00:00",
"update_time": "2023-01-21T18:10:35+00:00",
"function": {
"switch": {
"type": "Boolean",
"value": {}
},
"start": {
"type": "Boolean",
"value": {}
},
"mode": {
"type": "Enum",
"value": {
"range": [
"fries",
"wings",
"steak",
"shrimp",
"fish",
"onionrings",
"pizza",
"bacon",
"cake",
"toast",
"vegetable",
"diy",
"cloud",
"default",
"warm",
"preheat"
]
}
},
"cloud_recipe_number": {
"type": "Integer",
"value": {
"min": 0,
"max": 999999,
"scale": 0,
"step": 1
}
},
"cook_temperature": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": 75,
"max": 400,
"scale": 0,
"step": 5
}
},
"appointment_time": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 240,
"scale": 0,
"step": 1
}
},
"cook_time": {
"type": "Integer",
"value": {
"unit": "min",
"min": 1,
"max": 720,
"scale": 0,
"step": 1
}
},
"multistep": {
"type": "Raw",
"value": {}
},
"pause": {
"type": "Boolean",
"value": {}
},
"temp_unit_convert": {
"type": "Enum",
"value": {
"range": [
"c",
"f"
]
}
},
"preheat": {
"type": "Boolean",
"value": {}
},
"cooking_report": {
"type": "Raw",
"value": {}
},
"warm": {
"type": "Boolean",
"value": {}
},
"mode_voice": {
"type": "Enum",
"value": {
"range": [
"fries",
"wings",
"steak",
"shrimp",
"fish",
"onionrings",
"pizza",
"bacon",
"cake",
"toast",
"vegetable",
"diy",
"cloud",
"default",
"warm",
"preheat"
]
}
}
},
"status_range": {
"switch": {
"type": "Boolean",
"value": {}
},
"start": {
"type": "Boolean",
"value": {}
},
"mode": {
"type": "Enum",
"value": {
"range": [
"fries",
"wings",
"steak",
"shrimp",
"fish",
"onionrings",
"pizza",
"bacon",
"cake",
"toast",
"vegetable",
"diy",
"cloud",
"default",
"warm",
"preheat"
]
}
},
"cloud_recipe_number": {
"type": "Integer",
"value": {
"min": 0,
"max": 999999,
"scale": 0,
"step": 1
}
},
"status": {
"type": "Enum",
"value": {
"range": [
"standby",
"appointment",
"cooking",
"done",
"warm",
"off",
"stop"
]
}
},
"cook_temperature": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": 75,
"max": 400,
"scale": 0,
"step": 5
}
},
"temp_current": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": 1,
"max": 500,
"scale": 0,
"step": 1
}
},
"appointment_time": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 240,
"scale": 0,
"step": 1
}
},
"cook_time": {
"type": "Integer",
"value": {
"unit": "min",
"min": 1,
"max": 720,
"scale": 0,
"step": 1
}
},
"remain_time": {
"type": "Integer",
"value": {
"unit": "min",
"min": 0,
"max": 720,
"scale": 0,
"step": 1
}
},
"multistep": {
"type": "Raw",
"value": {}
},
"fault": {
"type": "Bitmap",
"value": {
"label": [
"motor_fault"
],
"maxlen": 1
}
},
"pause": {
"type": "Boolean",
"value": {}
},
"temp_unit_convert": {
"type": "Enum",
"value": {
"range": [
"c",
"f"
]
}
},
"preheat": {
"type": "Boolean",
"value": {}
},
"cooking_report": {
"type": "Raw",
"value": {}
},
"warm": {
"type": "Boolean",
"value": {}
},
"cookrecord": {
"type": "String",
"value": {
"maxlen": 255
}
},
"gzt": {
"type": "Boolean",
"value": {}
},
"shake": {
"type": "Enum",
"value": {
"range": [
"0",
"1"
]
}
},
"stage_time": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 720,
"scale": 0,
"step": 1
}
},
"mode_voice": {
"type": "Enum",
"value": {
"range": [
"fries",
"wings",
"steak",
"shrimp",
"fish",
"onionrings",
"pizza",
"bacon",
"cake",
"toast",
"vegetable",
"diy",
"cloud",
"default",
"warm",
"preheat"
]
}
}
},
"status": {
"switch": false,
"start": true,
"mode": "default",
"cloud_recipe_number": 0,
"status": "off",
"cook_temperature": 175,
"temp_current": 174,
"appointment_time": 0,
"cook_time": 8,
"remain_time": 15,
"multistep": "",
"fault": 0,
"pause": true,
"temp_unit_convert": "c",
"preheat": false,
"cooking_report": "",
"warm": false,
"cookrecord": "000000001750080700",
"gzt": false,
"shake": 0,
"stage_time": 1,
"mode_voice": "fries"
},
"home_assistant": {
"name": "T22",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": []
}
}
}

New IR Device Domo-22pro

I followed the instructions to add new devices as seem that they are not supported. See below some data:

Json:
{
"name": "Domo-22pro",
"model": "IR Remote Control with T&H",
"category": "wnykq",
"product_id": "siipb1q7swavknbg",
"product_name": "Smart IR",
"online": true,
"sub": false,
"time_zone": "-03:00",
"active_time": "2023-01-23T15:59:59+00:00",
"create_time": "2023-01-23T15:59:59+00:00",
"update_time": "2023-01-25T21:50:35+00:00",
"function": {},
"status_range": {},
"status": {},
"home_assistant": {
"name": "Consultorio Julieta",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": []
}

domo22

New device - air conditioning unsupported

hi, thanks for fix tuya ce.

"data": { "endpoint": "https://openapi.tuyaeu.com", "auth_type": 0, "country_code": "39", "app_type": "smartlife", "mqtt_connected": true, "disabled_by": null, "disabled_polling": false, "name": "Air Conditioning", "model": null, "category": "infrared_ac", "product_id": "jllh2kdbGM0QTdf1", "product_name": "Air Conditioning", "online": true, "sub": true, "time_zone": "+08:00", "active_time": "2021-07-10T08:45:06+00:00", "create_time": "2021-07-10T08:45:06+00:00", "update_time": "2021-12-11T14:22:55+00:00", "function": { "F": { "type": "ENUM", "value": { "min": 0, "max": 3, "scale": 0, "step": 1, "type": "Integer" } }, "M": { "type": "ENUM", "value": { "min": 0, "max": 4, "scale": 0, "step": 1, "type": "Integer" } }, "PowerOff": { "type": "STRING", "value": "PowerOff" }, "PowerOn": { "type": "STRING", "value": "PowerOn" }, "T": { "type": "ENUM", "value": { "min": 16, "max": 30, "scale": 0, "step": 1, "type": "Integer" } } }, "status_range": { "wind": { "type": "ENUM", "value": { "min": 0, "max": 3, "scale": 0, "step": 1, "type": "Integer" } }, "mode": { "type": "ENUM", "value": { "min": 0, "max": 4, "scale": 0, "step": 1, "type": "Integer" } }, "power": { "type": "BOOLEAN", "value": {} }, "temp": { "type": "ENUM", "value": { "min": 16, "max": 30, "scale": 0, "step": 1, "type": "Integer" } } }, "status": {}, "home_assistant": { "name": "Air Conditioning", "name_by_user": null, "disabled": false, "disabled_by": null, "entities": [] }

New Tuya (Arlec) panel heater

Please add support for the Arlec 2400W Black Grid Connect Glass Panel Heater
"model": "PEH258HA PEH333HA",
"product_id": "hko3cyvbm7ps0rzi",
"product_name": "Panel Heater",

json
{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.5.4", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.11", "docker": true, "arch": "x86_64", "timezone": "Australia/Sydney", "os_name": "Linux", "os_version": "6.1.29", "supervisor": "2023.04.1", "host_os": "Home Assistant OS 10.2", "docker_version": "23.0.6", "chassis": "vm", "run_as_root": true }, "custom_components": {}, "integration_manifest": { "domain": "tuya", "name": "Tuya", "codeowners": [ "@Tuya", "@zlinoliver", "@frenck" ], "config_flow": true, "dependencies": [ "ffmpeg" ], "dhcp": [ { "macaddress": "105A17*" }, { "macaddress": "10D561*" }, { "macaddress": "1869D8*" }, { "macaddress": "381F8D*" }, { "macaddress": "508A06*" }, { "macaddress": "68572D*" }, { "macaddress": "708976*" }, { "macaddress": "7CF666*" }, { "macaddress": "84E342*" }, { "macaddress": "D4A651*" }, { "macaddress": "D81F12*" } ], "documentation": "https://www.home-assistant.io/integrations/tuya", "integration_type": "hub", "iot_class": "cloud_push", "loggers": [ "tuya_iot" ], "requirements": [ "tuya-iot-py-sdk==0.6.6" ], "is_built_in": true }, "data": { "endpoint": "https://openapi.tuyaeu.com", "auth_type": 0, "country_code": "44", "app_type": "tuyaSmart", "mqtt_connected": true, "disabled_by": null, "disabled_polling": false, "name": "Lounge Heater", "model": "PEH258HA PEH333HA", "category": "qn", "product_id": "hko3cyvbm7ps0rzi", "product_name": "Panel Heater", "online": true, "sub": false, "time_zone": "+10:00", "active_time": "2023-06-04T00:18:25+00:00", "create_time": "2023-06-04T00:18:25+00:00", "update_time": "2023-06-04T00:18:45+00:00", "function": { "Power": { "type": "Boolean", "value": {} }, "TempSet": { "type": "Integer", "value": { "unit": "\u2103", "min": 5, "max": 45, "scale": 0, "step": 1 } }, "Mode": { "type": "Enum", "value": { "range": [ "low", "high", "af" ] } }, "child_lock": { "type": "Boolean", "value": {} }, "anion": { "type": "Boolean", "value": {} }, "light": { "type": "Boolean", "value": {} }, "countdown_set": { "type": "Enum", "value": { "range": [ "cancel", "1h", "2h", "3h", "4h", "5h", "6h", "7h", "8h", "9h", "10h", "11h", "12h", "13h", "14h", "15h", "16h", "17h", "18h", "19h", "20h", "21h", "22h", "23h", "24h" ] } } }, "status_range": { "Power": { "type": "Boolean", "value": {} }, "TempSet": { "type": "Integer", "value": { "unit": "\u2103", "min": 5, "max": 45, "scale": 0, "step": 1 } }, "TempCurrent": { "type": "Integer", "value": { "unit": "\u2103", "min": 0, "max": 50, "scale": 0, "step": 1 } }, "Mode": { "type": "Enum", "value": { "range": [ "low", "high", "af" ] } }, "child_lock": { "type": "Boolean", "value": {} }, "anion": { "type": "Boolean", "value": {} }, "light": { "type": "Boolean", "value": {} }, "Fault": { "type": "Bitmap", "value": { "label": [ "1", "2", "3" ], "maxlen": 3 } }, "countdown_set": { "type": "Enum", "value": { "range": [ "cancel", "1h", "2h", "3h", "4h", "5h", "6h", "7h", "8h", "9h", "10h", "11h", "12h", "13h", "14h", "15h", "16h", "17h", "18h", "19h", "20h", "21h", "22h", "23h", "24h" ] } }, "countdown_left": { "type": "Integer", "value": { "unit": "min", "min": 0, "max": 1440, "scale": 0, "step": 1 } } }, "status": { "Power": true, "TempSet": 22, "TempCurrent": 20, "Mode": "high", "child_lock": false, "anion": true, "light": true, "Fault": 0, "countdown_set": "cancel", "countdown_left": 0 }, "home_assistant": { "name": "Lounge Heater", "name_by_user": null, "disabled": false, "disabled_by": null, "entities": [ { "disabled": false, "disabled_by": null, "entity_category": null, "device_class": null, "original_device_class": null, "icon": null, "original_icon": null, "unit_of_measurement": null, "state": { "entity_id": "climate.panel_heater", "state": "off", "attributes": { "hvac_modes": [], "min_temp": 7, "max_temp": 35, "target_temp_step": 1.0, "current_temperature": null, "friendly_name": "Lounge Heater", "supported_features": 0 }, "last_changed": "2023-06-04T01:03:54.413236+00:00", "last_updated": "2023-06-04T01:03:54.413236+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": null, "unit_of_measurement": null, "state": { "entity_id": "light.panel_heater_backlight", "state": "on", "attributes": { "supported_color_modes": [ "onoff" ], "color_mode": "onoff", "friendly_name": "Lounge Heater Backlight", "supported_features": 0 }, "last_changed": "2023-06-04T01:03:54.415106+00:00", "last_updated": "2023-06-04T01:03:54.415106+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:minus-circle-outline", "unit_of_measurement": null, "state": { "entity_id": "switch.panel_heater_ionizer", "state": "on", "attributes": { "icon": "mdi:minus-circle-outline", "friendly_name": "Lounge Heater Ionizer" }, "last_changed": "2023-06-04T01:03:54.426616+00:00", "last_updated": "2023-06-04T01:03:54.426616+00:00" } }, { "disabled": false, "disabled_by": null, "entity_category": "config", "device_class": null, "original_device_class": null, "icon": null, "original_icon": "mdi:account-lock", "unit_of_measurement": null, "state": { "entity_id": "switch.panel_heater_child_lock", "state": "unavailable", "attributes": { "restored": true, "icon": "mdi:account-lock", "friendly_name": "Child lock", "supported_features": 0 }, "last_changed": "2023-06-04T01:03:48.413072+00:00", "last_updated": "2023-06-04T01:03:48.413072+00:00" } } ] } } }

New device Infrared Controller

Hi,

I just received a new Infrared Controller: AVATTO IR Controller.
It works with smartlife and Tuya and I added two devices to control (a LG TV and Logitech Speakers)
I followed the instructions to add new devices as seem that they are not supported. See below some data:

  • IR Controller:
      {
        "name": "Smart IR",
        "model": "S16",
        "category": "wnykq",
        "product_id": "gunsafcv8acycgax",
        "product_name": "Smart IR",
        "online": true,
        "sub": false,
        "time_zone": "+01:00",
        "active_time": "2023-01-26T10:27:27+00:00",
        "create_time": "2023-01-25T18:09:27+00:00",
        "update_time": "2023-01-26T10:27:27+00:00",
        "function": {},
        "status_range": {},
        "status": {},
        "home_assistant": {
          "name": "Smart IR",
          "name_by_user": null,
          "disabled": false,
          "disabled_by": null,
          "entities": []
        }
      },

IR Controller Tuya screenshot

  • TV:
      {
        "name": "TV",
        "model": "",
        "category": "infrared_tv",
        "product_id": "000000f8np",
        "product_name": "TV",
        "online": true,
        "sub": true,
        "time_zone": "+01:00",
        "active_time": "2023-01-26T10:59:27+00:00",
        "create_time": "2023-01-26T10:59:27+00:00",
        "update_time": "2023-01-26T10:59:27+00:00",
        "function": {
          "-/--": {
            "type": "STRING",
            "value": "-/--"
          },
          "0": {
            "type": "STRING",
            "value": 0
          },
          "1": {
            "type": "STRING",
            "value": 1
          },
          "2": {
            "type": "STRING",
            "value": 2
          },
          "3": {
            "type": "STRING",
            "value": 3
          },
          "4": {
            "type": "STRING",
            "value": 4
          },
          "5": {
            "type": "STRING",
            "value": 5
          },
          "6": {
            "type": "STRING",
            "value": 6
          },
          "7": {
            "type": "STRING",
            "value": 7
          },
          "8": {
            "type": "STRING",
            "value": 8
          },
          "9": {
            "type": "STRING",
            "value": 9
          },
          "Back": {
            "type": "STRING",
            "value": "Back"
          },
          "C": {
            "type": "ENUM",
            "value": {
              "min": 1,
              "max": 999,
              "scale": 0,
              "step": 1,
              "type": "Integer"
            }
          },
          "Channel+": {
            "type": "STRING",
            "value": "Channel+"
          },
          "Channel-": {
            "type": "STRING",
            "value": "Channel-"
          },
          "Down": {
            "type": "STRING",
            "value": "Down"
          },
          "Home": {
            "type": "STRING",
            "value": "Home"
          },
          "Left": {
            "type": "STRING",
            "value": "Left"
          },
          "Menu": {
            "type": "STRING",
            "value": "Menu"
          },
          "OK": {
            "type": "STRING",
            "value": "OK"
          },
          "Power": {
            "type": "STRING",
            "value": "Power"
          },
          "Right": {
            "type": "STRING",
            "value": "Right"
          },
          "Up": {
            "type": "STRING",
            "value": "Up"
          },
          "Volume+": {
            "type": "STRING",
            "value": "Volume+"
          },
          "Volume-": {
            "type": "STRING",
            "value": "Volume-"
          }
        },
        "status_range": {},
        "status": {},
        "home_assistant": {
          "name": "TV",
          "name_by_user": null,
          "disabled": false,
          "disabled_by": null,
          "entities": []
        }
      },

TV Tuya Screenshot

  • Speakers:
      {
        "name": "sonar",
        "model": "",
        "category": "infrared_amplifier",
        "product_id": "000000f8nj",
        "product_name": "Audio",
        "online": true,
        "sub": true,
        "time_zone": "+01:00",
        "active_time": "2023-01-26T10:42:21+00:00",
        "create_time": "2023-01-25T18:17:17+00:00",
        "update_time": "2023-01-26T10:42:21+00:00",
        "function": {
          "Next": {
            "type": "STRING",
            "value": "Next"
          },
          "Pause": {
            "type": "STRING",
            "value": "Pause"
          },
          "Play": {
            "type": "STRING",
            "value": "Play"
          },
          "PowerOff": {
            "type": "STRING",
            "value": "PowerOff"
          },
          "PowerOn": {
            "type": "STRING",
            "value": "PowerOn"
          },
          "Previous": {
            "type": "STRING",
            "value": "Previous"
          },
          "Volume+": {
            "type": "STRING",
            "value": "Volume+"
          },
          "Volume-": {
            "type": "STRING",
            "value": "Volume-"
          }
        },
        "status_range": {},
        "status": {},
        "home_assistant": {
          "name": "sonar",
          "name_by_user": null,
          "disabled": false,
          "disabled_by": null,
          "entities": []
        }
      },

Speakers Tuya Screenshot

How can I add the devices?

NOTE: The IR Devices (not the controller) json does not match with the commands I have in the Smart Life Application. For example I have button named "Netflix" on the TV Remote, but it does not appear on the json. I could debug the IR Controller to detect what code (json) is sent to the Tuya IOT Api for each button, for example the last command I sent was a power-on against the TV and on the Tuya IOT Debug I can see:

  • Device Event: Publish
  • DP ID: IR send
  • Event Details:
{"control":"send_ir","head":"","key1":"14CLLEewBegLsAXoC7AHSBuwBegLsAXoC7AF6AuwBegLsAXoC7AHSBuwB0gbsAXoC7AHSBuwB0gbsAdIG7AHSBuwB0gbsAXoC7AF6AuwBegLsAdIG7AF6AuwBegLsAXoC7AF6AuwB0gbsAdIG7AHSBuwBegLsAdIG7AHSBuwB0gbsAdIG7AE5neAiCAnsAZ144CIICewBMPLgIggJ7AGdeOAiCAnsAZ14","type":0,"delay":300}

help with ir controller

I have a IR controller with temperature and humidity. I see in the json the following data, but i dont know how to use.

"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "34",
"app_type": "smartlife",
"mqtt_connected": false,
"disabled_by": null,
"disabled_polling": false,
"name": "IR Dormitorio",
"model": "S06ProWB3S\u65b0\u754c\u9762",
"category": "wnykq",
"product_id": "whs3cty93fzrqkpt",
"product_name": "Smart IR",
"online": true,
"sub": false,
"time_zone": "+01:00",
"active_time": "2023-01-24T14:48:35+00:00",
"create_time": "2023-01-24T14:48:35+00:00",
"update_time": "2023-01-24T14:48:52+00:00",
"function": {},
"status_range": {
"va_temperature": {
"type": "Integer",
"value": {
"unit": "\u2103",
"min": -200,
"max": 800,
"scale": 1,
"step": 1
}
},
"va_humidity": {
"type": "Integer",
"value": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
}
},
"status": {
"va_temperature": 160,
"va_humidity": 61,
"temp_current": 133,
"humidity_value": 67
},
"home_assistant": {
"name": "IR Dormitorio",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": []
}
}

Can someone help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.