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 Tempwise TNT-2BW #2753

Open
ctml91 opened this issue Jan 8, 2025 · 5 comments
Open

Request support for Tempwise TNT-2BW #2753

ctml91 opened this issue Jan 8, 2025 · 5 comments
Labels
full_info All info needed was provided new device Unsupported device

Comments

@ctml91
Copy link

ctml91 commented Jan 8, 2025

Log message

2025-01-08 18:24:37.888 DEBUG (MainThread) [custom_components.tuya_local.device] Meat Thermometer received {"101": "C", "102": true, "104": 80, "114": 730, "131": 268505089, "133": 4168, "full_poll": true}

Product ID

uovvytw9abl0ozhc

Product Name

Tempwise TNT-2BW

DPS information

{
  "result": {
    "model": "{\"modelId\":\"e1kdrepo\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"\",\"properties\":[
{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"temp_unit_convert\",\"description\":\"0x00:Centigrade(摄氏度) \\n0x01:Fahrenheit(华氏度) \\nOther value:invalid/error \",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"4096\"},\"name\":\"温标切换\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"C\",\"F\"]}},
{\"abilityId\":102,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"False: off, true: on。\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"4096\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":103,\"accessMode\":\"ro\",\"code\":\"battery_percentage\",\"description\":\"参考INT-14-BW接入协议【5.电量百分比(UUID:0x2A19)】\",\"name\":\"电池电量\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"screen_brightness\",\"description\":\"参考INT-14-BW接入协议【3.3.显示屏亮度】,去掉报头PDU length、Command Opcode。\",\"name\":\"屏幕亮度\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":1,\"scale\":0,\"step\":1,\"unit\":\"%\"}},
{\"abilityId\":105,\"accessMode\":\"rw\",\"code\":\"alert_mode_interval\",\"description\":\"参考INT-14-BW接入协议【3.10.预设温度警报模式】,去掉报头PDU length、Command Opcode。\",\"name\":\"预设温度警报的模式和间隔时间\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"sound_mode\",\"description\":\"Reference:3.6.响铃/静音模式、音量,去掉包头PDU length、command opcode。\",\"name\":\"静音响铃模式\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"preset_alert_state\",\"description\":\"参考INT-14-BW接入协议【3.7.暂停/停止预设温度警报】,去掉报头PDU length、Command Opcode。\",\"name\":\"暂停/停止预设温度警报\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"udid_mac_version\",\"description\":\"参考INT-14-BW接入协议【3.13.2.Server返回UDID、Bluetooth Mac Address、Firmware Version】,去掉报头PDU length、Command Opcode,然后在结尾增加一个字节的随机数,用于避免tuya过滤相同的数据。下发任意数据,被动上报一次数据。\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"UDID、mac address、versioin\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":109,\"accessMode\":\"ro\",\"code\":\"real_time_temperature\",\"description\":\"参考INT-14-BW接入协议参考【2.实时温度(UUID:0xFF01)】,注意数据有效性。\",\"name\":\"实时温度\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":110,\"accessMode\":\"rw\",\"code\":\"temp_compensation_value\",\"description\":\"//参考【3.5温度补偿值】去掉报头PDU length、Command Opcode、probe channel。\",\"name\":\"温度补偿值\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":111,\"accessMode\":\"rw\",\"code\":\"dismiss_low_battery_alert\",\"description\":\"\",\"name\":\"停止低电量警报\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":114,\"accessMode\":\"ro\",\"code\":\"physical_temperature\",\"description\":\"参考INT-14-BW接入协议参考【2.实时温度(UUID:0xFF01)】,注意数据有效性。\",\"name\":\"设备内部温度\",\"typeSpec\":{\"type\":\"value\",\"max\":32767,\"min\":-32768,\"scale\":1,\"step\":1,\"unit\":\"℉\"}},
{\"abilityId\":116,\"accessMode\":\"rw\",\"code\":\"prealert_value\",\"description\":\"参考INT-14-BW接入协议【3.19.预警值】,去掉报头PDU length、Command Opcode、probe channel。\",\"name\":\"预警值\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":122,\"accessMode\":\"rw\",\"code\":\"preset_1\",\"description\":\"参考INT-14-BW接入协议【3.1.预设目标/警报温度】,去掉报头PDU length、Command Opcode、probe channel。\",\"name\":\"探头1食物预设值\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":123,\"accessMode\":\"rw\",\"code\":\"preset_2\",\"description\":\"参考INT-14-BW接入协议【3.1.预设目标/警报温度】,去掉报头PDU length、Command Opcode、probe channel。\",\"name\":\"探头2食物预设值\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":124,\"accessMode\":\"rw\",\"code\":\"preset_3\",\"description\":\"参考INT-14-BW接入协议【3.1.预设目标/警报温度】,去掉报头PDU length、Command Opcode、probe channel。\",\"name\":\"探头3食物预设值\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":125,\"accessMode\":\"rw\",\"code\":\"preset_4\",\"description\":\"参考INT-14-BW接入协议【3.1.预设目标/警报温度】,去掉报头PDU length、Command Opcode、probe channel。\",\"name\":\"探头4食物预设值\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":126,\"accessMode\":\"rw\",\"code\":\"probe1_timer\",\"description\":\"参考INT-14-BW接入协议【3.20.定时器】,去掉报头PDU length、Command Opcode。\",\"name\":\"1#定时器预设\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":127,\"accessMode\":\"rw\",\"code\":\"probe2_timer\",\"description\":\"参考INT-14-BW接入协议【3.20.定时器】,去掉报头PDU length、Command Opcode。\",\"name\":\"2#定时器预设\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":128,\"accessMode\":\"rw\",\"code\":\"probe3_timer\",\"description\":\"参考INT-14-BW接入协议【3.20.定时器】,去掉报头PDU length、Command Opcode。\",\"name\":\"3#定时器预设\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":129,\"accessMode\":\"rw\",\"code\":\"probe4_timer\",\"description\":\"参考INT-14-BW接入协议【3.20.定时器】,去掉报头PDU length、Command Opcode。\",\"name\":\"4#定时器预设\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":130,\"accessMode\":\"rw\",\"code\":\"timer_runing_state\",\"description\":\"参考INT-14-BW接入协议【3.21.定时器运行状态】,去掉报头PDU length、Command Opcode。\",\"name\":\"定时器运行状态\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":131,\"accessMode\":\"ro\",\"code\":\"device_state_flag1\",\"description\":\"参考INT-14-BW接入协议【4.设备状态标志位】(UUID:0xFF03),bit0~bit29\",\"extensions\":{\"scope\":\"fault\",\"trigger\":\"direct\"},\"name\":\"设备状态低30bit\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"1Conn\",\"1InBox\",\"1Charge\",\"1FLoTempAlert\",\"1FHiTempAlert\",\"1FLoTempAlertPending\",\"1FHiTempAlertPending\",\"1FTempExceedMax\",\"1FTempExceedMin\",\"1FPrealertState\",\"1AExceedMax\",\"1AExceedMin\",\"1Paired\",\"1RequestPaired\",\"1LoBatAlert\",\"Bit15\",\"2Conn\",\"2InBox\",\"2Charge\",\"2FLoTempAlert\",\"2FHiTempAlert\",\"2FLoTempAlertPending\",\"2FHiTempAlertPending\",\"2FTempExceedMax\",\"2FTempExceedMin\",\"2FPrealertState\",\"2AExceedMax\",\"2AExceedMin\",\"2Paired\",\"2RequestPaired\"],\"maxlen\":30}},
{\"abilityId\":132,\"accessMode\":\"rw\",\"code\":\"prealert_state\",\"description\":\"参考INT-14-BW接入协议【3.22.解除预警警报】\",\"name\":\"预警状态\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":133,\"accessMode\":\"ro\",\"code\":\"device_state_flag2\",\"description\":\"参考INT-14-BW接入协议【4.设备状态标志位】(UUID:0xFF03),bit30~bit55\",\"extensions\":{\"scope\":\"fault\",\"trigger\":\"direct\"},\"name\":\"设备状态高26bit\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"2LoBatAlert\",\"Bit31\",\"USB\",\"Bit33\",\"Bit34\",\"Bit35\",\"Bit36\",\"Bit37\",\"BLEConn\",\"BLERequestPair\",\"BLEAuthorize\",\"WiFiReset\",\"TimestampService\",\"1TimerAlert\",\"2TimerAlert\",\"3TimerAlert\",\"4TimerAlert\",\"1TimerState\",\"2TimerState\",\"3TimerState\",\"4TimerState\",\"DeviceBodyHiTempAlert\",\"DeviceBodyLoTempAlert\",\"Bit53\",\"Bit54\",\"Bit55\"],\"maxlen\":26}},
{\"abilityId\":134,\"accessMode\":\"rw\",\"code\":\"device_name\",\"description\":\"参考INT-14-BW接入协议【3.命令/设置、反馈、同步(UUID:0xFF02)\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"设备名称\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":135,\"accessMode\":\"ro\",\"code\":\"device_other_info\",\"description\":\"\",\"name\":\"设备其他信息\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":136,\"accessMode\":\"rw\",\"code\":\"dismiss_alert\",\"description\":\"\",\"name\":\"停止暂停警报\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":137,\"accessMode\":\"rw\",\"code\":\"box_sleep_timeout\",\"description\":\"Reference:3.30.Box自动休眠时间\",\"extensions\":{\"trigger\":\"direct\"},\"name\":\"Box自动休眠时间\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}}]}]}"
  },
  "success": true,
  "t": 1736379006064,
  "tid": "7df8a755ce1811efae856e19dec2a164"
}

Information about how the device functions

This is a wireless meat thermometer. I believe it is a rebranded version of the Inkbird INT-12-BW meat thermometer as the two have near identical specs & design. So if the device can be successful added, I would imagine the configuration for the Inkbird variant would be near identical. The meat thermometer has two wireless probes that each track separate temperature, the larger probe also records ambient temperature.

@ctml91 ctml91 added the new device Unsupported device label Jan 8, 2025
@make-all make-all moved this to 🔖 Ready in Tuya Local Jan 9, 2025
@make-all make-all added the full_info All info needed was provided label Jan 9, 2025
@ctml91
Copy link
Author

ctml91 commented Jan 15, 2025

I tried adding the device using the other integration Local Tuya and manually setting up entities using DPs. A few of the entities values show the raw values and work as expected (e.g. setting screen brightness), while some show what look like they might be encoded values. I am not sure if that means that some DPs may won't be useable, like for example the two temperature probes themselves which would defeat the purpose of supporting the device if the temperatures cannot be read. Local Tuya refers to those DP values as "cloud pull".

Tuya smart app also doesn't show the human readable values for all entities. Would that a problem to be able to support those DPs?

@make-all
Copy link
Owner

Encoded values can be decoded if we know the encoding format. Sometimes this is explained (in Chinese) in the Query Things Data Model description fields. Other times we need to collect samples of known states to try to reverse engineer the format.

I'm not familiar with what localtuya labels as cloud pull. It may mean that the value was not available in the local data when they first polled it (which does not necessarily mean it will never be available locally).

@make-all
Copy link
Owner

make-all commented Jan 25, 2025

Unfortunately everything useful seems to be in binary fields, and the descriptions just have references to some other device specific documentation, such as:

Refer to INT-14-BW access protocol reference [2. Real-time temperature (UUID: 0xFF01)] and note the data validity.

Also, none of the fields documented like that are showing up in the log message, so they may need to be pulled from the cloud as the localtuya message hints.

@make-all make-all moved this from 🔖 Ready to 📋 Backlog in Tuya Local Jan 25, 2025
@ctml91
Copy link
Author

ctml91 commented Jan 26, 2025

Unfortunately everything useful seems to be in binary fields, and the descriptions just have references to some other device specific documentation, such as:

Refer to INT-14-BW access protocol reference [2. Real-time temperature (UUID: 0xFF01)] and note the data validity.

Also, none of the fields documented like that are showing up in the log message, so they may need to be pulled from the cloud as the localtuya message hints.

Thanks for taking a look, that is unfortunate. Is there anything I am able to provide in terms of data that would assist with getting it supported, or do you think it may not be possible?

I believe this device is from the same line as the Inkbird INT-14-BW and INT-12-BW, so probably all transfer data in the same format.

Since the device supports Bluetooth and WiFi, I would assume that there is no cloud dependency to read values at least (but maybe still encrypted for some reason).

@make-all
Copy link
Owner

If you are able to collect samples of those fields, it might be possible to decode them. Putting the probes into iced water and boiling water is one way to get known temperatures out of them for study.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full_info All info needed was provided new device Unsupported device
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants