tuya-local icon indicating copy to clipboard operation
tuya-local copied to clipboard

Request support for Tongou QCB2-100

Open democles9308 opened this issue 1 year ago • 6 comments

Log message

This error originated from a custom integration.

Logger: custom_components.tuya_local.config_flow
Source: custom_components/tuya_local/config_flow.py:485
integration: Tuya Local (documentation, issues)
First occurred: 17:39:38 (2 occurrences)
Last logged: 17:41:02

Device matches None with quality of 0%. DPS: {"updated_at": 1729438859.3448486, "15": 0, "16": true, "102": 63, "103": 280, "104": 165, "110": 800, "111": "Trip", "112": "Alarm", "113": "Trip", "114": "Close", "115": "Trip", "116": "Close", "118": 2000, "119": "ManualClose", "123": false, "127": 0, "128": 0, "129": 0, "130": 0, "131": 0, "132": 0, "133": 230, "134": 230, "135": 224, "136": 223, "137": 0, "138": 0, "139": 0, "146": 0, "147": 0, "148": 0, "149": 0}

DPS information

{
  "result": {
    "properties": [
      {
        "code": "leakage_current",
        "custom_name": "",
        "dp_id": 15,
        "time": 1729435822767,
        "type": "value",
        "value": 0
      },
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 16,
        "time": 1729436946837,
        "type": "bool",
        "value": true
      },
      {
        "code": "pw_t",
        "custom_name": "",
        "dp_id": 101,
        "time": 1685469794082,
        "type": "value",
        "value": -999999
      },
      {
        "code": "CurSet",
        "custom_name": "",
        "dp_id": 102,
        "time": 1729435822767,
        "type": "value",
        "value": 63
      },
      {
        "code": "OverVolSet",
        "custom_name": "",
        "dp_id": 103,
        "time": 1729435822767,
        "type": "value",
        "value": 280
      },
      {
        "code": "UnderVolSet",
        "custom_name": "",
        "dp_id": 104,
        "time": 1729435822767,
        "type": "value",
        "value": 165
      },
      {
        "code": "LeakageSet",
        "custom_name": "",
        "dp_id": 105,
        "time": 1685469794082,
        "type": "value",
        "value": 30
      },
      {
        "code": "TempSet",
        "custom_name": "",
        "dp_id": 110,
        "time": 1729435822767,
        "type": "value",
        "value": 800
      },
      {
        "code": "Fuc_GY",
        "custom_name": "",
        "dp_id": 111,
        "time": 1729424313258,
        "type": "enum",
        "value": "Trip"
      },
      {
        "code": "Fuc_QY",
        "custom_name": "",
        "dp_id": 112,
        "time": 1729424313264,
        "type": "enum",
        "value": "Alarm"
      },
      {
        "code": "Fuc_GZ",
        "custom_name": "",
        "dp_id": 113,
        "time": 1729424313270,
        "type": "enum",
        "value": "Trip"
      },
      {
        "code": "fuc_power",
        "custom_name": "",
        "dp_id": 114,
        "time": 1729424313283,
        "type": "enum",
        "value": "Close"
      },
      {
        "code": "Fuc_Temp",
        "custom_name": "",
        "dp_id": 115,
        "time": 1729424313276,
        "type": "enum",
        "value": "Trip"
      },
      {
        "code": "Fuc_Leakage",
        "custom_name": "",
        "dp_id": 116,
        "time": 1729437319903,
        "type": "enum",
        "value": "Close"
      },
      {
        "code": "power_set",
        "custom_name": "",
        "dp_id": 118,
        "time": 1729424313297,
        "type": "value",
        "value": 2000
      },
      {
        "code": "Event",
        "custom_name": "",
        "dp_id": 119,
        "time": 1729436946948,
        "type": "enum",
        "value": "ManualClose"
      },
      {
        "code": "Fuc_AutoClose",
        "custom_name": "",
        "dp_id": 123,
        "time": 1729424316282,
        "type": "bool",
        "value": false
      },
      {
        "code": "SoftVersion",
        "custom_name": "",
        "dp_id": 125,
        "time": 1685469794082,
        "type": "string",
        "value": ""
      },
      {
        "code": "ToDefaultSet",
        "custom_name": "",
        "dp_id": 126,
        "time": 1685469794082,
        "type": "bool",
        "value": false
      },
      {
        "code": "Vol_A",
        "custom_name": "",
        "dp_id": 127,
        "time": 1729424316282,
        "type": "value",
        "value": 0
      },
      {
        "code": "Vol_B",
        "custom_name": "",
        "dp_id": 128,
        "time": 1729424314076,
        "type": "value",
        "value": 0
      },
      {
        "code": "Vol_C",
        "custom_name": "",
        "dp_id": 129,
        "time": 1729424313367,
        "type": "value",
        "value": 0
      },
      {
        "code": "Cur_A",
        "custom_name": "",
        "dp_id": 130,
        "time": 1729424313373,
        "type": "value",
        "value": 0
      },
      {
        "code": "Cur_B",
        "custom_name": "",
        "dp_id": 131,
        "time": 1729424316282,
        "type": "value",
        "value": 0
      },
      {
        "code": "Cur_C",
        "custom_name": "",
        "dp_id": 132,
        "time": 1729424316282,
        "type": "value",
        "value": 0
      },
      {
        "code": "Temp_A",
        "custom_name": "",
        "dp_id": 133,
        "time": 1729437319909,
        "type": "value",
        "value": 230
      },
      {
        "code": "Temp_B",
        "custom_name": "",
        "dp_id": 134,
        "time": 1729437319914,
        "type": "value",
        "value": 228
      },
      {
        "code": "Temp_C",
        "custom_name": "",
        "dp_id": 135,
        "time": 1729437319921,
        "type": "value",
        "value": 221
      },
      {
        "code": "Temp_N",
        "custom_name": "",
        "dp_id": 136,
        "time": 1729437319927,
        "type": "value",
        "value": 223
      },
      {
        "code": "Pw_A",
        "custom_name": "",
        "dp_id": 137,
        "time": 1729424314201,
        "type": "value",
        "value": 0
      },
      {
        "code": "Pw_B",
        "custom_name": "",
        "dp_id": 138,
        "time": 1729424314203,
        "type": "value",
        "value": 0
      },
      {
        "code": "Pw_C",
        "custom_name": "",
        "dp_id": 139,
        "time": 1729424313664,
        "type": "value",
        "value": 0
      },
      {
        "code": "EP_A",
        "custom_name": "",
        "dp_id": 146,
        "time": 1729424313670,
        "type": "value",
        "value": 0
      },
      {
        "code": "EP_B",
        "custom_name": "",
        "dp_id": 147,
        "time": 1729424316282,
        "type": "value",
        "value": 0
      },
      {
        "code": "EP_C",
        "custom_name": "",
        "dp_id": 148,
        "time": 1729424316282,
        "type": "value",
        "value": 0
      },
      {
        "code": "EP_T",
        "custom_name": "",
        "dp_id": 149,
        "time": 1729424316282,
        "type": "value",
        "value": 0
      }
    ]
  }

 "model": "ATQCB2-JWT-T",
      "name": "QCB2-Thress phase smart circuit breaker",
      "product_id": "xafxthzm5rxv7qcc",
      "product_name": "QCB2-3P(ST)",

Product ID

xafxthzm5rxv7qcc

Product Name

Tongou QCB2-100 / QCB2-3P(ST)

Information about how the device functions

It's a 3P +N circuit breaker with monitoring capabilities ( Voltage, current, power,..) similar like the already existing CQB2-WB file. I'm tryin gto build a file base on that file... not working yet ( i've cxhanged extension yaml to txt tongou-CQB2-100.txt

Thx

democles9308 avatar Oct 20 '24 15:10 democles9308

+1 the 100 is max amps, I got the 63 version (3P+N)

got this in the logs:

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.tuya_local.config_flow
Bron: custom_components/tuya_local/config_flow.py:485
integratie: Tuya Local (documentatie, problemen)
Eerst voorgekomen: 22:14:21 (2 gebeurtenissen)
Laatst gelogd: 22:22:59

Device matches earu_smart_wifi_circuit_breaker_with_energy_monitor with quality of 8%. DPS: {"updated_at": 1729541652.7163792, "1": 178364, "15": 0, "16": true, "102": "Trip", "103": "Trip", "104": "Trip", "105": "Alarm", "107": "Trip", "108": "Trip", "109": "online", "112": true, "114": 25, "115": 260, "116": 200, "118": 600, "119": 8000, "125": 90466, "126": 58842, "127": 29052, "131": 235, "132": 226, "133": 216, "134": 218, "139": 646}
Device matches earu_smart_wifi_circuit_breaker_with_energy_monitor with quality of 8%. DPS: {"updated_at": 1729542169.2377634, "1": 178374, "15": 0, "16": true, "102": "Trip", "103": "Trip", "104": "Trip", "105": "Alarm", "107": "Trip", "108": "Trip", "109": "online", "112": true, "114": 25, "115": 260, "116": 200, "118": 600, "119": 8000, "125": 90470, "126": 58849, "127": 29052, "131": 232, "132": 228, "133": 215, "134": 219, "139": 649}

And debug logs:

[custom_components.tuya_local.helpers.device_config] Loaded device config tongou_qcb2_circuitbreaker.yaml
2024-10-21 22:22:57.972 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Not match for Circuit breaker, missing required DPs: [{'110': 'str'}]
2024-10-21 22:22:57.993 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config tongou_qcb2_singlephasebreaker.yaml
2024-10-21 22:22:57.994 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Not match for Circuit breaker, missing required DPs: [{'110': 'str'}]
2024-10-21 22:22:58.016 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Loaded device config tongou_qcb2wb_breaker.yaml
2024-10-21 22:22:58.016 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Not match for Circuit breaker, missing required DPs: [{'106': 'int'}, {'110': 'int'}, {'111': 'str'}, {'113': 'str'}, {'117': 'int'}, {'123': 'bool'}]
2024-10-21 22:22:58.016 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Not match for Circuit breaker, DPs have incorrect type: [{'125': 'str'}, {'102': 'int'}, {'103': 'int'}, {'104': 'int'}, {'105': 'int'}, {'108': 'int'}, {'107': 'int'}, {'109': 'int'}, {'112': 'str'}, {'114': 'str'}, {'115': 'str'}, {'116': 'str'}, {'119': 'str'}, {'126': 'bool'}]

tbrasser avatar Oct 21 '24 20:10 tbrasser

It seems the Tongou QCB2 may be close enough to make it match.

make-all avatar Oct 24 '24 00:10 make-all

Found these DP's via tuya developer portal for my Tongou TOQCB2:

Probably the difference is mine has the Leakage Current Protection "TOQCB2L-CB Wi-Fi 4P Smart RCBO": https://www.tongou.com/wp-content/uploads/2024/04/Smart-Circuit-Breaker-TOQCB2L-Series.pdf

{
    "1":"total forward energy",  # Sensor
    "6":"Phase A",  # unknown characterset base64 encoded content
    "7":"Phase B",  # unknown characterset base64 encoded content
    "8":"Phase C",  # unknown characterset base64 encoded content
   "15":"Leakage current",       # Sensor
   "16":"Switch",   # Main Breaker Switch
  "102":"Over-voltage setting",  # [Alarm,Trip,Closed]
  "103":"Under-voltage setting", # [Alarm,Trip,Closed]
  "104":"Over-current setting",  # [Alarm,Trip,Closed]
  "105":"Over-power setting",    # [Alarm,Trip,Closed]
  "107":"Temperature setting",   # [Alarm,Trip,Closed]
  "108":"Leakage setting",       # [Alarm,Trip,Closed]
  "109":"Online state",          # Binary Sensor
  "110":"Event",
  "112":"Automatic closing switch", # Switch 
  "113":"Restore default switch",   # Switch
  "114":"Current threshold",        # Number
  "115":"Over-voltage threshold",   # Number
  "116":"Under-voltage threshold",  # Number
  "117":"Leakage Threshold",        # Number
  "118":"Temperature threshold",    # Number
  "119":"Over-power threshold",     # Number
  "125":"Forward electricity_A",    # Sensor
  "126":"Forward Electricity_B",    # Sensor
  "127":"Forward Electricity_C",    # Sensor
  "131":"Temp_A",   # Sensor
  "132":"Temp_B",   # Sensor
  "133":"Temp_C",   # Sensor
  "134":"N相温度",   # Sensor (Temp_N)
  "139":"Forward Power Total" # Sensor
}

tbrasser avatar Oct 24 '24 08:10 tbrasser

It is best not to hijack other device's threads to add information about your different device. The 63A devices appear to be completely different than the 100A ones at the Tuya protocol level, so this information is not relevant to this report, though I have taken it into account for the existing tongou_qcb2_circuitbreaker config.

make-all avatar Oct 24 '24 12:10 make-all

Yeah sorry, found out too late it was different. Do you want me to open a different issue? Or wait for next release and if any issues only then do it?

tbrasser avatar Oct 24 '24 14:10 tbrasser

I already added the optional tag and an extra entity, so you can wait for the next release to check.

make-all avatar Oct 24 '24 22:10 make-all