make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.35k stars 522 forks source link

Request support for VEVOR Portable EV Charger Type 2, 16A 3.7 kW #1757

Closed Klaus3d3 closed 2 months ago

Klaus3d3 commented 7 months ago

Log Message

Device matches None with quality of 0%. DPS: {"updated_at": 1710885485.876341, "1": 0, "3": "charger_free", "4": 8, "9": 0, "10": 0, "13": "controlpi_12v", "14": "charge_now", "16": true, "18": false, "23": "V1.0.1", "24": 26, "25": 1, "28": 9}

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"en9axs\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"ro\",\"code\":\"forward_energy_total\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lightning\",\"cloudless\":1,\"trigger\":\"direct\"},\"name\":\"正向总有功电量\",\"typeSpec\":{\"type\":\"value\",\"max\":99999999,\"min\":0,\"scale\":2,\"step\":1,\"unit\":\"kW·h\"}},
{\"abilityId\":3,\"accessMode\":\"ro\",\"code\":\"work_state\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-zhuangtai\"},\"name\":\"工作状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"charger_free\",\"charger_insert\",\"charger_free_fault\",\"charger_wait\",\"charger_charging\",\"charger_pause\",\"charger_end\",\"charger_fault\"]}},
{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"charge_cur_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-shezhi\"},\"name\":\"充电电流设定\",\"typeSpec\":{\"type\":\"value\",\"max\":32,\"min\":8,\"scale\":0,\"step\":1,\"unit\":\"A\"}},
{\"abilityId\":5,\"accessMode\":\"ro\",\"code\":\"sigle_phase_power\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lightning\"},\"name\":\"单相有功功率\",\"typeSpec\":{\"type\":\"value\",\"max\":99999999,\"min\":0,\"scale\":3,\"step\":1,\"unit\":\"kW\"}},
{\"abilityId\":6,\"accessMode\":\"ro\",\"code\":\"phase_a\",\"description\":\"1.1 名称:A相电压,电流及功率\\n1.2 含义:展示A相当前的电压、电流、功率值。\\n2 格式:大端模式,HEX格式,共8个字节\\n3,单位精度:电压,2字节,单位0.1V。电流,3字节,单位 0.001A 。A相有功功率,3字节,单位0.001kW\\n4,报文格式\\n举例:08 80 00 03 E8 00 27 10 表示A相217.6V,A相电流10A,A相功率10.000KW\",\"extensions\":{\"iconName\":\"icon-dp_lightning\"},\"name\":\"上报A相电压,电流及功率\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}},
{\"abilityId\":9,\"accessMode\":\"ro\",\"code\":\"power_total\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lightning\"},\"name\":\"总功率\",\"typeSpec\":{\"type\":\"value\",\"max\":99999999,\"min\":0,\"scale\":3,\"step\":1,\"unit\":\"kW\"}},
{\"abilityId\":10,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-baojing\"},\"name\":\"故障告警\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"ov_cr\",\"ov2_cr_fault\",\"ov_vol\",\"undervoltage_alarm\",\"contactor_adhesion\",\"contactor_fault\",\"earth_fault\",\"meter_hardware_alarm\",\"scram_fault\",\"cp_fault\",\"meter_commu_fault\",\"card_reader_fault\",\"cir_short_fault\",\"adhesion_fault\",\"self_test_alarm\",\"leakagecurr_alarm\"],\"maxlen\":16}},
{\"abilityId\":13,\"accessMode\":\"ro\",\"code\":\"connection_state\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-zhuangtai\"},\"name\":\"连接状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"controlpi_12v\",\"controlpi_12v_pwm\",\"controlpi_9v\",\"controlpi_9v_pwm\",\"controlpi_6v\",\"controlpi_6v_pwm\",\"controlpi_error\"]}},
{\"abilityId\":14,\"accessMode\":\"rw\",\"code\":\"work_mode\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"trigger\":\"direct\"},\"name\":\"工作模式\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"charge_now\",\"charge_pct\",\"charge_energy\",\"charge_schedule\",\"charge_delay\"]}},
{\"abilityId\":16,\"accessMode\":\"rw\",\"code\":\"clear_energy\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_lightning\"},\"name\":\"电量清零\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":18,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"trigger\":\"direct\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":23,\"accessMode\":\"ro\",\"code\":\"system_version\",\"description\":\"1.1 名称:充电桩软硬件版本号\\n1.2 含义:硬件、固件等当前版本号\\n2 格式\\n  数据类型: string\\n  功能属性: 最大长度128字节\\n4 报文格式\\n   举例:\\\"HW V1.0,SW V1.0.3\\\"\\n5 通信逻辑 \",\"extensions\":{\"iconName\":\"icon-dp_mode\"},\"name\":\"系统版本\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},
{\"abilityId\":24,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_c\",\"trigger\":\"direct\"},\"name\":\"当前温度\",\"typeSpec\":{\"type\":\"value\",\"max\":200,\"min\":-40,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},
{\"abilityId\":25,\"accessMode\":\"ro\",\"code\":\"charge_energy_once\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-Ele\",\"attribute\":\"2048\",\"trigger\":\"direct\"},\"name\":\"单次充电量\",\"typeSpec\":{\"type\":\"value\",\"max\":999999,\"min\":1,\"scale\":2,\"step\":1,\"unit\":\"kW·h\"}},
{\"abilityId\":27,\"accessMode\":\"rw\",\"code\":\"online_state\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_updown\"},\"name\":\"在线状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"offline\",\"online\"]}},
{\"abilityId\":28,\"accessMode\":\"rw\",\"code\":\"timer_on\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time3\"},\"name\":\"延时上电\",\"typeSpec\":{\"type\":\"value\",\"max\":12,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"h\"}},
{\"abilityId\":33,\"accessMode\":\"rw\",\"code\":\"mode_set\",\"description\":\"1,充电模式\\n2,大端模式,HEX,8个字节\\n3,报文格式\\n   第1个字节 0x01 具备即时充电模式,0x00 无即时充电模式  \\n   第2个字节 0x00 本次不实现电量百分比充电功能\\n   第3个字节 0x01 具备定量充电模式,0x00 无定量充电模式\\n   第4个字节 0x01 具备定时充电模式,0x00 无定时充电模式\\n   第5个字节 0x01 具备延时充电模式,0x00 无延时充电模式\\n   第6个字节,第7个字节,第8个字节,没有定义,上报0X00填充\",\"extensions\":{\"iconName\":\"icon-setting\",\"trigger\":\"direct\"},\"name\":\"充电模式\",\"typeSpec\":{\"type\":\"raw\",\"maxlen\":128}}]}]}"
  },
  "success": true,
  "t": 1710909295365,
  "tid": "335bc214e67311eea65da2df7b0b9579"
}

Standard Instruction Set:

DP ID 4: charge_cur_set | Integer | { "unit": "A", "min": 8, "max": 32, "scale": 0, "step": 1 }

DP ID 14: work_mode | Enum | { "range": [ "charge_now", "charge_pct", "charge_energy", "charge_schedule" ] } DP ID 16: clear_energy | Boolean | "{true,false}" DP ID 18: switch | Boolean | "{true,false}"

Standard Status Set:

DP ID 1 : forward_energy_total | Integer | { "unit": "kW·h", "min": 0, "max": 99999999, "scale": 2, "step": 1 }

DP ID 3: work_state | Enum | { "range": [ "charger_free", "charger_insert", "charger_free_fault", "charger_wait", "charger_charging", "charger_pause", "charger_end", "charger_fault" ] }

DP ID 4: charge_cur_set | Integer | { "unit": "A", "min": 8, "max": 32, "scale": 0, "step": 1 }

DP ID 5: sigle_phase_power | Integer | { "unit": "kW", "min": 0, "max": 99999999, "scale": 3, "step": 1 }

DP ID 9: power_total | Integer | { "unit": "kW", "min": 0, "max": 99999999, "scale": 3, "step": 1 }

DP ID 13: connection_state | Enum | { "range": [ "controlpi_12v", "controlpi_12v_pwm", "controlpi_9v", "controlpi_9v_pwm", "controlpi_6v", "controlpi_6v_pwm", "controlpi_error" ] }

DP ID 14: work_mode | Enum | { "range": [ "charge_now", "charge_pct", "charge_energy", "charge_schedule" ] }

DP ID 16: clear_energy | Boolean | "{true,false}"

DP ID 18: switch | Boolean | "{true,false}"

DP ID 24: temp_current | Integer | { "unit": "℃", "min": -40, "max": 200, "scale": 0, "step": 1 }

DP ID 23: charge_energy_once | Integer | { "unit": "kW·h", "min": 1, "max": 999999, "scale": 2, "step": 1 }

DP ID 10: fault:????

DP ID 28: delay_power_on | Integer | { "unit": "h", "min": 1, "max": 12, "scale": 0, "step": 1 }

Product ID

  "name": "SS_EU_Mode2_7kW",
  "product_id": "otugaigzdqfyc9er",
  "product_name": "SS_EU_Mode2_7kW",

Information about how the device functions

https://eur.vevor.com/portable-ev-charger-c_11497/vevor-portable-ev-charger-type-2-16a-3-7-kw-electric-vehicle-car-charger-with-28-ft-charging-cable-cee-7-7-plug-iec-62196-home-ev-charging-station-with-storage-bag-charging-cable-hook-ip66-p_010786880117

TheSmartGerman commented 7 months ago

I just bought this charger two weeks ago, but the B variante with Display: Item Model Number EV-B06-EU003B Product name is the same: SS_EU_Mode2_7kW

EDIT: Found the description how to get the Data Query: Seems to be the same:

{
  "result": {
    "model": "{\"modelId\":\"en9axs\",

Just the beginning...

Jordan87 commented 7 months ago

DP ID 23: charge_energy_once | Integer | { "unit": "kW·h", "min": 1, "max": 999999, "scale": 2, "step": 1 }

This is incorrect, ID 25 is for charge_energy_once, ID 23 is used for software/firmware version ;)

Thanks that you want to add suppurt for that device. I just bought it :)

TheSmartGerman commented 7 months ago

If you go to "Device Control" -> "Get Properties" you geht this Propertis:

"properties": [
      {
        "code": "forward_energy_total",
        "custom_name": "",
        "dp_id": 1,
        "time": 1712171393541,
        "value": 421
      },
      {
        "code": "work_state",
        "custom_name": "",
        "dp_id": 3,
        "time": 1712157512703,
        "value": "charger_free"
      },
      {
        "code": "charge_cur_set",
        "custom_name": "",
        "dp_id": 4,
        "time": 1712060591535,
        "value": 14
      },
      {
        "code": "sigle_phase_power",
        "custom_name": "",
        "dp_id": 5,
        "time": 1710015252372,
        "value": 0
      },
      {
        "code": "phase_a",
        "custom_name": "",
        "dp_id": 6,
        "time": 1712171393542,
        "value": "CSEAAAAAAAA="
      },
      {
        "code": "power_total",
        "custom_name": "",
        "dp_id": 9,
        "time": 1712143484970,
        "value": 0
      },
      {
        "code": "fault",
        "custom_name": "",
        "dp_id": 10,
        "time": 1711901699994,
        "value": 0
      },
      {
        "code": "connection_state",
        "custom_name": "",
        "dp_id": 13,
        "time": 1712157512755,
        "value": "controlpi_12v"
      },
      {
        "code": "work_mode",
        "custom_name": "",
        "dp_id": 14,
        "time": 1712137909257,
        "value": "charge_now"
      },
      {
        "code": "clear_energy",
        "custom_name": "",
        "dp_id": 16,
        "time": 1711902109248,
        "value": true
      },
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 18,
        "time": 1712171393534,
        "value": false
      },
      {
        "code": "system_version",
        "custom_name": "",
        "dp_id": 23,
        "time": 1711901700013,
        "value": "V1.0.1"
      },
      {
        "code": "temp_current",
        "custom_name": "",
        "dp_id": 24,
        "time": 1712171394617,
        "value": 19
      },
      {
        "code": "charge_energy_once",
        "custom_name": "",
        "dp_id": 25,
        "time": 1712157402383,
        "value": 421
      },
      {
        "code": "online_state",
        "custom_name": "",
        "dp_id": 27,
        "time": 1710015252372,
        "value": "offline"
      },
      {
        "code": "timer_on",
        "custom_name": "",
        "dp_id": 28,
        "time": 1711005743583,
        "value": 4
      },
      {
        "code": "mode_set",
        "custom_name": "",
        "dp_id": 33,
        "time": 1710015252372
      }
    ]
make-all commented 5 months ago

This issue is closed. If there is an issue with the device config in the latest released version of THIS INTEGRATION, then please open a new issue with details, including logs and/or diagnostics.

If you want to discuss workarounds for other integrations, kindly do so in a discussion forum where that integration would be on topic, and don't confuse and waste the time of the volunteer developers by bringing up unrelated issues here.

NeverBehave commented 2 months ago

Not entirely sure if this should be a different issue but leaving a note here for its US variant:

Product ID

"productCategory":"qccdz","productId":"w7lvyyxyevpwf20e","productName":"SS_US_7kW",

I believe the params are the same. Will try out later see if it works and proposed a PR.

NeverBehave commented 2 months ago

Ah it seems the ID was already in, thanks @make-all! but it seems the device is still saying unsupported with the product id added. I cannot get exact DPS schema from the cloud API so I can only provide this log

Logs:

Device matches None with quality of 0%. DPS: {"updated_at": 1724207415.0937753, "1": 577, "3": "charger_free", "4": 16, "9": 0, "10": 0, "13": "controlpi_12v", "16": true, "18": false, "23": "V1.0.7", "24": 28}
NeverBehave commented 2 months ago

Can confirm polling information and AMP config is working as expected. Thanks!

image
alexandrebelloni commented 2 months ago

Bought the same, got the following IDs:

        "category": "qccdz",
        "product_name": "SS_EU15O_M2",
        "product_id": "ypdfdnwauasb8rje",
alexandrebelloni commented 2 months ago

I've added the id and name to custom_components/tuya_local/devices/vevor_ev_charger.yaml and restarted HA but the integration still complains the device is not supported. Are there other steps? It seems it actually has less DP, s it an issue?

NeverBehave commented 2 months ago

@alexandrebelloni copy the DPS info from the log and paste it here. The log should be in the setting somewhere after it shows unsupported device.

Missing DP causing the module unable to match the device, especially non-optional one.

alexandrebelloni commented 2 months ago

I just opened #2280 to add support for it. It mostly works but power and single phase power are never updated, they are still in the unknown state. This is weird because the smart life app is able to get the value.

Edit: I believe it is because HA presents DPS 5 and 9 which are not present on my device but not the power part of DPS 6. I get voltage and intensity though, also from DP6