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 Zemismart SPM01-D2TW-ZM #2219

Closed
Speederer opened this issue Aug 18, 2024 · 2 comments
Closed

Request support for Zemismart SPM01-D2TW-ZM #2219

Speederer opened this issue Aug 18, 2024 · 2 comments

Comments

@Speederer
Copy link

Speederer commented Aug 18, 2024

Log message

I have 3 pieces of the device, 2 of them match with earu_smart_wifi_circuit_breaker_with_energy_monitor and are usable, although they have an extra "Fuse switch" what is not present in the device, but the current, power, total energy and the voltage entities work fine.
I cannot add the 3rd identical device as the above mentioned earu_smart_wifi_circuit_breaker_with_energy_monitor, I guess because "19": "SPM01_63DF" is missing from this one.

2024-08-16 22:20:21.662 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches earu_smart_wifi_circuit_breaker_with_energy_monitor with quality of 30%. DPS: {"updated_at": 1723839610.574141, "1": 5, "2": 0, "9": 0, "15": 69, "16": true, "19": "SPM01_63DF", "101": 5006, "102": 2288, "103": 639, "104": 101}
2024-08-18 00:04:33.441 DEBUG (SyncWorker_29) [custom_components.tuya_local.device] Test refreshed device state: {"dps": {"1": 84, "2": 0, "9": 0, "15": 100, "16": true, "101": 4998, "102": 2345, "103": 0, "104": 0}}
2024-08-18 00:04:33.441 DEBUG (SyncWorker_29) [custom_components.tuya_local.device] new state (incl pending): {"updated_at": 1723932273.4412582, "1": 84, "2": 0, "9": 0, "15": 100, "16": true, "101": 4998, "102": 2345, "103": 0, "104": 0}
2024-08-18 00:04:43.130 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches smardeer_lock33 with quality of 56%. DPS: {"updated_at": 1723932273.4412582, "1": 84, "2": 0, "9": 0, "15": 100, "16": true, "101": 4998, "102": 2345, "103": 0, "104": 0}

DPS information

