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

Add support for Camnsmart E27 camera

Issue #1336
Jason Rumney 1 год назад
Родитель
Сommit
a260135a42
3 измененных файлов с 261 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 259 0
      custom_components/tuya_local/devices/camnsmart_e27_camera.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -528,3 +528,4 @@ Further device support has been made with the assistance of users. Please consid
 ^ [cherokee13](https://github.com/cherokee13) for assisting with support for Eruiklink curtain motors.
 - [Szenky](https://github.com/Szensky) for assisting with support for Moes WS-Y-EUC curtain switches.
 - [Aironside](https://github.com/Aironside) for assisting with support for WF-WS02 RJ dual switches.
+- [phatrickk](https://github.com/phatrickk) for assisting with support for Camnsmart E27 cameras.

+ 1 - 0
DEVICES.md

@@ -585,6 +585,7 @@ configured using RTSP or ONVIF feeds if they have static IP address,
 port and password.
 
 - BCom Majic IPBox intercom camera
+- Camnsmart E27-TY camera
 - Kerui 200W camera
 - Kerui JS-P162 300W camera
 - Nedis outdoor camera

+ 259 - 0
custom_components/tuya_local/devices/camnsmart_e27_camera.yaml

@@ -0,0 +1,259 @@
+name: Camera
+products:
+  - id: ivdxyvyy8aqzm1ix
+    name: Camnsmart E27TY
+primary_entity:
+  entity: camera
+  dps:
+    - id: 109
+      type: string
+      name: memory_card_capacity
+    - id: 134
+      type: boolean
+      name: motion_enable
+      optional: true
+    - id: 150
+      type: boolean
+      name: record
+      optional: true
+    - id: 178
+      type: string
+      name: log_event
+      optional: true
+    - id: 185
+      type: string
+      name: log_message
+      optional: true
+secondary_entities:
+  - entity: light
+    name: Indicator
+    category: config
+    icon: "mdi:led-on"
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+        optional: true
+  - entity: button
+    name: PTZ up
+    icon: "mdi:pan-up"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "0"
+  - entity: button
+    name: PTZ right-up
+    icon: "mdi:top-right"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "1"
+  - entity: button
+    name: PTZ right
+    icon: "mdi:pan-right"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "2"
+  - entity: button
+    name: PTZ right-down
+    icon: "mdi:pan-bottom-right"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "3"
+  - entity: button
+    name: PTZ down
+    icon: "mdi:pan-down"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "4"
+  - entity: button
+    name: PTZ left-down
+    icon: "mdi:pan-bottom-left"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "5"
+  - entity: button
+    name: PTZ left
+    icon: "mdi:pan-left"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "6"
+  - entity: button
+    name: PTZ left-up
+    icon: "mdi:pan-top-left"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: "7"
+  - entity: switch
+    name: Auto siren
+    icon: "mdi:bullhorn"
+    category: config
+    dps:
+      - id: 120
+        type: boolean
+        name: switch
+        optional: true
+  - entity: select
+    name: Nightvision
+    icon: "mdi:weather-night"
+    category: config
+    dps:
+      - id: 124
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: auto
+            value: Auto
+          - dps_val: ir_mode
+            value: "On"
+          - dps_val: color_mode
+            value: "Off"
+  - entity: light
+    name: Floodlight
+    icon: "mdi:light-flood-down"
+    category: config
+    dps:
+      - id: 138
+        type: boolean
+        name: switch
+        optional: true
+      - id: 158
+        type: integer
+        name: brightness
+        range:
+          min: 1
+          max: 100
+  - 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
+  - entity: switch
+    name: Motion tracking
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 161
+        type: boolean
+        name: switch
+        optional: true
+        mapping:
+          - dps_val: false
+            icon: "mdi:motion-sensor-off"
+  - entity: button
+    class: restart
+    name: Restart
+    category: config
+    dps:
+      - id: 162
+        type: boolean
+        name: button
+        optional: true
+  - entity: select
+    name: Zoom
+    category: config
+    dps:
+      - id: 163
+        type: string
+        name: option
+        optional: true
+        icon: "mdi:magnify"
+        mapping:
+          - dps_val: "0"
+            value: Zoom out
+            icon: "mdi:magnify-minus"
+          - dps_val: "1"
+            value: Zoom in
+            icon: "mdi:magnify-plus"
+  - entity: button
+    name: Stop zooming
+    icon: "mdi:magnify-close"
+    category: config
+    dps:
+      - id: 164
+        type: boolean
+        name: button
+        optional: true
+  - entity: switch
+    name: Limit motion detection area
+    icon: "mdi:picture-in-picture-top-right-outline"
+    category: config
+    dps:
+      - id: 168
+        type: boolean
+        name: switch
+        optional: true
+      - id: 169
+        type: string
+        name: area
+        optional: true
+  - entity: switch
+    name: Human detection
+    icon: "mdi:human"
+    category: config
+    dps:
+      - id: 170
+        type: boolean
+        name: switch
+        optional: true
+  - entity: number
+    name: Light duration
+    category: config
+    icon: "mdi:light-flood-down"
+    dps:
+      - id: 173
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 3600
+  -