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

Request support for Hama Thermostat #1410

Closed
andrei-cerbulescu opened this issue Dec 12, 2023 · 2 comments
Closed

Request support for Hama Thermostat #1410

andrei-cerbulescu opened this issue Dec 12, 2023 · 2 comments

Comments

@andrei-cerbulescu
Copy link
Contributor

andrei-cerbulescu commented Dec 12, 2023

Log Message

Device matches None with quality of 0%. DPS: {"updated_at": 1702411739.984545, "103": 160}
Device matches None with quality of 0%. DPS: {"updated_at": 1702411798.5560288, "103": 160}
Device matches None with quality of 0%. DPS: {"updated_at": 1702412186.4454596, "103": 160}

The mapping I get from tinytuya is as follows:
 "mapping": {
            "101": {
                "code": "switch",
                "type": "Boolean",
                "values": {}
            },
            "102": {
                "code": "temp_current",
                "type": "Integer",
                "values": {
                    "unit": "\u00b0C",
                    "min": 0,
                    "max": 700,
                    "scale": 1,
                    "step": 1
                }
            },
            "103": {
                "code": "temp_set",
                "type": "Integer",
                "values": {
                    "unit": "\u00b0C",
                    "min": 50,
                    "max": 300,
                    "scale": 1,
                    "step": 1
                }
            }
        }

The actual gateway has the following fields:

