Browse Source

feat(devices): add PowBay JGQW01 energy monitoring circuit breaker

Issue #5776
Jason Rumney 1 week ago
parent
commit
59444001da
2 changed files with 234 additions and 0 deletions
  1. 1 0
      DEVICES.md
  2. 233 0
      custom_components/tuya_local/devices/powbay_jgqw01_breaker.yaml

+ 1 - 0
DEVICES.md

@@ -719,6 +719,7 @@
 - PC321-TY 3 phase power clamp meter
 - PC473 3-phase energy monitor
 - PJ-1103, PJ-1103A power clamp meters
+- PowBay JGQW01-63 energy monitoring circuit breaker
 - PZIOT E01 energy meter
 - SG600MD solar inverter (also SG700MD, other SGxx0MD and SGxx0W models) sold under various brands
 - SmartMCB SMT006 energy meter (10 byte and 8 byte phase info variants)

+ 233 - 0
custom_components/tuya_local/devices/powbay_jgqw01_breaker.yaml

@@ -0,0 +1,233 @@
+name: Energy monitor
+products:
+  - id: ejo7xbrodydgnavj
+    manufacturer: PowBay
+    model: JGQW01-63
+entities:
+  - entity: sensor
+    class: energy
+    dps:
+      - id: 1
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    class: voltage
+    dps:
+      - id: 6
+        type: base64
+        optional: true
+        mask: "FFFF000000000000"
+        name: sensor
+        unit: V
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: current
+    dps:
+      - id: 6
+        type: base64
+        optional: true
+        mask: "0000FFFFFF000000"
+        name: sensor
+        unit: A
+        class: measurement
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    dps:
+      - id: 6
+        type: base64
+        optional: true
+        mask: "0000000000FFFFFF"
+        name: sensor
+        unit: kW
+        class: measurement
+        mapping:
+          - scale: 1000
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 9
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 9
+        type: bitfield
+        name: fault_code
+  - entity: switch
+    name: Prepayment
+    category: config
+    dps:
+      - id: 11
+        type: boolean
+        name: switch
+  - entity: button
+    name: Clear energy
+    category: config
+    dps:
+      - id: 12
+        type: boolean
+        optional: true
+        name: button
+  - entity: sensor
+    name: Balance energy
+    class: energy_storage
+    category: diagnostic
+    dps:
+      - id: 13
+        type: integer
+        name: sensor
+        unit: kWh
+        class: measurement
+        mapping:
+          - scale: 100
+  - entity: number
+    name: Charge energy
+    category: config
+    class: energy_storage
+    dps:
+      - id: 14
+        type: integer
+        name: value
+        unit: kWh
+        range:
+          min: 0
+          max: 999999
+        mapping:
+          - scale: 100
+  - entity: switch
+    translation_key: breaker
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+      - id: 19
+        type: string
+        name: breaker_id
+      - id: 41
+        type: string
+        name: product
+  - entity: text
+    name: Alarm set 1
+    category: config
+    icon: "mdi:alarm"
+    hidden: true
+    dps:
+      - id: 17
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Alarm set 2
+    category: config
+    icon: "mdi:alarm"
+    hidden: true
+    dps:
+      - id: 18
+        type: base64
+        optional: true
+        name: value
+  - entity: sensor
+    class: frequency
+    dps:
+      - id: 32
+        type: integer
+        name: sensor
+        unit: Hz
+        class: measurement
+        mapping:
+          - scale: 100
+  - entity: text
+    name: Power off delay settings
+    category: config
+    icon: "mdi:cogs"
+    hidden: true
+    dps:
+      - id: 33
+        type: base64
+        optional: true
+        name: value
+  - entity: button
+    translation_key: factory_reset
+    category: config
+    hidden: true
+    dps:
+      - id: 34
+        type: boolean
+        optional: true
+        name: button
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 47
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 61
+        type: string
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "off"
+          - dps_val: "on"
+            value: "on"
+          - dps_val: memory
+            value: memory
+  - entity: text
+    translation_key: schedule
+    category: config
+    hidden: true
+    dps:
+      - id: 63
+        type: string
+        name: value
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: number
+    name: Overvoltage recovery delay
+    category: config
+    class: duration
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 1000000000
+          # 31 years seems excessive, but that is what the docs say
+  - entity: number
+    name: Power on delay
+    category: config
+    class: duration
+    dps:
+      - id: 104
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 9999999
+          # almost 4 months seems excessive, but that is what the docs say