Giter Club home page Giter Club logo

Comments (11)

make-all avatar make-all commented on July 17, 2024

I'm currently working on making it easier to add new devices as yaml file configurations.
One essential piece of information missing from your analysis is the dps id.

from tuya-local.

Securond avatar Securond commented on July 17, 2024

dps id.

dps id ? There is a Device ID:, Product ID, owner_id, uid. Where can I view "dps id"?

from tuya-local.

make-all avatar make-all commented on July 17, 2024

I don't know where you are looking, but the schema has it as "id", and in the protocol it is "dps".

from tuya-local.

Securond avatar Securond commented on July 17, 2024

This is the result of the request - {{url}}/v1. 0/devices/{{device_id}} :

{
"result": {
"active_time": 1600188918,
"biz_type": 0,
"category": "dj",
"create_time": 1599980072,
"icon": "smart/icon/ay1511658812948sYzut/128eca53fe9f9498bfa4e852b5f397e4.png",
"id": "50006075a4cf12e6d8b7",
"ip": "XXX.XXX.XXX.XXX",
"local_key": "XXXXXXXXXXXXX",
"name": "Light",
"online": true,
"owner_id": "8422602",
"product_id": "b3rzqnxq8w8dfmlc",
"product_name": "AM-WIFI-WW",
"status": [
{
"code": "scene_data_v2",
"value": ""
},
{
"code": "countdown_1",
"value": 0
},
{
"code": "switch_led",
"value": false
},
{
"code": "work_mode",
"value": "white"
},
{
"code": "control_data",
"value": ""
},
{
"code": "bright_value_v2",
"value": 1000
}
],
"sub": false,
"time_zone": "+03:00",
"uid": "eu15765748060481yeIL",
"update_time": 1600190749,
"uuid": "50006075a4cf12e6d8b7"
},
"success": true,

from tuya-local.

make-all avatar make-all commented on July 17, 2024

You seem to be using the tuya web service interface.
This component is for direct communication with tuya devices.
The web interface is used by the built in tuya component (at https://github.com/home-assistant/core)

from tuya-local.

Securond avatar Securond commented on July 17, 2024

Yes, I use the web interface, because my device is not supported by "local taya", so I wrote to You. I apologize if I explain it poorly, I translate it from Russian.

from tuya-local.

make-all avatar make-all commented on July 17, 2024

So the dps id, which is needed for mapping those fields in the web ui onto the actual device, can be found by either:

  1. Looking in the phone filesystem for the app's data directory, and finding the schema for the device in there.
  2. Using tuya-cli to query the device for its status.
    tuya-cli get --id {{device_id}} --key {{device_key}} -a
  3. If the device is using protocol version 3.1, you can eavesdrop on the first message the device sends when the app is opened. (in protocol version 3.1 the first message is unencrypted, but in version 3.3 the first message is encrypted, so you will need tuya-cli to decrypt it)

from tuya-local.

Securond avatar Securond commented on July 17, 2024

dps: { '20': false, '21': 'white', '22': 1000, '26': 0 }

This is what you need ?

from tuya-local.

Securond avatar Securond commented on July 17, 2024

Hi, is there any news on dimmer?

from tuya-local.

make-all avatar make-all commented on July 17, 2024

I am in the middle of a refactor to make adding new devices easier, and not a lot of time to spend, so it could be some time before I add any new devices.

from tuya-local.

Securond avatar Securond commented on July 17, 2024

it turned out to add a dimmer through the localtuya-homeassistant integration
https://github.com/rospogrigio/localtuya-homeassistant/

from tuya-local.

Related Issues (20)

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.