{
  "result": {
    "model": "{\"modelId\":\"f0bg3c\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"ro\",\"code\":\"total_forward_energy\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lightning\",\"attribute\":\"1152\"},\"name\":\"累计正向有功电能\",\"typeSpec\":{\"type\":\"value\",\"max\":99999999,\"min\":0,\"scale\":2,\"step\":1,\"unit\":\"kW·h\"}},
{\"abilityId\":2,\"accessMode\":\"ro\",\"code\":\"cur_neutral\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-power1\",\"attribute\":\"1152\"},\"name\":\"累计反向有功电能\",\"typeSpec\":{\"type\":\"value\",\"max\":99999999,\"min\":0,\"scale\":2,\"step\":1,\"unit\":\"kW.h\"}},
{\"abilityId\":6,\"accessMode\":\"ro\",\"code\":\"phase_a\",\"description\":\"1,电压,电流及功率\\n2,大端模式,HEX格式,共8个字节\\n3,单位精度:电压,2字节,单位0.1V。电流,3字节,单位 0.001A 。A相有功功率,3字节,单位0.0001kW\\n4,报文格式\\n举例:08 80 00 03 E8 00 27 10 表示A相217.6V,A相电流1.000A,A相功率10.000KW\\n5,通信逻辑:\\n1)用户进面板,主动查询。用户进入面板,面板马上下发0x08到电表,电表上报数据到云平台,面板拿到数据,然后展示。 注:最新WIFI支持。   \\n2)电表基于一定周期上报数据。建议:在WIFI模式时,15秒上报一次。NB模式时,1个小时上报一次。\",\"extensions\":{\"iconName\":\"icon-dp_lightning\",\"attribute\":\"1152\"},\"name\":\"电压,电流及功率\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":9,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"1,告警\\n2,大端模式,HEX,4字节\\n3,报文格式\\n按照完整4个字节,对应的告警位上报告警;bit位,1表示有告警,0表示无告警;如果没用的告警位,补0。高位无定义,也补0;\\n举例:0X00 00 00 09,表示当前发生了漏电自检不正常告警和短路告警,无其它告警。\\n4,通信逻辑\\n只要有1个告警发生,就完整4个字节上报给面板;只要有1个告警关闭,就完整4个字节上报给面板,更新面板显示。\",\"extensions\":{\"iconName\":\"icon-baojing\",\"scope\":\"fault\",\"attribute\":\"1664\"},\"name\":\"故障上报\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"short_circuit_alarm\",\"surge_alarm\",\"overload_alarm\",\"leakagecurr_alarm\",\"temp_dif_fault\",\"fire_alarm\",\"high_power_alarm\",\"self_test_alarm\",\"ov_cr\",\"unbalance_alarm\",\"ov_vol\",\"undervoltage_alarm\",\"miss_phase_alarm\",\"outage_alarm\",\"magnetism_alarm\",\"credit_alarm\",\"no_balance_alarm\"],\"maxlen\":17}},
{\"abilityId\":15,\"accessMode\":\"ro\",\"code\":\"leakage_current\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-power1\",\"attribute\":\"1152\"},\"name\":\"功率因数\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":-100,\"scale\":2,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":16,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"1664\"},\"name\":\"电能清零\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":17,\"accessMode\":\"rw\",\"code\":\"alarm_set_1\",\"description\":\"1,告警阈值使能控制及设置2  \\n2,HEX格式,大端模式, 总告警的数量*4字节= 设置告警总长度。\\n3,报文格式\\n每个告警由4个字节组成,第1个字节(表示该告警存在);第2个字节(发生此告警时,断路器控制模式(0X01拉闸,0X00不动作只告警);第3、4字节:设置告警阈值\\n举例:0X01 01 00 00 03 01 00 14,表示该断路器支持短路告警,发生该告警时,自动跳闸,阀值补0。支持过载告警,发生该告警时,拉闸动作,动作阀值20KW。无其它告警。\\n4,通信逻辑\\nA,配网成功后,按照上面的格式,主动上报给云平台,面板知道哪些告警是断路器当前支持的。设置不成功,重新配网再上报。\\nB,断路器上电时,也上报一次。\\nC,面板根据协议下发告警设置。\",\"extensions\":{\"iconName\":\"icon-dp_warming\",\"attribute\":\"1152\"},\"name\":\"告警设置1\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":18,\"accessMode\":\"rw\",\"code\":\"alarm_set_2\",\"description\":\"1,告警阈值使能控制及设置2  \\n2,HEX格式,大端模式\\n3,报文格式\\n每个告警由4个字节组成,第1个字节(表示该告警存在);第2个字节(发生此告警时,断路器控制模式(0X01拉闸,0X00不动作只告警);第3、4字节:设置告警阈值\\n举例:0X01 01 00 3C 03 01 00 F5,表示该断路器支持过流告警,发生该告警时,拉闸动作,动作阀值60A。支持过压告警,发生该告警时,拉闸动作,动作阀值245V\\n4,通信逻辑\\nA,配网成功后,按照上面的格式,主动上报给云平台,面板知道哪些告警是断路器当前支持的。设置不成功,重新配网再上报。\\nB,断路器上电时,也上报一次。\\nC,面板根据协议下发告警设置。\",\"extensions\":{\"iconName\":\"icon-dp_warming\",\"attribute\":\"1152\"},\"name\":\"告警设置2\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":19,\"accessMode\":\"ro\",\"code\":\"breaker_id\",\"description\":\"1,设备号\\n2,大端模式,字符串型\\n3,单位精度\\n4,报文格式\\n5,通信逻辑\\nA,配网时上报三次,以确保上报成功。如果配对成功,面板有显示设备号。\\nB,如果配对成功,面板没有显示设备号,需要移除设备,再配置一遍。\\nC,每次断路器上电,也上报一次。\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1152\"},\"name\":\"设备号显示\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":35,\"accessMode\":\"rw\",\"code\":\"online_state\",\"description\":\"可用于APP交互更新机制,例如进入面板点击刷新按钮会下发online,设备感知后立即上报一次最新的例如电流电压功率等希望及时更新展示的数据dp。\",\"extensions\":{\"iconName\":\"icon-dp_updown\"},\"name\":\"面板在线\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"online\",\"offline\"]}},
{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"supply_frequency\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lightning\",\"attribute\":\"4096\"},\"name\":\"频率\",\"typeSpec\":{\"type\":\"value\",\"max\":10000,\"min\":0,\"scale\":2,\"step\":1,\"unit\":\"Hz\"}},
{\"abilityId\":102,\"accessMode\":\"ro\",\"code\":\"cur_voltage\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_0\",\"attribute\":\"4096\"},\"name\":\"电压\",\"typeSpec\":{\"type\":\"value\",\"max\":5000,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"V\"}},
{\"abilityId\":103,\"accessMode\":\"ro\",\"code\":\"cur_current\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_0\",\"attribute\":\"4096\"},\"name\":\"电流\",\"typeSpec\":{\"type\":\"value\",\"max\":100000,\"min\":-100000,\"scale\":3,\"step\":1,\"unit\":\"A\"}},
{\"abilityId\":104,\"accessMode\":\"ro\",\"code\":\"cur_power\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-gaodiyin\",\"attribute\":\"4096\"},\"name\":\"有功功率\",\"typeSpec\":{\"type\":\"value\",\"max\":20000,\"min\":-20000,\"scale\":3,\"step\":1,\"unit\":\"kW\"}}]}]}"
  },
  "success": true,
  "t": 1723979169057,
  "tid": "df2cfbe55d5111ef9a8c4604aebef837"
}

Product ID

aqktrdhlsw8q90dr

Product Name

Zemismart SPM01-D2TW-ZM

Information about how the device functions

https://www.zemismart.com/products/spm01-d2tw-zm

@Speederer Speederer added the new device Unsupported device label Aug 18, 2024
@Speederer Speederer changed the title Request support for <productname> Request support for Zemismart SPM01-D2TW-ZM Aug 18, 2024
@make-all make-all added the full_info All info needed was provided label Aug 18, 2024
make-all added a commit that referenced this issue Sep 4, 2024
Add compatible Zemismart device

Issue #2219
@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release device improvement Improvement to an existing device config and removed new device Unsupported device full_info All info needed was provided labels Sep 4, 2024
@make-all
Copy link
Owner

make-all commented Sep 4, 2024

It seems the non-working device is missing the breaker_id (dp 19), which can easily be made optional.
The switch on dp 16 (labelled by the original submitter as "Fuse switch", but probably "Breaker" would be more accurate) is present in the data, perhaps it is only working for resetting the breaker when it has tripped, not for manually triggering the breaker.

@Speederer
Copy link
Author

Thanks, I was able to add the 3rd device after this modification.

@make-all make-all removed awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release device improvement Improvement to an existing device config labels Sep 7, 2024
@make-all make-all closed this as completed Sep 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

No branches or pull requests

2 participants