rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.82k stars 543 forks source link

Too difficult to enter DP values #751

Open Curbi69 opened 2 years ago

Curbi69 commented 2 years ago

dear local tuya,

I love the project but it's a pain to find info about what id to use. I have tried to get id info with the API system of IOT tuya site but with no success.

I would love to know how I find all the needed ids for muy light to change color temp brightness etc

please help me!

SaSa1983 commented 2 years ago

It would be easier if the "code" would be used in the dropdown box, e.g. "temp_current" for current temperature

Curbi69 commented 2 years ago

It would be easier if the "code" would be used in the dropdown box,

e.g. "temp_current" for current temperature

What do you mean? Do you have any lights working with local tuya? And are you able to change brightness and warm white, white or any rgb color

slurpey commented 2 years ago

Just adding here. I litterally freeze in fear on the "fill out the details of an entity with type light".
You do realize there is more than one trillion combinaison possible... Is there a place that says For Lightbulb yyz - the settings are brightness xyz, color temp yxz, brightness value X, etc etc... I mean where do I find the info about this? Is it in the tuya iot platform?

Curbi69 commented 2 years ago

I fixed it, you go to IOT developers tuya site and make sure you have the right api’s hooked up to your device, go to device specifications and paste the id of your device. It will show a ton of options like min bright 25 max 255 or min 0 max 1000 most likely it are one of the two. Also my lamps hat the value colour or white as data. So i figured out that that was the colour mode. And what i did is all the lights on 0 brightness and dull white colour. Which made a value appear 1000 and 0 after a while every lamp went easy for me since i have the same manufacture for all the lights. If you need help post some screens i will get you through it

On Tue, 22 Feb 2022 at 10:54, slurpey @.***> wrote:

Just adding here. I litterally freeze in fear on the "fill out the details of an entity with type light". You do realize there is more than one trillion combinaison possible... Is there a place that says For Lightbulb yyz - the settings are brightness xyz, color temp yxz, brightness value X, etc etc... I mean where do I find the info about this? Is it in the tuya iot platform?

— Reply to this email directly, view it on GitHub https://github.com/rospogrigio/localtuya/issues/751#issuecomment-1047616255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXGPJO23U622F4ED5JINLEDU4NMMJANCNFSM5ORJ35JQ . You are receiving this because you authored the thread.Message ID: @.***>

-- Met vriendelijke groet,

Beau Nolten

slurpey commented 2 years ago

Hi, thanks. I somewhat got it working but it's more by trying than figuring it out. Example - a Calex lightbulb "warm yellow filament" which doesn't do color.

{ "result": { "category": "dj", "functions": [ { "code": "switch_led", "desc": "{}", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "work_mode", "desc": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}", "name": "工作模式", "type": "Enum", "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}" }, { "code": "bright_value_v2", "desc": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}", "name": "亮度", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "temp_value_v2", "desc": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}", "name": "色温", "type": "Integer", "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "scene_data_v2", "desc": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}", "name": "场景模式值", "type": "Json", "values": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}" }, { "code": "countdown_1", "desc": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}", "name": "倒计时", "type": "Integer", "values": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "control_data", "desc": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}", "name": "调节模式值", "type": "Json", "values": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}" }, { "code": "rhythm_mode", "desc": "{\"maxlen\":255}", "name": "生物节律", "type": "Raw", "values": "{\"maxlen\":255}" }, { "code": "sleep_mode", "desc": "{\"maxlen\":255}", "name": "入睡", "type": "Raw", "values": "{\"maxlen\":255}" }, { "code": "wakeup_mode", "desc": "{\"maxlen\":255}", "name": "唤醒", "type": "Raw", "values": "{\"maxlen\":255}" } ], "status": [ { "code": "switch_led", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "work_mode", "name": "模式", "type": "Enum", "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}" }, { "code": "bright_value_v2", "name": "亮度", "type": "Integer", "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "temp_value_v2", "name": "冷暖", "type": "Integer", "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}" }, { "code": "scene_data_v2", "name": "情景模式", "type": "Json", "values": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}" }, { "code": "countdown_1", "name": "倒计时", "type": "Integer", "values": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "control_data", "name": "调节控制", "type": "Json", "values": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}" }, { "code": "rhythm_mode", "name": "生物节律", "type": "Raw", "values": "{\"maxlen\":\"255\"}" }, { "code": "sleep_mode", "name": "入睡", "type": "Raw", "values": "{\"maxlen\":\"255\"}" }, { "code": "wakeup_mode", "name": "唤醒", "type": "Raw", "values": "{\"maxlen\":\"255\"}" } ] }, "success": true, "t": 1645698414695, "tid": "49a23ca6955c11ecbb98e27998b8fa5d" }

image

I managed to make it work but for example, I coudn't match any brightness vlaue in the drop downs - matched to tuya. I could only see "bright_value_v2" and nothing had "v2" anywhere.

I'm good for the time being. Thanks for the help btw.

CloCkWeRX commented 2 years ago

you go to IOT developers tuya site

Want to do a pull request to add a link, opening in a new tab, to that setup UI? Seems like it would be very helpful for many.

CloCkWeRX commented 2 years ago

A second resource that might be of use for some devices: https://github.com/make-all/tuya-local/tree/main/custom_components/tuya_local/devices

CloCkWeRX commented 2 years ago

Duplicate of #93