Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with configuration, #1010

Closed
bkbartk opened this issue Sep 1, 2022 · 11 comments
Closed

Help with configuration, #1010

bkbartk opened this issue Sep 1, 2022 · 11 comments

Comments

@bkbartk
Copy link

bkbartk commented Sep 1, 2022

Hello,

I think it might be my issue, but I can't figure how to configure my device the correct way.
When I try to add mij vacuum cleaner, I end up with 18 fields I have to fill out.
some fields give a hint, like (usually 27) but those Id's are never available.

How or where can I find the correct configuration for my device? At the moment Play and Pause are working, but that's more luck then doing anything smart.

@BrettEBowman
Copy link

Forgive me if I'm missing something--I have tried to read through all of the documentation here, etc.

Is there anything currently in this integration to use the Product Name value from the Tuya IoT Platform (i.e. "Smart Ceiling Fan Switch-DS02F") and "look up" the set of DPS settings for that device type from a list of known DPS settings for that device?

And/of have a method when manually adding a device to select a specific device type (i.e. "Smart Ceiling Fan Switch-DS02F") and use the known DPS settings for that device.

Ideally, the project would include a set of these known DPS mappings. But, even allowing the user to maintain their own local mapping would be a big improvement. This is especially true when adding in several instances of the same device type. Having to go through the Config Flow manually specifying all of the DPS mappings over and over is tedious and error prone.

@steveharm
Copy link

you can get that info from the device_id to get all the dps

@bkbartk
Copy link
Author

bkbartk commented Sep 10, 2022

you can get that info from the device_id to get all the dps

how?

@steveharm
Copy link

you can get that info from the device_id to get all the dps

how?
PM me your device_id and I'll get it for you

@bkbartk
Copy link
Author

bkbartk commented Sep 10, 2022

Sorry, For as far as I can see I can't PM you on github.
But my device ID is: bfe088d621ce5b69616olc
And my product is: MEDION Robot S20 SW
If it's easy to write a small manual for this others might benefit form this as well.

@steveharm
Copy link

I'm getting permission denied on that one... prob cause its not attached to my account.
Open Tuya iot explorer, in the menu click on Smart Home Device System and then on the one right at the bottom, Get Device Specification Attribute.
Make sure it's the last one as there is two that are named almost the same.

@bkbartk
Copy link
Author

bkbartk commented Sep 10, 2022

the interface is a little bit different, but this leaves me with a json

{
  "result": {
    "category": "sd",
    "functions": [
      {
        "code": "power",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "reset_edge_brush",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "cistern",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ],
    "status": [
      {
        "code": "power",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "status",
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"spot_clean\",\"smart_clean\",\"goto_charge\",\"wall_clean\",\"sleep\",\"charging\",\"charge_done\",\"paused\",\"cleaning\",\"mop_clean\"]}"
      },
      {
        "code": "electricity_left",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "edge_brush",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "reset_edge_brush",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "clean_record",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "clean_area",
        "type": "Integer",
        "values": "{\"unit\":\"㎡\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "clean_time",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "fault",
        "type": "Bitmap",
        "values": "{\"label\":[\"edge_sweep\",\"middle_sweep\",\"left_wheel\",\"right_wheel\",\"garbage_box\",\"land_check\",\"collision\"]}"
      },
      {
        "code": "cistern",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ]
  },
  "success": true,
  "t": 1662837034900,
  "tid": "3f55734f313c11eda46fb2fb74abf71f"
}

but I still have no idea how to map this in the dps options
image

@steveharm
Copy link

Did you select the right one Get Device Specification Attribute
There is two that looks the same, use the bottom one

@bkbartk
Copy link
Author

bkbartk commented Sep 10, 2022

thanks,
that helps, now I have DP_ID

{
  "result": {
    "category": "sd",
    "functions": [
      {
        "code": "power",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "dp_id": 2,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "dp_id": 3,
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "dp_id": 4,
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "reset_edge_brush",
        "dp_id": 10,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "dp_id": 12,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "dp_id": 13,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "dp_id": 14,
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "cistern",
        "dp_id": 20,
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ],
    "status": [
      {
        "code": "power",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "power_go",
        "dp_id": 2,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "mode",
        "dp_id": 3,
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"random\",\"spiral\",\"smart\",\"chargego\",\"wall_follow\"]}"
      },
      {
        "code": "direction_control",
        "dp_id": 4,
        "type": "Enum",
        "values": "{\"range\":[\"forward\",\"backward\",\"turn_left\",\"turn_right\",\"stop\"]}"
      },
      {
        "code": "status",
        "dp_id": 5,
        "type": "Enum",
        "values": "{\"range\":[\"standby\",\"spot_clean\",\"smart_clean\",\"goto_charge\",\"wall_clean\",\"sleep\",\"charging\",\"charge_done\",\"paused\",\"cleaning\",\"mop_clean\"]}"
      },
      {
        "code": "electricity_left",
        "dp_id": 6,
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "edge_brush",
        "dp_id": 7,
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter",
        "dp_id": 9,
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "reset_edge_brush",
        "dp_id": 10,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "reset_filter",
        "dp_id": 12,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "seek",
        "dp_id": 13,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "suction",
        "dp_id": 14,
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"strong\"]}"
      },
      {
        "code": "clean_record",
        "dp_id": 15,
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "clean_area",
        "dp_id": 16,
        "type": "Integer",
        "values": "{\"unit\":\"㎡\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "clean_time",
        "dp_id": 17,
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":9999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "fault",
        "dp_id": 18,
        "type": "Bitmap",
        "values": "{\"label\":[\"edge_sweep\",\"middle_sweep\",\"left_wheel\",\"right_wheel\",\"garbage_box\",\"land_check\",\"collision\"]}"
      },
      {
        "code": "cistern",
        "dp_id": 20,
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      }
    ]
  },
  "success": true,
  "t": 1662838910147,
  "tid": "9d102da9314011edb64a36c8b9acae9e"
}

The differnce is in the additional s Attribute(S), where I failed.
Still Somehow I have a different interface than you have as the button isn't on the right.
I now tried to map commands as good as I can.

It would be nice if this call is included in the implementation, however this would probably mean extensive knowledge about a whole range of devices.

@bkbartk
Copy link
Author

bkbartk commented Sep 10, 2022

1 comment,
after mapping, my entities are gone
image
so I missed something I think.
[edit:]
this looks like a bug, as soon as I edit something the entity is gone, If I fill all data while adding the device (almost) all works,
I think I still need to finetune but it's hard having this bug.

@Dweinbach
Copy link

Can anyone provide an update on what the current way to get the "Get Device Specification Attribute" values is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants