Bläddra i källkod

Add support for door peephole camera

Issue #1471
Jason Rumney 2 år sedan
förälder
incheckning
53b823181d

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -462,7 +462,7 @@ Further device support has been made with the assistance of users. Please consid
 - [wholly1971](https://github.com/wholly1971) for assisting with support for Madimack Eco pool heatpumps.
 - [rbrtwillis](https://github.com/rbrtwillis) for assisting with support for Inkbird IHC-200 humidity controllers.
 - [vojeroen](https://github.com/vojeroen) for contributing support for CleanAir 605B humidifiers.
-- [fantnhu](https://github.com/fantnhu) for assisting with support for Tesla aroma diffusers and PNI water feeders.
+- [fantnhu](https://github.com/fantnhu) for assisting with support for Tesla aroma diffusers, PNI water feeders and door peephole cameras.
 - [sudo-nitz](https://github.com/sudo-nitz) for assisting with support for Yagusmart 3PN 63A energy meter.
 - [jedubois](https://github.com/jedubois) for assisting with support for Taurus Agadir oil column heaters.
 - [debdalerichard](https://github.com/debdalerichard) for assisting with support for Weekett kettles.

+ 1 - 0
DEVICES.md

@@ -606,6 +606,7 @@ port and password.
 
 - BCom Majic IPBox intercom camera
 - Camnsmart E27-TY camera
+- Door peephole camera
 - Kerui 200W camera
 - Kerui JS-P162 300W camera
 - LSC PTZ camera

+ 137 - 0
custom_components/tuya_local/devices/door_peephole_camera.yaml

@@ -0,0 +1,137 @@
+name: Camera
+products:
+  - id: fzsbulp3wg64l8vx
+    name: TY-W160D
+primary_entity:
+  entity: camera
+  dps:
+    - id: 134
+      type: boolean
+      name: motion_enable
+      optional: true
+    - id: 150
+      type: boolean
+      name: record
+      optional: true
+    - id: 115
+      type: base64
+      optional: true
+      persist: false
+      name: snapshot
+secondary_entities:
+  - entity: switch
+    name: Flip image
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: switch
+    name: Timestamp
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+  - entity: select
+    name: Motion sensitivity
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: "0"
+            value: Low
+          - dps_val: "1"
+            value: Medium
+          - dps_val: "2"
+            value: High
+  - entity: select
+    name: Nightvision
+    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"
+          - dps_val: null
+            value: Auto
+            hidden: true
+  - entity: sensor
+    name: SD status
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: 1
+            value: normal
+          - dps_val: 2
+            value: error
+          - dps_val: 3
+            value: full
+          - dps_val: 4
+            value: formatting
+          - dps_val: 5
+            value: missing
+          - dps_val: null
+            value: normal
+            hidden: true
+      - id: 109
+        type: string
+        name: memory_card_capacity
+        optional: true
+  - entity: button
+    name: Format SD card
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        optional: true
+        name: button
+      - id: 117
+        type: integer
+        optional: true
+        name: sd_format_status
+        mapping:
+          - dps_val: 2000
+            value: Formatting
+          - dps_val: 2001
+            value: Format error
+          - dps_val: 2002
+            value: "No SD card"
+          - dps_val: 2003
+            value: Card error
+  - entity: select
+    name: Recording mode
+    icon: "mdi:file-video"
+    category: config
+    dps:
+      - id: 151
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: "1"
+            value: Event
+          - dps_val: "2"
+            value: Continuous

+ 1 - 1
custom_components/tuya_local/devices/lsc_ptz_camera.yaml

@@ -1,6 +1,6 @@
 name: Camera
 products:
-  - id: ivdxyvyy8aqzm1ix
+  - id: n7h0m2x7i2yzol0p
     name: LSC PTZ
 primary_entity:
   entity: camera