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

add support for SNT957W-DE CBU Temperature and humidity external sensor #1702

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

realdimik
Copy link
Contributor

@realdimik realdimik commented Mar 3, 2024

Device: https://www.aliexpress.com/item/1005005530107257.html

Query Device Details in Bulk:

      "model": "SNT957W-DE",
      "name": "Temperature and humidity sensor",
      "product_id": "dnoq3j5m9nhxw9a1",
      "product_name": "SNT957W-DE CBU 温湿度外置传感器",

Query Things Data Model:

  " "model": "{\"modelId\":\"000004dkh1\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_temp\",\"attribute\":\"1666\"},\"name\":\"温度\",\"typeSpec\":{\"max\":1200,\"min\":-400,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-400,\"unit\":\"℃\"}},
{\"abilityId\":2,\"accessMode\":\"ro\",\"code\":\"humidity_value\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-shidu\",\"attribute\":\"1666\"},\"name\":\"湿度\",\"typeSpec\":{\"max\":1000,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},
{\"abilityId\":9,\"accessMode\":\"rw\",\"code\":\"temp_unit_convert\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1152\"},\"name\":\"温标切换\",\"typeSpec\":{\"range\":[\"c\",\"f\"],\"type\":\"enum\",\"typeDefaultValue\":\"c\"}},
{\"abilityId\":10,\"accessMode\":\"rw\",\"code\":\"maxtemp_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-setting\",\"attribute\":\"1152\"},\"name\":\"温度上限\",\"typeSpec\":{\"max\":1200,\"min\":-400,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-400,\"unit\":\"℃\"}},
{\"abilityId\":11,\"accessMode\":\"rw\",\"code\":\"minitemp_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-wendu1\",\"attribute\":\"1152\"},\"name\":\"温度下限\",\"typeSpec\":{\"max\":1200,\"min\":-400,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-400,\"unit\":\"℃\"}},
{\"abilityId\":12,\"accessMode\":\"rw\",\"code\":\"maxhum_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-setting\",\"attribute\":\"1152\"},\"name\":\"湿度上限设置\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},
{\"abilityId\":13,\"accessMode\":\"rw\",\"code\":\"minihum_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-setting\",\"attribute\":\"1152\"},\"name\":\"湿度下限设置\",\"typeSpec\":{\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"%\"}},
{\"abilityId\":14,\"accessMode\":\"ro\",\"code\":\"temp_alarm\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-baojing\",\"attribute\":\"1152\"},\"name\":\"温度报警\",\"typeSpec\":{\"range\":[\"loweralarm\",\"upperalarm\",\"cancel\"],\"type\":\"enum\",\"typeDefaultValue\":\"loweralarm\"}},
{\"abilityId\":15,\"accessMode\":\"ro\",\"code\":\"hum_alarm\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-baojing\",\"attribute\":\"1152\"},\"name\":\"湿度报警\",\"typeSpec\":{\"range\":[\"loweralarm\",\"upperalarm\",\"cancel\"],\"type\":\"enum\",\"typeDefaultValue\":\"loweralarm\"}},
{\"abilityId\":23,\"accessMode\":\"rw\",\"code\":\"temp_calibration\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_loop\",\"attribute\":\"1024\"},\"name\":\"温度校准\",\"typeSpec\":{\"max\":100,\"min\":-100,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-100,\"unit\":\"℃\"}},
{\"abilityId\":24,\"accessMode\":\"rw\",\"code\":\"hum_calibration\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-icon-percent\",\"attribute\":\"1024\"},\"name\":\"湿度校准\",\"typeSpec\":{\"max\":10,\"min\":-10,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-10,\"unit\":\"%\"}}]}]}"
  },

Screenshot:
image

realdimik and others added 4 commits March 3, 2024 20:43
…e_cbu_temp_humidity.yaml

Follow convention (of most, but some others have slipped through) of lowercase only names, with underscores as only punctuation.
Also shorten the name, which was quite long.
@make-all make-all merged commit d75491d into make-all:main Mar 4, 2024
4 checks passed
make-all added a commit that referenced this pull request Mar 4, 2024
@realdimik
Copy link
Contributor Author

I'm trying to implement one more device the same way as I've done this one. It is Aubes smart switch with new chip bk7231n (module wb2s). The device config is written, but the integration says me that it can't connect (when I'm trying to add it). Is it well know issue? Could you give me just a start point/idea for investigation, please?

@make-all
Copy link
Owner

make-all commented Mar 4, 2024

#522 is the start point. There are many things that can cause connection issues. Newer devices are likely to be protocol 3.5, which is more fussy about configuration, or you may even have one of the first devices with a newer protocol (though I'd expect Tuya to move to Matter next rather than push on with yet another version of their proprietary protocol)

make-all added a commit that referenced this pull request Mar 4, 2024
Issue #1699, reduced function version of PR #1702

- docs for recent PRs #1696, #1700, #1702
@realdimik
Copy link
Contributor Author

realdimik commented Mar 9, 2024

After the last tuya-local update the device was disconnected with "migration problem".
I removed it and tried to add it back, but snt957w_de_cbu_temp_humidity is not suggested as an option any more :(
(the device file is present and looks correct)
Could you help me with that?

timlaing pushed a commit to timlaing/tuya-local that referenced this pull request Aug 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this pull request Aug 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants