Explorar o código

Add support for Cleverio CD200 doorbell

Issue #2295
Jason Rumney hai 1 ano
pai
achega
0836fe136d

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -665,7 +665,7 @@ Further device support has been made with the assistance of users. Please consid
 - [zaubara](https://github.com/zaubara) for assisting with support for Ciarra CBCS4850 range hood.
 - [ap20132022](https://github.com/ap20132022) for assisting with support for Cecofry 5500 air fryer.
 - [alexandrebelloni](https://github.com/alexandrebelloni) for contributing improvements to Vevor EV charger.
-- [ekalle-swe](https://github.com/ekalle-swe) for assisting with support for Loeffen LFIM6000 ice cube maker and Cleverio AP100 air purifier.
+- [ekalle-swe](https://github.com/ekalle-swe) for assisting with support for Loeffen LFIM6000 ice cube maker, Cleverio AP100 air purifier and CD200 video doorbell.
 - [Athemis](https://github.com/Athemis) for contributing support for Aktobis WDH-310EK dehumidifier.
 - [carmelo42](https://github.com/carmelo42) for contributing support for Fujicool Yuzu heat pump.
 - [dkvk](https://github.com/dkvk) for contributing support for Malmbergs single and dual dimmer modules.

+ 2 - 1
DEVICES.md

@@ -372,7 +372,7 @@
 ### Smart Meter/Circuit Breaker
 
 - Atorch S1WP energy monitoring switch with display
-- Atorch AT2PL energy monitoring breaker switch
+- Atorch AT2PL energy monitoring breaker switch (also working for GR2PWS)
 - Atorch AT4PW energy monitor
 - Aulifants SMES200 energy monitoring breaker switch
 - Avidsen Soria 400W solar inverter
@@ -672,6 +672,7 @@ work reliably, even if listed below.
 
 ### Doorbells
 
+- Cleverio CD200 video doorbell
 - Iebeyond ECH doorbell with 433MHz RF hub
 - KW02 video doorbell
 - WHM-04 doorbell (sold under various brands)

+ 285 - 0
custom_components/tuya_local/devices/cleverio_cd200_doorbell.yaml

@@ -0,0 +1,285 @@
+name: Video doorbell
+products:
+  - id: tpd76kmnwwsun4iq
+    name: Cleverio CD-200
+primary_entity:
+  entity: camera
+  dps:
+    - id: 150
+      type: boolean
+      optional: true
+      name: record
+    - id: 154
+      type: base64
+      optional: true
+      sensitive: true
+      persist: false
+      name: snapshot
+      mapping:
+        - dps_val: null
+          value_redirect: movement_pic
+    - id: 115
+      type: base64
+      optional: true
+      sensitive: true
+      name: movement_pic
+    - id: 240
+      type: boolean
+      optional: true
+      name: motion_enable
+secondary_entities:
+  - entity: switch
+    name: Flip image
+    icon: "mdi:flip-horizontal"
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: switch
+    name: Watermark
+    icon: "mdi:watermark"
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: select
+    name: Night vision
+    icon: "mdi:weather-night"
+    category: config
+    dps:
+      - id: 108
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Auto
+          - dps_val: "1"
+            value: "Off"
+          - dps_val: "2"
+            value: "On"
+  - entity: sensor
+    name: SD status
+    class: enum
+    category: diagnostic
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 110
+        type: integer
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 1
+            value: Normal
+          - dps_val: 2
+            value: Corrupt
+          - dps_val: 3
+            value: Full
+          - dps_val: 4
+            value: Formatting
+          - dps_val: 5
+            value: Missing
+          - dps_val: null
+            value: Normal
+      - id: 109
+        type: string
+        optional: true
+        name: capacity
+  - entity: button
+    name: SD format
+    category: config
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 111
+        type: boolean
+        name: button
+        optional: true
+        persist: false
+      - id: 117
+        type: integer
+        name: state
+        optional: true
+        persist: false
+        mapping:
+          - dps_val: 2000
+            value: Formatting
+          - dps_val: 2001
+            value: Format failed
+          - dps_val: 2002
+            value: Card missing
+          - dps_val: 2003
+            value: Card error
+          - dps_val: null
+            value: Formatted
+          - dps_val: 0
+            value: Formatted
+  - entity: event
+    class: doorbell
+    dps:
+      - id: 136
+        type: string
+        name: event
+        optional: true
+        persist: false
+        mapping:
+          - dps_val: ""
+            value: null
+          - dps_val: null
+            value: null
+          - value: ring
+      - id: 136
+        type: string
+        optional: true
+        name: raw_event
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 145
+        type: integer
+        optional: true
+        name: sensor
+        unit: "%"
+        class: measurement
+      - id: 126
+        type: bitfield
+        optional: true
+        name: capability
+  - entity: binary_sensor
+    class: plug
+    category: diagnostic
+    dps:
+      - id: 146
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: "1"
+            value: true
+          - value: false
+  - entity: number
+    name: Low battery alarm level
+    category: config
+    icon: "mdi:battery-20"
+    dps:
+      - id: 147
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 10
+          max: 50
+  - entity: binary_sensor
+    class: running
+    category: diagnostic
+    dps:
+      - id: 149
+        type: boolean
+        name: sensor
+  - entity: binary_sensor
+    name: Doorbell
+    class: connectivity
+    icon: "mdi:bell"
+    category: diagnostic
+    dps:
+      - id: 155
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: "1"
+            value: true
+          - value: false
+            icon: "mdi:bell-off"
+  - entity: button
+    name: Pair doorbell
+    category: config
+    icon: "mdi:bell-check"
+    dps:
+      - id: 155
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: "1"
+            value: true
+  - entity: button
+    name: Unpair doorbell
+    category: config
+    icon: "mdi:bell-cancel"
+    dps:
+      - id: 155
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: "0"
+            value: true
+  - entity: switch
+    name: Human filter
+    icon: "mdi:human"
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: event
+    name: Alarm
+    dps:
+      - id: 185
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - value: alarm
+      - id: 185
+        type: string
+        optional: true
+        name: message
+  - entity: event
+    name: Push message
+    dps:
+      - id: 212
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - value: message
+      - id: 212
+        type: string
+        name: message
+        optional: true
+  - entity: number
+    name: Motion sensitivity
+    category: config
+    icon: "mdi:motion-sensor"
+    dps:
+      - id: 241
+        type: integer
+        optional: true
+        name: value
+        range:
+          min: 1
+          max: 5