{
  "result": {
    "properties": [
      {
        "code": "upward",
        "custom_name": "",
        "dp_id": 101,
        "time": 1691421889625
      },
      {
        "code": "down",
        "custom_name": "",
        "dp_id": 102,
        "time": 1691421889625
      }
    ]
  },
  "success": true,
  "t": 1702418139744,
  "tid": "30405d35993911ee9c9e428ec26fb7a3"
}

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"0000024zld\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":8,\"accessMode\":\"rw\",\"code\":\"window_check\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_shake\"},\"name\":\"开窗检测\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":10,\"accessMode\":\"rw\",\"code\":\"frost\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-chushuang\"},\"name\":\"防霜冻功能\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":27,\"accessMode\":\"rw\",\"code\":\"temp_correction\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-wendu1\"},\"name\":\"温度校准\",\"typeSpec\":{\"max\":6,\"min\":-6,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-6,\"unit\":\"\"}},{\"abilityId\":40,\"accessMode\":\"rw\",\"code\":\"child_lock\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lock\"},\"name\":\"童锁\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"attribute\":\"1\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":102,\"accessMode\":\"ro\",\"code\":\"current_temp\",\"description\":\"5℃ = 50 , 50℃ = 500\",\"extensions\":{\"attribute\":\"2\"},\"name\":\"当前温度\",\"typeSpec\":{\"max\":700,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"℃\"}},{\"abilityId\":103,\"accessMode\":\"rw\",\"code\":\"set_temp\",\"description\":\"5℃= 50, 30℃=300\",\"extensions\":{\"iconName\":\"icon-dp_temp\",\"attribute\":\"6\"},\"name\":\"设定温度\",\"typeSpec\":{\"max\":300,\"min\":50,\"scale\":1,\"step\":5,\"type\":\"value\",\"typeDefaultValue\":50,\"unit\":\"℃\"}},{\"abilityId\":104,\"accessMode\":\"ro\",\"code\":\"motor_opening\",\"description\":\"电压开度%\",\"name\":\"加热时间\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},{\"abilityId\":105,\"accessMode\":\"ro\",\"code\":\"battery_power\",\"description\":\"电池电量\\n1 为电池电量报警\",\"extensions\":{\"scope\":\"fault\"},\"name\":\"电池电量报警\",\"typeSpec\":{\"label\":[\"bit0\"],\"maxlen\":1,\"type\":\"bitmap\",\"typeDefaultValue\":0}},{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"a_key_home\",\"description\":\"APP上有一键离家功能,TRV进入节能模式设定温度固定为16℃.\",\"extensions\":{\"iconName\":\"icon-fangzi1\"},\"name\":\"离家\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"prog_mode\",\"description\":\"1 为 1天编程 1-7;\\n2 为 2天编程 1-5、6-7;\\n3 为 3 天编程 1-5、6、7;\\n4 为 7 天编程 1、2、3、4、5、6、7;\\n目前只做7天编程\",\"name\":\"编程模式\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"prog_switch\",\"description\":\"\",\"name\":\"编程开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},{\"abilityId\":109,\"accessMode\":\"rw\",\"code\":\"prog_data\",\"description\":\"BYTE0,BYTE1, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1星期一,2星期二,3星期三,4星期四,5星期五,6星期六,7星期天;\\nBYTE1 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\\n\",\"name\":\"编程数据(作废,先别删)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":110,\"accessMode\":\"ro\",\"code\":\"historical_day_set\",\"description\":\"BYTE0,BYTE1....BYTE23;\\n\\nBYTE0.....BYTE23: 为数据  每个数据一个字节\",\"name\":\"历史数据协议(日-设定温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"system_time\",\"description\":\"BYTE0, BYTE1,BYTE2,BYTE3,BYTE4,BYTE5;\\n\\nBYTE0: 年  :2000-2250, 0-250;\\nBYTE1: 月  :1-12;\\nBYTE2: 日 : 1-31;\\nBYTE3: 时: 0-23;\\nBYTE4: 分: 0-59;\\nBYTE5: 秒:0-59;\",\"name\":\"系统时间同步\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":112,\"accessMode\":\"ro\",\"code\":\"historical_week_set\",\"description\":\"BYTE0,BYTE1....BYTE6;\\n\\nBYTE0.....BYTE6: 为数据  每个数据一个字节\",\"name\":\"历史数据协议(周-设定温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":113,\"accessMode\":\"ro\",\"code\":\"historical_month_set\",\"description\":\"BYTE0,BYTE1....BYTE30;\\n\\nBYTE0.....BYTE30: 为数据  每个数据一个字节\",\"name\":\"历史数据协议(月-设定温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":114,\"accessMode\":\"ro\",\"code\":\"historical_year_set\",\"description\":\"BYTE0,BYTE1....BYTE11;\\n\\nBYTE0.....BYTE11: 为数据  每个数据一个字节\",\"name\":\"历史数据协议(年-设定温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":115,\"accessMode\":\"ro\",\"code\":\"historical_day_now\",\"description\":\"\",\"name\":\"历史数据协议(日-当前温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":116,\"accessMode\":\"ro\",\"code\":\"historical_week_now\",\"description\":\"\",\"name\":\"历史数据协议(周-当前温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":117,\"accessMode\":\"ro\",\"code\":\"historical_month_now\",\"description\":\"\",\"name\":\"历史数据协议(月-当前温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":118,\"accessMode\":\"ro\",\"code\":\"historical_year_now\",\"description\":\"\",\"name\":\"历史数据协议(年-当前温度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":119,\"accessMode\":\"ro\",\"code\":\"historical_day_pow\",\"description\":\"\",\"name\":\"历史数据协议(日-电机开度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":120,\"accessMode\":\"ro\",\"code\":\"historical_week_pow\",\"description\":\"\",\"name\":\"历史数据协议(周-电机开度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":121,\"accessMode\":\"ro\",\"code\":\"historical_month_pow\",\"description\":\"\",\"name\":\"历史数据协议(月-电机开度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":122,\"accessMode\":\"ro\",\"code\":\"historical_year_pow\",\"description\":\"\",\"name\":\"历史数据协议(年-电机开度)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":123,\"accessMode\":\"rw\",\"code\":\"prog_data_1\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周一)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":124,\"accessMode\":\"rw\",\"code\":\"prog_data_2\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周二)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":125,\"accessMode\":\"rw\",\"code\":\"prog_data_3\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周三)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":126,\"accessMode\":\"rw\",\"code\":\"prog_data_4\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周四)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":127,\"accessMode\":\"rw\",\"code\":\"prog_data_5\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周五)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":128,\"accessMode\":\"rw\",\"code\":\"prog_data_6\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周六)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":129,\"accessMode\":\"rw\",\"code\":\"prog_data_7\",\"description\":\"BYTE0, 第一段温度,第一段时间,第二段温度,第二段时间,第三段温度,第三段时间,第四段温度,第四段时间;\\n\\nBYTE0 : 1为1天编程模式, ,2为2天编程模式,3为3天,4为7天,目前只有7天.\\n\\n时间:6:30 = 6*60+30;\\n温度: 25.5℃ = 25.5*10 = 255\",\"name\":\"编程数据(周日)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},{\"abilityId\":130,\"accessMode\":\"rw\",\"code\":\"water_sca\",\"description\":\"\",\"name\":\"防水垢功能\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}}]}]}"
  },
  "success": true,
  "t": 1702412278200,
  "tid": "8a74d3ff992b11eeaa3112f9ffc211bb"
}

