Просмотр исходного кода

Add support for Nedis outdoor cameras.

Issue #914
Jason Rumney 2 лет назад
Родитель
Сommit
3d6e1d3d4b
3 измененных файлов с 245 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 243 0
      custom_components/tuya_local/devices/nedis_outdoor_camera.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -329,3 +329,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [WallyCZ](https://github.com/WallyCZ) for contributing support for Sencor air conditioners.
 - [lageorgem](https://github.com/lageorgem) for contributing support for Loginovo TV sync backlights.
 - [jaymunro](https://github.com/jaymunro) for contributing support for Makegood dual switches.
+- [oleg-d](https://github.com/oleg-d) for assistance with support for Nedis outdoor cameras.

+ 1 - 0
DEVICES.md

@@ -404,6 +404,7 @@ of device.
 ### Cameras
 
 - BCom Majic IPBox intercom camera
+- Nedis outdoor camera
 
 ### Alarm control panels
 

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

@@ -0,0 +1,243 @@
+name: Outdoor camera
+products:
+  - id: irt8xftriwhxbzsn
+    name: Nedis WIFICO11CWT
+primary_entity:
+  entity: camera
+  dps:
+    - id: 115
+      name: snapshot
+      type: base64
+    - id: 134
+      name: motion_enable
+      type: boolean
+      optional: true
+      mapping:
+        - dps_val: null
+          value: false
+          hidden: true
+    - id: 150
+      name: record
+      type: boolean
+      optional: true
+      mapping:
+        - dps_val: null
+          value: false
+          hidden: true
+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
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: switch
+    name: Watermark
+    category: config
+    icon: "mdi:watermark"
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - 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
+          - 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
+        optional: true
+        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 capacity
+    category: diagnostic
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 109
+        type: string
+        name: sensor
+        optional: true
+  - entity: sensor
+    name: SD status
+    class: enum
+    category: diagnostic
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        optional: true
+        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
+  - 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
+  - entity: switch
+    name: Sound detection
+    category: config
+    icon: "mdi:ear-hearing"
+    dps:
+      - id: 139
+        type: boolean
+        name: switch
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+      - id: 141
+        type: string
+        name: upload
+        optional: true
+  - entity: select
+    name: Sound sensitivity
+    icon: "mdi:ear-hearing"
+    category: config
+    dps:
+      - id: 140
+        type: string
+        name: option
+        mapping:
+          - dps_val: 0 
+            value: Low
+          - dps_val: 1
+            value: High
+          - dps_val: null
+            value: Unknown
+            hidden: true
+  - 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
+          - dps_val: null
+            value: None
+            hidden: true
+  - entity: switch
+    name: Motion alarm area
+    icon: "mdi:crop"
+    category: config
+    dps:
+      - id: 168
+        type: boolean
+        name: switch
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+      - id: 169
+        type: string
+        name: area
+  - entity: switch
+    name: ONVIF stream
+    category: config
+    dps:
+      - id: 255
+        type: boolean
+        name: switch
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+      - id: 254
+        type: string
+        name: ip_address
+      - id: 253
+        type: string
+        name: password_change
+
+