JeffSteinbok / hass-dreo

Dreo Smart Device Integration for Home Assistant
MIT License
118 stars 34 forks source link

Support request for Air Purifier Tower Fan MC710S #101

Closed Rixonline closed 3 weeks ago

Rixonline commented 4 months ago

Super new here and to HA, but I'm replacing all my old vornado's with these and wondered if it was possible in some way to control these via HA? even just basic commands to start with? Thanks!

Dreo Air Purifier Tower Fan MC710S

dangizzi commented 3 months ago

Any support for this model?

JeffSteinbok commented 1 month ago

Probably yes, see the instructions; need some log files.

garrettpauls commented 3 weeks ago

I'm looking for support for this model as well, although looking at the API responses it seems to be reporting as DR-HTF010S which is already listed as supported. I suspect the reason it's not working is #179 as I get that error as well. (Since it seems this model is already supported I didn't include the usually asked for info, let me know if you want that and I'll get it for you.)

For good measure, here's the API response from my logs:

  {
    "code": 0,
    "msg": "OK",
    "data": {
      "currentPage": 1,
      "pageSize": 100,
      "totalNum": 1,
      "totalPage": 1,
      "familyRooms": null,
      "list": [
        {
          "deviceId": "1831725512778641410",
          "sn": "1686295018394431489-67da8690ab924408:001:0000000000s",
          "brand": "Dreo",
          "model": "DR-HTF010S",
          "productId": "1686295018394431489",
          "productName": "Purifier Tower Fan",
          "deviceName": "Purifier Tower Fan",
          "shared": false,
          "series": null,
          "seriesName": "MC710S",
          "type": 0,
          "owner": true,
          "familyId": null,
          "familyName": null,
          "roomId": null,
          "roomName": null,
          "roomNameI18Key": "",
          "color": "s",
          "controlsConf": {
            "template": "DR-HTF010S",
            "lottie": {
              "key": "appUseMode",
              "frames": [
                {
                  "value": 0,
                  "frame": [
                    0
                  ]
                },
                {
                  "value": 1,
                  "frame": [
                    2
                  ]
                },
                {
                  "value": 2,
                  "frame": [
                    10
                  ]
                },
                {
                  "value": 3,
                  "frame": [
                    18
                  ]
                }
              ]
            },
            "schedule": {
              "duration": [
                {
                  "text": "schedule_control_turnoff_never",
                  "time": 0,
                  "desc": "schedule_control_turnoff_never_desc"
                },
                {
                  "text": "schedule_control_turnoff_30min",
                  "time": 1800,
                  "desc": "schedule_control_turnoff_30min_desc"
                },
                {
                  "text": "schedule_control_turnoff_1h",
                  "time": 3600,
                  "desc": "schedule_control_turnoff_1h_desc"
                },
                {
                  "text": "schedule_control_turnoff_2h",
                  "time": 7200,
                  "desc": "schedule_control_turnoff_2h_desc"
                },
                {
                  "text": "schedule_control_turnoff_4h",
                  "time": 14400,
                  "desc": "schedule_control_turnoff_4h_desc"
                },
                {
                  "text": "schedule_control_turnoff_6h",
                  "time": 21600,
                  "desc": "schedule_control_turnoff_6h_desc"
                },
                {
                  "text": "schedule_control_turnoff_8h",
                  "time": 28800,
                  "desc": "schedule_control_turnoff_8h_desc"
                }
              ],
              "modes": [
                {
                  "controls": [
                    {
                      "groupId": 0,
                      "type": 3,
                      "title": "fan_2in1_purification",
                      "items": [
                        {
                          "valueType": 1,
                          "isSelected": true,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "device_control_mode_auto",
                          "value": 255
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv1",
                          "value": 1
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv2",
                          "value": 2
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv3",
                          "value": 3
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_off",
                          "value": 0
                        }
                      ]
                    },
                    {
                      "endValue": 12,
                      "endColor": "#0051CF",
                      "valueType": 1,
                      "groupId": 0,
                      "icon": "ic_sch_wind_speed",
                      "isSelected": false,
                      "cmd": [
                        "windlevel"
                      ],
                      "startValue": 1,
                      "type": 0,
                      "title": "device_control_mode_manual_level",
                      "value": 9,
                      "startColor": "#0051CF"
                    }
                  ],
                  "valueType": 1,
                  "icon": "ic_normal_wind_color",
                  "isSelected": true,
                  "attention": [
                    "mode",
                    "windlevel",
                    "poweron",
                    "purifylevel",
                    "oscon",
                    "hoscangle"
                  ],
                  "cmd": "mode",
                  "title": "device_fans_mode_straight",
                  "value": 1
                },
                {
                  "controls": [
                    {
                      "groupId": 0,
                      "type": 3,
                      "title": "fan_2in1_purification",
                      "items": [
                        {
                          "valueType": 1,
                          "isSelected": true,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "device_control_mode_auto",
                          "value": 255
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv1",
                          "value": 1
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv2",
                          "value": 2
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv3",
                          "value": 3
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_off",
                          "value": 0
                        }
                      ]
                    },
                    {
                      "endValue": 12,
                      "endColor": "#0051CF",
                      "valueType": 1,
                      "groupId": 0,
                      "icon": "ic_sch_wind_speed",
                      "isSelected": false,
                      "cmd": [
                        "windlevel"
                      ],
                      "startValue": 1,
                      "type": 0,
                      "title": "device_control_mode_manual_level",
                      "value": 9,
                      "startColor": "#0051CF"
                    }
                  ],
                  "valueType": 1,
                  "icon": "ic_auto_wind_color",
                  "isSelected": false,
                  "attention": [
                    "mode",
                    "windlevel",
                    "poweron",
                    "purifylevel",
                    "oscon",
                    "hoscangle"
                  ],
                  "cmd": "mode",
                  "title": "device_fans_mode_auto",
                  "value": 2
                },
                {
                  "controls": [
                    {
                      "groupId": 0,
                      "type": 3,
                      "title": "fan_2in1_purification",
                      "items": [
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "device_control_mode_auto",
                          "value": 255
                        },
                        {
                          "valueType": 1,
                          "isSelected": true,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv1",
                          "value": 1
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv2",
                          "value": 2
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv3",
                          "value": 3
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_off",
                          "value": 0
                        }
                      ]
                    },
                    {
                      "endValue": 12,
                      "endColor": "#0051CF",
                      "valueType": 1,
                      "groupId": 0,
                      "isSelected": false,
                      "icon": "ic_sch_wind_speed",
                      "cmd": [
                        "windlevel"
                      ],
                      "startValue": 1,
                      "type": 0,
                      "title": "device_control_mode_manual_level",
                      "value": 9,
                      "startColor": "#0051CF"
                    }
                  ],
                  "valueType": 1,
                  "icon": "ic_sleep_wind_color",
                  "isSelected": false,
                  "attention": [
                    "mode",
                    "windlevel",
                    "poweron",
                    "purifylevel",
                    "oscon",
                    "hoscangle"
                  ],
                  "cmd": "mode",
                  "title": "device_fans_mode_sleep",
                  "value": 3
                },
                {
                  "controls": [
                    {
                      "groupId": 0,
                      "type": 3,
                      "title": "fan_2in1_purification",
                      "items": [
                        {
                          "valueType": 1,
                          "isSelected": true,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "device_control_mode_auto",
                          "value": 255
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv1",
                          "value": 1
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv2",
                          "value": 2
                        },
                        {
                          "valueType": 1,
                          "isSelected": false,
                          "cmd": [
                            "purifylevel"
                          ],
                          "title": "base_lv3",
                          "value": 3
                        }
                      ]
                    }
                  ],
                  "valueType": 1,
                  "icon": "ic_purify_wind_color",
                  "isSelected": false,
                  "attention": [
                    "mode",
                    "poweron",
                    "purifylevel",
                    "oscon",
                    "hoscangle"
                  ],
                  "cmd": "mode",
                  "title": "fan_2in1_breeze",
                  "value": 4
                }
              ]
            },
            "timer": {
              "minHour": 0,
              "maxHour": 23
            },
            "cards": [
              {
                "type": 11,
                "title": "",
                "icon": "",
                "image": "",
                "url": "dreo://nav/device/htfpchart",
                "show": true,
                "key": "",
                "items": [
                  {
                    "key": "1",
                    "remark": "pm25"
                  },
                  {
                    "key": "2",
                    "remark": "temp"
                  }
                ]
              },
              {
                "type": 8,
                "title": "",
                "icon": "",
                "image": "",
                "url": "dreo://nav/device/schedule?deviceSn={sn}",
                "show": true,
                "key": ""
              },
              {
                "type": 6,
                "title": "device_settings_title",
                "icon": "ic_setting",
                "image": "",
                "url": "dreo://nav/device/setting?deviceSn=${sn}",
                "show": true,
                "key": "setting"
              },
              {
                "type": 3,
                "title": "",
                "icon": "",
                "image": "",
                "url": "",
                "show": true,
                "key": ""
              }
            ],
            "urlConfig": [
              {
                "key": "filter",
                "url": "https://www.dreo.com/products/dreo-air-purifiers-replacement-filter-hepa-filter-for-dreo-purifier-tower-fan-mc710s?utm_source=app&utm_medium=mc710s-filter-page&utm_campaign=mc710s-filter-page"
              }
            ],
            "feature": {
              "schedule": {
                "enable": true,
                "localSupport": true,
                "module": [
                  {
                    "type": "HeFi",
                    "version": "0.0.1"
                  }
                ]
              }
            },
            "resource": {
              "shakeImageFiles": "https://resources.dreo-cloud.com/app/202403/7/f177bdd4ab384829b687613950694e00.zip"
            },
            "preference": [
              {
                "image": "ic_display",
                "id": "240",
                "cmd": "lightmode",
                "type": "Display List",
                "title": "dev_ctrl_heater_display",
                "reverse": false
              },
              {
                "image": "ic_mute",
                "id": "210",
                "cmd": "muteon",
                "type": "Panel Sound",
                "title": "device_control_panelsound",
                "reverse": true
              },
              {
                "image": "ic_child_lock",
                "id": "220",
                "cmd": "childlockon",
                "type": "Child Lock",
                "title": "device_control_childlock",
                "reverse": false
              },
              {
                "image": "ic_display_info",
                "id": "250",
                "cmd": "dispmode",
                "type": "Display Info",
                "title": "device_control_displayinfo"
              },
              {
                "image": "ic_osc_cal_hor",
                "id": "260",
                "type": "Oscillation Calibration",
                "title": "device_control_calibration"
              },
              {
                "image": "ic_temp_unit",
                "id": "230",
                "type": "Temperature Unit",
                "title": "device_control_temp_unit"
              }
            ],
            "control": [
              {
                "id": "110",
                "type": "Speed",
                "title": "device_control_mode_manual",
                "value": "manual",
                "items": [
                  {
                    "text": "1",
                    "cmd": "windlevel",
                    "value": 1
                  },
                  {
                    "text": "12",
                    "cmd": "windlevel",
                    "value": 12
                  }
                ]
              },
              {
                "id": "120",
                "type": "Purification",
                "title": "",
                "items": [
                  {
                    "text": "device_control_mode_auto",
                    "cmd": "purifylevel",
                    "value": 255
                  },
                  {
                    "text": "base_digit_one",
                    "cmd": "purifylevel",
                    "value": 1
                  },
                  {
                    "text": "base_digit_two",
                    "cmd": "purifylevel",
                    "value": 2
                  },
                  {
                    "text": "base_digit_three",
                    "cmd": "purifylevel",
                    "value": 3
                  }
                ]
              },
              {
                "id": "100",
                "type": "TF Mode",
                "title": "device_mode",
                "items": [
                  {
                    "text": "device_fans_mode_straight",
                    "textColors": [
                      "#D4D4D4",
                      "#1D1D1D"
                    ],
                    "image": "ic_normal_wind",
                    "imageColors": [
                      "#D4D4D4",
                      "#25D7E4"
                    ],
                    "cmd": "mode",
                    "value": 1
                  },
                  {
                    "text": "device_control_mode_auto",
                    "textColors": [
                      "#D4D4D4",
                      "#1D1D1D"
                    ],
                    "image": "ic_auto_wind",
                    "imageColors": [
                      "#D4D4D4",
                      "#0A80F5"
                    ],
                    "cmd": "mode",
                    "value": 2
                  },
                  {
                    "text": "device_control_mode_sleep",
                    "textColors": [
                      "#D4D4D4",
                      "#1D1D1D"
                    ],
                    "image": "ic_sleep_wind",
                    "imageColors": [
                      "#D4D4D4",
                      "#6249DF"
                    ],
                    "cmd": "mode",
                    "value": 3
                  }
                ]
              }
            ],
            "category": "Tower Fan Purifier",
            "version": {
              "minControlVer": "2.5.10"
            }
          },
          "mainConf": {
            "isSmart": true,
            "isWifi": true,
            "isBluetooth": true,
            "isVoiceControl": true
          },
          "resourcesConf": {
            "imageSmallSrc": "https://resources.dreo-cloud.com/app/202405/17/f653020c31e0438e8fd640a626cbb3c9.png",
            "imageFullSrc": "https://resources.dreo-cloud.com/app/202405/17/d71d7efc45524f65852797eb8e5d967c.zip",
            "imageSmallDarkSrc": "",
            "imageFullDarkSrc": ""
          },
          "servicesConf": [
            {
              "key": "user_manual",
              "value": "https://resources.dreo-cloud.com/app/202311/10/1acb01dcaa494645b2f9e990d2339ab5.pdf"
            }
          ],
          "userManuals": [
            {
              "url": "https://resources.dreo-cloud.com/app/202311/10/1acb01dcaa494645b2f9e990d2339ab5.pdf",
              "icon": null,
              "desc": "User Manual",
              "lang": "en"
            }
          ]
        }
      ]
    }
  }
JeffSteinbok commented 3 weeks ago

Try the attached PR and see if it works. See https://github.com/hacs/integration/issues/4009 for info.

garrettpauls commented 3 weeks ago

@JeffSteinbok switched over to that branch and it found the device on reload, so looking good here! Thanks!