{
  "result": {
    "properties": [
      {
        "code": "window_check",
        "custom_name": "",
        "dp_id": 8,
        "time": 1702037938631,
        "value": true
      },
      {
        "code": "frost",
        "custom_name": "",
        "dp_id": 10,
        "time": 1702037938422,
        "value": true
      },
      {
        "code": "temp_correction",
        "custom_name": "",
        "dp_id": 27,
        "time": 1702037939021,
        "value": 0
      },
      {
        "code": "child_lock",
        "custom_name": "",
        "dp_id": 40,
        "time": 1702037939221,
        "value": true
      },
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 101,
        "time": 1702037938220,
        "value": true
      },
      {
        "code": "current_temp",
        "custom_name": "",
        "dp_id": 102,
        "time": 1702402833988,
        "value": 197
      },
      {
        "code": "set_temp",
        "custom_name": "",
        "dp_id": 103,
        "time": 1702411263857,
        "value": 160
      },
      {
        "code": "motor_opening",
        "custom_name": "",
        "dp_id": 104,
        "time": 1691422298688,
        "value": 0
      },
      {
        "code": "battery_power",
        "custom_name": "",
        "dp_id": 105,
        "time": 1702037939820,
        "value": 0
      },
      {
        "code": "a_key_home",
        "custom_name": "",
        "dp_id": 106,
        "time": 1702037940021,
        "value": false
      },
      {
        "code": "prog_mode",
        "custom_name": "",
        "dp_id": 107,
        "time": 1691422298688
      },
      {
        "code": "prog_switch",
        "custom_name": "",
        "dp_id": 108,
        "time": 1702037940332,
        "value": true
      },
      {
        "code": "prog_data",
        "custom_name": "",
        "dp_id": 109,
        "time": 1691422298688
      },
      {
        "code": "historical_day_set",
        "custom_name": "",
        "dp_id": 110,
        "time": 1702414864046,
        "value": "EBATEBATFBQQEBAQEBAQEBAQFBQUFBAA"
      },
      {
        "code": "system_time",
        "custom_name": "",
        "dp_id": 111,
        "time": 1691422298688
      },
      {
        "code": "historical_week_set",
        "custom_name": "",
        "dp_id": 112,
        "time": 1702383368357,
        "value": "EQAAAAAAAA=="
      },
      {
        "code": "historical_month_set",
        "custom_name": "",
        "dp_id": 113,
        "time": 1702383369146,
        "value": "DgAPHh4eAAcWFhEAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
      },
      {
        "code": "historical_year_set",
        "custom_name": "",
        "dp_id": 114,
        "time": 1702383369790,
        "value": "AAAAAAAAAAAAAw0A"
      },
      {
        "code": "historical_day_now",
        "custom_name": "",
        "dp_id": 115,
        "time": 1702414863818,
        "value": "ExIUFRMTFRQTExMTExMTExMTExMTFBQA"
      },
      {
        "code": "historical_week_now",
        "custom_name": "",
        "dp_id": 116,
        "time": 1702383368682,
        "value": "EwAAAAAAAA=="
      },
      {
        "code": "historical_month_now",
        "custom_name": "",
        "dp_id": 117,
        "time": 1702383368912,
        "value": "EQAPFRQVAAkUFRMAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
      },
      {
        "code": "historical_year_now",
        "custom_name": "",
        "dp_id": 118,
        "time": 1702383369587,
        "value": "AAAAAAAAAAAACxEA"
      },
      {
        "code": "historical_day_pow",
        "custom_name": "",
        "dp_id": 119,
        "time": 1702414864277,
        "value": "AAAUAAAXAAAAAAAAAAAAAAAAAAAAAAAA"
      },
      {
        "code": "historical_week_pow",
        "custom_name": "",
        "dp_id": 120,
        "time": 1702383368563,
        "value": "AgAAAAAAAA=="
      },
      {
        "code": "historical_month_pow",
        "custom_name": "",
        "dp_id": 121,
        "time": 1702383369378,
        "value": "AAAbZGRkAAQtLQIAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
      },
      {
        "code": "historical_year_pow",
        "custom_name": "",
        "dp_id": 122,
        "time": 1702383370001,
        "value": "AAAAAAAAAAAAAAAA"
      },
      {
        "code": "prog_data_1",
        "custom_name": "",
        "dp_id": 123,
        "time": 1702383365982,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "prog_data_2",
        "custom_name": "",
        "dp_id": 124,
        "time": 1702383366195,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "prog_data_3",
        "custom_name": "",
        "dp_id": 125,
        "time": 1702383366418,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "prog_data_4",
        "custom_name": "",
        "dp_id": 126,
        "time": 1702383366631,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "prog_data_5",
        "custom_name": "",
        "dp_id": 127,
        "time": 1702383366855,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "prog_data_6",
        "custom_name": "",
        "dp_id": 128,
        "time": 1702383367068,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "prog_data_7",
        "custom_name": "",
        "dp_id": 129,
        "time": 1702383367292,
        "value": "BAFoAMgB4ACgBDgAyAUoAKA="
      },
      {
        "code": "water_sca",
        "custom_name": "",
        "dp_id": 130,
        "time": 1702037938821,
        "value": true
      }
    ]
  },
  "success": true,
  "t": 1702416237668,
  "tid": "c2853fb7993411eea895ae9cc094c36b"
}

