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

feat (devices): add support for Ningbo BF314A camera pet feeder

Issue #3910
Jason Rumney 3 месяцев назад
Родитель
Сommit
d73fcf71d1
3 измененных файлов с 386 добавлено и 4 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 5 4
      DEVICES.md
  3. 380 0
      custom_components/tuya_local/devices/ningbo_bf314a_petfeeder.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1110,3 +1110,4 @@ Further device support has been made with the assistance of users. Please consid
 - [PMKA](https://github.com/PMKA) for contributing support for Goldair GPOC2415 oil heater.
 - [fbesserp](https://github.com/fbesserp) for contributing improvements to Catit Pixi smart feeder.
 - [amotruk](https://github.com/amotruk) for contributing support for Mini-B Public litter box.
+- [p1x3lmx](https://github.com/p1x3lmx) for assisting with support for Ningbo BF314A camera pet feeder.

+ 5 - 4
DEVICES.md

@@ -959,7 +959,7 @@ port and password.
 - BNETA F1-D pet feeder (likely compatible with Petwant F1-C)
 - Catit Pixi smart fountain
 - Catit pet feeder (Pixi 2.2kg dispenser and 6 meal versions, and another non-Pixi branded single dispenser)
-- Ceres Plus pet feeder with camera
+- Ceres Plus camera pet feeder
 - Cleverio PF100 pet feeder
 - Doel cat litter box
 - Duoqu Neo-A cat litter box
@@ -978,12 +978,13 @@ port and password.
 - Meowmatic pet feeder
 - Mini-B Public litter box
 - MolyPet F02W pet feeder
-- Mypin 6L Video pet feeder
+- Mypin 6L camera pet feeder
 - Nedis pet feeder
+- Ningbo BF314A camera pet feeder
 - Papifeed pet feeder
 - Petempo PAF-02 pet feeder
 - Petlibro PLAF103 pet feeder
-- Petlibro PLAF203 pet feeder with camera
+- Petlibro PLAF203 camera pet feeder
 - Petoneer Fresco EzGo pet fountain
 - Petoneer Fresco Hydrate Ultra pet fountain (2 versions)
 - Petoneer Fresco Mini pet fountain
@@ -991,7 +992,7 @@ port and password.
 - Petree 2.0 litter box
 - Petrust TK-WF002 pet fountain
 - PetSnowy Snow+ litter box
-- PetsPride OO15 pet feeder with camera
+- PetsPride OO15 camera pet feeder
 - Petwant F13-W 6-meal pet feeder
 - PNI water feeder
 - Puppy Kitty automatic pet feeder (F14-W and another model)

+ 380 - 0
custom_components/tuya_local/devices/ningbo_bf314a_petfeeder.yaml

@@ -0,0 +1,380 @@
+name: Camera pet feeder
+products:
+  - id: czjyrcfdgbxmta5m
+    manufacturer: Ningbo
+    model: BF314A
+entities:
+  - entity: light
+    translation_key: indicator
+    category: config
+    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
+  - entity: switch
+    name: Watermark
+    icon: "mdi:watermark"
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+  - entity: camera
+    dps:
+      - id: 105
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
+      - id: 115
+        type: base64
+        optional: true
+        name: snapshot
+        sensitive: true
+      - id: 134
+        type: boolean
+        name: motion_enable
+      - id: 150
+        type: boolean
+        name: record
+  - 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
+  - entity: sensor
+    name: SD status
+    class: enum
+    translation_key: status
+    category: diagnostic
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 110
+        type: integer
+        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
+      - 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
+      - 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: SD unmount
+    category: config
+    dps:
+      - id: 112
+        type: boolean
+        optional: true
+        name: button
+  - entity: select
+    name: Night vision
+    icon: "mdi:weather-night"
+    category: config
+    dps:
+      - id: 124
+        type: string
+        name: option
+        mapping:
+          - dps_val: auto
+            value: Auto
+          - dps_val: ir_mode
+            value: Infrared
+          - dps_val: color_mode
+            value: Color
+  - entity: select
+    name: Motion detect minimum interval
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 133
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: "1 minute"
+          - dps_val: "3"
+            value: "3 minutes"
+          - dps_val: "5"
+            value: "5 minutes"
+  - 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
+      # Seems to be the same thing, and missing from log
+      - id: 113
+        type: boolean
+        optional: true
+        name: motion_recording
+  - entity: number
+    name: Volume
+    category: config
+    icon: "mdi:volume-high"
+    dps:
+      - id: 160
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 1
+          max: 100
+  - entity: button
+    class: restart
+    category: config
+    dps:
+      - id: 162
+        type: boolean
+        optional: true
+        name: button
+  - entity: switch
+    name: Motion area
+    icon: "mdi:picture-in-picture-top-right"
+    category: config
+    dps:
+      - id: 168
+        type: boolean
+        name: switch
+  - entity: text
+    name: Motion area
+    category: config
+    icon: "mdi:picture-in-picture-top-right"
+    hidden: true
+    dps:
+      - id: 169
+        type: string
+        name: value
+  - entity: switch
+    name: Humanoid filter
+    icon: "mdi:human"
+    category: config
+    dps:
+      - id: 170
+        type: boolean
+        name: switch
+  - entity: event
+    name: Alarm
+    dps:
+      - id: 185
+        type: base64
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - dps_val: ""
+            value: null
+          - value: alarm
+      - id: 185
+        type: utf16b64
+        optional: true
+        name: message
+  - entity: select
+    name: Anti-flicker
+    icon: "mdi:waves"
+    category: config
+    dps:
+      - id: 188
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Disabled
+          - dps_val: "1"
+            value: "50Hz"
+          - dps_val: "2"
+            value: "60Hz"
+  - entity: switch
+    name: Smart object frame
+    category: config
+    dps:
+      - id: 198
+        type: boolean
+        name: switch
+  - entity: event
+    name: Notification
+    dps:
+      - id: 212
+        type: base64
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - dps_val: ""
+            value: null
+          - value: notify
+      - id: 212
+        type: utf16b64
+        optional: true
+        name: message
+  - entity: button
+    name: Voice record
+    icon: "mdi:record-rec"
+    category: config
+    dps:
+      - id: 232
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: "1"
+            value: true
+  - entity: button
+    name: Voice stop recording
+    icon: "mdi:stop-circle-outline"
+    category: config
+    dps:
+      - id: 232
+        type: string
+        optional: true
+        name: button
+        mapping:
+          - dps_val: "0"
+            value: true
+  - entity: text
+    name: Schedule
+    category: config
+    icon: "mdi:calendar-clock"
+    hidden: true
+    dps:
+      - id: 233
+        type: string
+        optional: true
+        name: value
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 234
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 234
+        type: string
+        optional: true
+        name: description
+        mapping:
+          - dps_val: null
+            value: ok
+          - dps_val: "0"
+            value: Low food
+          - dps_val: "1"
+            value: Food dispensing anomaly
+  - entity: sensor
+    name: Portion size
+    class: weight
+    category: diagnostic
+    dps:
+      - id: 235
+        type: integer
+        name: sensor
+        unit: g
+        class: measurement
+  - entity: number
+    name: Feed
+    category: config
+    icon: "mdi:food-drumstick"
+    dps:
+      - id: 236
+        type: integer
+        optional: true
+        name: value
+        unit: portions
+        range:
+          min: 1
+          max: 20
+  - entity: event
+    name: Feeding
+    dps:
+      - id: 237
+        type: integer
+        name: event
+        optional: true
+        mapping:
+          - dps_val: null
+            value: null
+          - dps_val: 0
+            value: null
+          - value: fed
+      - id: 237
+        type: integer
+        optional: true
+        name: portions
+  - entity: switch
+    name: Log feeding
+    icon: "mdi:receipt-text-clock"
+    category: config
+    dps:
+      - id: 238
+        type: boolean
+        name: switch