Răsfoiți Sursa

Add support for Kerui JS-P162 300W camera

Issue #1525
Jason Rumney 2 ani în urmă
părinte
comite
5b13c36251

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -499,3 +499,4 @@ Further device support has been made with the assistance of users. Please consid
 - [knowc](https://github.com/knowc) for assisting with support for Hydrotherm Dynamic/X8 Gen 6 water heaters.
 - [Waz-Cpt](https://github.com/Waz-Cpt) for contributing support for a dual dimmer module.
 - [wizu](https://gitub.com/wizu) for contributing improvements to NAC AP470 purifier.
+- [xeroski](https://github.com/xeroski) for assisting with support for Kerui JS-P162 300W cameras.

+ 1 - 0
DEVICES.md

@@ -559,6 +559,7 @@ configured using RTSP or ONVIF feeds if they have static IP address,
 port and password.
 
 - BCom Majic IPBox intercom camera
+- Kerui JS-P162 300W camera
 - Nedis outdoor camera
 - Pinelake BF02 birdfeeder camera
 - RL video intercom (reported unable to connect)

+ 230 - 0
custom_components/tuya_local/devices/kerui_300w_camera.yaml

@@ -0,0 +1,230 @@
+name: Camera
+products:
+  - id: 9waqosp1k5o0bqqh
+    name: Kerui JS-P162 300W
+primary_entity:
+  entity: camera
+  dps:
+    - id: 115
+      name: snapshot
+      type: base64
+      optional: true
+    - id: 134
+      name: motion_enable
+      type: boolean
+    - id: 150
+      name: record
+      type: boolean
+secondary_entities:
+  - entity: light
+    name: Indicator
+    category: config
+    icon: "mdi:led-on"
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Flip image
+    icon: "mdi:flip-horizontal"
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: switch
+    name: Watermark
+    category: config
+    icon: "mdi:watermark"
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: switch
+    name: Privacy
+    icon: "mdi:incognito"
+    category: config
+    dps:
+      - id: 105
+        type: boolean
+        name: switch
+  - entity: select
+    name: Motion sensitivity
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Low
+          - dps_val: "1"
+            value: Medium
+          - dps_val: "2"
+            value: High
+          - dps_val: null
+            value: Unknown
+            hidden: true
+  - entity: select
+    name: Night vision
+    icon: "mdi:weather-night"
+    category: config
+    dps:
+      - id: 108
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Auto
+          - dps_val: "1"
+            value: "Off"
+          - dps_val: "2"
+            value: "On"
+          - dps_val: null
+            value: Unknown
+            hidden: true
+  - entity: sensor
+    name: SD status
+    class: enum
+    category: diagnostic
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 110
+        type: integer
+        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
+        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: button
+    name: PTZ stop
+    icon: "mdi:stop"
+    category: config
+    dps:
+      - id: 116
+        type: boolean
+        name: button
+        optional: true
+        persist: false
+  - entity: select
+    name: PTZ control
+    icon: "mdi:camera-control"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: option
+        optional: true
+        persist: false
+        mapping:
+          - dps_val: "0"
+            value: up
+          - dps_val: "1"
+            value: right-up
+          - dps_val: "2"
+            value: right
+          - dps_val: "3"
+            value: right-down
+          - dps_val: "4"
+            value: down
+          - dps_val: "5"
+            value: left-down
+          - dps_val: "6"
+            value: left
+          - dps_val: "7"
+            value: left-up
+          - dps_val: null
+            value: (stopped)
+  - entity: select
+    name: Recording mode
+    icon: "mdi:file-video"
+    category: config
+    dps:
+      - id: 151
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: Event
+          - dps_val: "2"
+            value: Continuous
+  - entity: number
+    name: Volume
+    category: config
+    icon: "mdi:volume-high"
+    dps:
+      - id: 160
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 1
+          max: 100
+  - entity: switch
+    name: Motion tracking
+    icon: "mdi:motion"
+    category: config
+    dps:
+      - id: 161
+        type: boolean
+        name: switch
+  - entity: event
+    class: motion
+    dps:
+      - id: 239
+        type: string
+        name: event
+        optional: true
+        persist: false
+        mapping:
+          - dps_val: motion
+            value: true

+ 1 - 0
custom_components/tuya_local/devices/nedis_outdoor_camera.yaml

@@ -8,6 +8,7 @@ primary_entity:
     - id: 115
       name: snapshot
       type: base64
+      optional: true
     - id: 134
       name: motion_enable
       type: boolean