Product ID

Information about how the device functions

https://de.hama.com/webresources/article-documents/00176/man/00176593man_de_en.pdf

The devices I am trying to connect to are not the main gateway, but the thermostat. In this case, I'm not sure whether the thermostat needs to be mapped as a secondary device while mapping the gateway as a main device. By using the node_id from the tinytuya wizard I was faced with the error: Sorry, there is no support for this device.

I'm sorry if the extra data was not required. I tried mapping it myself and this was the data I figured out I needed. The mapping attempt was a failure, otherwise I would've made a PR.
Thank you for taking a look at my issue!

@andrei-cerbulescu andrei-cerbulescu added the new device Unsupported device label Dec 12, 2023
@make-all make-all added the full_info All info needed was provided label Dec 12, 2023
@make-all
Copy link
Owner

make-all commented Dec 18, 2023

PR #1424 also seems to match some more of the dps listed in your information above. Does your device really only return the basic info you have listed?

For the connection issues, you do not need to add the hub as a device, just add a single device for the thermostat, using the device id, IP address and local key of the hub as device id, IP and local key and the device id of the device as cid.

@andrei-cerbulescu
Copy link
Contributor Author

PR #1424 also seems to match some more of the dps listed in your information above. Does your device really only return the basic info you have listed?

For the connection issues, you do not need to add the hub as a device, just add a single device for the thermostat, using the device id, IP address and local key of the hub as device id, IP and local key and the device id of the device as cid.

I just checked and I only get 3 codes from tinytuya: 101, 102 and 103. From the online api explorer, there seem to be more but they also look a bit random. For instance, I get battery power but it's set to 0 so I don't think it's working.

@make-all make-all added unreleased Will be in next release and removed full_info All info needed was provided new device Unsupported device unreleased Will be in next release labels Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants