Browse Source

Add support for Geeni WP005 pet treat camera (#6062)

This PR adds the configuration for the Geeni WP005 pet treat camera.

The configuration is modelled after other device configuration files, so
the newly mapped dps should not be surprising.

One thing I noticed is that for PTZ left and right, the camera will keep
rotating until you press stop. This emulates the behaviour of other
configuration files, but on the device logs it shows that the app sends
a PTZ left/right command with a subsequent PTZ stop command to
incrementally move.

Closes #6049

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
k----n 10 hours ago
parent
commit
24f5d048b6
1 changed files with 424 additions and 0 deletions
  1. 424 0
      custom_components/tuya_local/devices/geeni_wp005_pettreatcamera.yaml

+ 424 - 0
custom_components/tuya_local/devices/geeni_wp005_pettreatcamera.yaml

@@ -0,0 +1,424 @@
+name: Camera pet feeder
+products:
+  - id: ibyprpw5e00clblc
+    manufacturer: Geeni
+    model: WP005
+entities:
+  - entity: light
+    translation_key: indicator
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    translation_key: watermark
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    name: Camera privacy
+    icon: "mdi:incognito"
+    category: config
+    dps:
+      - id: 105
+        type: boolean
+        optional: true
+        name: switch
+  - entity: select
+    translation_key: motion_sensitivity
+    category: config
+    dps:
+      - id: 106
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: low
+          - dps_val: "1"
+            value: medium
+          - dps_val: "2"
+            value: high
+  - entity: select
+    translation_key: night_vision
+    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
+    class: enum
+    translation_key: sd_status
+    category: diagnostic
+    dps:
+      - id: 110
+        type: integer
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 1
+            value: normal
+          - dps_val: 2
+            value: fault
+          - 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
+        optional: true
+        name: capacity
+  - entity: button
+    name: SD format
+    icon: "mdi:micro-sd"
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        optional: true
+        persist: false
+        name: button
+      - id: 117
+        type: integer
+        optional: true
+        name: state
+        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: 0
+            value: Formatted
+  - entity: text
+    name: Motion timer
+    icon: "mdi:clock-digital"
+    category: config
+    hidden: true
+    dps:
+      - id: 114
+        type: string
+        optional: true
+        name: value
+      - id: 135
+        type: boolean
+        optional: true
+        name: available
+  - entity: event
+    class: motion
+    dps:
+      - id: 115
+        type: base64
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: detected
+      - id: 115
+        type: base64
+        optional: true
+        name: snapshot
+  - entity: button
+    name: PTZ left
+    icon: "mdi:pan-left"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: "6"
+            value: true
+          - value: false
+  - entity: button
+    name: PTZ right
+    icon: "mdi:pan-right"
+    category: config
+    dps:
+      - id: 119
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: "2"
+            value: true
+          - value: false
+  - entity: button
+    name: PTZ stop
+    icon: "mdi:pan"
+    category: config
+    dps:
+      - id: 116
+        type: boolean
+        optional: true
+        name: button
+  - entity: event
+    name: Linked event
+    dps:
+      - id: 127
+        type: string
+        optional: true
+        name: event
+        mapping:
+          - dps_val: motion
+            value: motion
+          - dps_val: human
+            value: human
+  - entity: switch
+    translation_key: motion_detection
+    category: config
+    dps:
+      - id: 134
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    name: Motion timer
+    icon: "mdi:clock-digital"
+    category: config
+    dps:
+      - id: 135
+        type: boolean
+        optional: true
+        name: switch
+  - entity: switch
+    name: Sound detection
+    icon: "mdi:ear-hearing"
+    category: config
+    dps:
+      - id: 139
+        type: boolean
+        optional: true
+        name: switch
+  - entity: select
+    name: Sound sensitivity
+    icon: "mdi:ear-hearing"
+    category: config
+    dps:
+      - id: 140
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Low
+          - dps_val: "1"
+            value: High
+  - entity: event
+    name: Sound
+    dps:
+      - id: 141
+        type: string
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: detected
+      - id: 141
+        type: string
+        optional: true
+        name: message
+  - entity: switch
+    translation_key: camera_record
+    dps:
+      - id: 150
+        type: boolean
+        optional: true
+        name: switch
+  - entity: select
+    translation_key: recording_mode
+    category: config
+    dps:
+      - id: 151
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: event
+          - dps_val: "2"
+            value: continuous
+  - entity: number
+    translation_key: volume
+    category: config
+    dps:
+      - id: 160
+        type: integer
+        optional: true
+        name: value
+        range:
+          min: 0
+          max: 10
+  - entity: switch
+    name: Motion tracking
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 161
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: false
+            icon: "mdi:motion-sensor-off"
+  - entity: button
+    class: restart
+    category: config
+    dps:
+      - id: 162
+        type: boolean
+        optional: true
+        name: button
+  - entity: switch
+    name: Limit motion detection area
+    icon: "mdi:picture-in-picture-top-right-outline"
+    category: config
+    dps:
+      - id: 168
+        type: boolean
+        optional: true
+        name: switch
+      - id: 169
+        type: string
+        optional: true
+        name: area
+  - entity: event
+    translation_key: alarm
+    dps:
+      - id: 185
+        type: utf16b64
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: message
+      - id: 185
+        type: utf16b64
+        optional: true
+        name: message
+  - entity: switch
+    name: Pet detection
+    icon: "mdi:paw"
+    category: config
+    dps:
+      - id: 187
+        type: boolean
+        optional: true
+        name: switch
+  - entity: event
+    translation_key: notification
+    dps:
+      - id: 212
+        type: utf16b64
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: message
+      - id: 212
+        type: utf16b64
+        optional: true
+        name: message
+  - entity: event
+    name: Pet
+    dps:
+      - id: 236
+        type: string
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: detected
+      - id: 236
+        type: string
+        optional: true
+        name: message
+  - entity: event
+    name: Dog bark
+    dps:
+      - id: 237
+        type: string
+        optional: true
+        name: event
+        mapping:
+          - dps_val: null
+            value: null
+          - value: detected
+      - id: 237
+        type: string
+        optional: true
+        name: message
+  - entity: text
+    translation_key: schedule
+    category: config
+    hidden: true
+    dps:
+      - id: 238
+        type: string
+        optional: true
+        name: value
+  - entity: number
+    translation_key: manual_feed
+    dps:
+      - id: 239
+        type: integer
+        optional: true
+        name: value
+        unit: portions
+        range:
+          min: 1
+          max: 5
+        persist: false
+  - entity: switch
+    name: Voice recording
+    icon: "mdi:account-voice"
+    category: config
+    dps:
+      - id: 240
+        type: string
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: "0"
+            value: false
+          - dps_val: "1"
+            value: true
+  - entity: sensor
+    name: Feed report
+    icon: "mdi:paw"
+    category: diagnostic
+    dps:
+      - id: 243
+        type: integer
+        optional: true
+        persist: false
+        name: sensor
+        unit: portions
+        class: measurement