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

Add support for RL video intercom

Issue #462

Add dp 148 as a dp to try to force out of device22 devices that do not
send any dps by default.
Jason Rumney 2 лет назад
Родитель
Сommit
e2312cd6ac

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -239,7 +239,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [matteozamu](https://github.com/matteozamu) for assisting with support for LoraTap garage doors.
 - [chemicalstorm](https://github.com/chemicalstorm) for contributing support for Catit pixi 6-meal pet feeder.
 - [darki73](https://github.com/darki73) for contributing support for SHerko smart curtain motorss.
-- [karolzamosc](https://github.com/karolzamosc) for assisting with support for Rumba bathroom heaters, BHT-002-GALW thermostats.
+- [karolzamosc](https://github.com/karolzamosc) for assisting with support for Rumba bathroom heaters, BHT-002-GALW thermostats and RL video intercom.
 - [pnm1977](https://github.com/pnm1977) for assisting with support for Gosund UP111_RTL smartplugs.
 - [jprasm](https://github.com/jprasm) for assisting with support for Inkbird air quality monitors.
 - [Muelner](https://github.com/Muelner) for assisting with support for WDYK 3-phase energy meter circuit breakers.

+ 1 - 0
DEVICES.md

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

+ 2 - 2
custom_components/tuya_local/device.py

@@ -342,8 +342,8 @@ class TuyaLocalDevice(object):
             # that exists on the device to get anything back.  Most switch-like
             # devices have dp 1. Lights generally start from 20.  101 is where
             # vendor specific dps start.  Between them, these three should cover
-            # most devices.
-            self._api.set_dpsUsed({"1": None, "20": None, "101": None})
+            # most devices.  148 covers a doorbell device that didn't have these
+            self._api.set_dpsUsed({"1": None, "20": None, "101": None, "148": None})
             await self.async_refresh()
             cached_state = self._get_cached_state()
 

+ 53 - 0
custom_components/tuya_local/devices/rl_video_lock.yaml

@@ -0,0 +1,53 @@
+name: Video intercom
+primary_entity:
+  entity: camera
+  dps:
+    - id: 150
+      name: record
+      type: boolean
+      optional: true
+      mapping:
+        - dps_val: null
+          value: false
+    - id: 154
+      name: snapshot
+      type: base64
+      optional: true
+    - id: 191
+      name: smart_action
+      type: string
+      optional: true
+secondary_entities:
+  - entity: lock
+    name: Lock 1
+    dps:
+      - id: 148
+        type: boolean
+        name: lock
+  - entity: lock
+    name: Lock 2
+    dps:
+      - id: 232
+        type: boolean
+        name: lock
+  - entity: binary_sensor
+    name: Doorbell
+    class: sound
+    category: diagnostic
+    dps:
+      - id: 136
+        type: string
+        name: sensor
+        optional: true
+        persist: false
+        mapping:
+          - dps_val: null
+            value: false
+          - dps_val: ""
+            value: false
+          - value: true
+      - id: 136
+        type: string
+        name: details
+        optional: true
+        persist: false