forked from Koenkk/zigbee-herdsman-converters
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
tuya_data_point_dump
: Log decoded DPs
Up to now, tuya_data_point_dump dumped the DP values in machine readable format, necessitating the use of the Python script `tuya_data_point_dump.py` to decode it. Additionally, the list of data point IDs in that script is not complete (actually, it is rather specific for Saswell devices). `zigbee-hardman-converters` actually has the most up-to-date list of DP values built-in. And it comes with DP value converters for the DP data types. We can use this to log incoming DP values in a human readable format containing the DP ID, data type, decoded value and the already known uses of the DP IP: ``` zigbee-herdsman-converters:tuya_data_point_dump: Received DP Koenkk#1 from 0x845134eaae1d0412 with raw data '{"dp":1,"datatype":4,"data":{"type":"Buffer","data":[1]}}': datatype='enum', value='1', known DP# usage: ["state","moesSsystemMode","moes105DimmerState1","trsPresenceState","haozeeSystemMode","nousTemperature","wlsWaterLeak"] zigbee-herdsman-converters:tuya_data_point_dump: Received DP Koenkk#4 from 0x845134eaae1d0412 with raw data '{"dp":4,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,86]}}': datatype='value', value='86', known DP# usage: ["mode","moesSboostHeating","haozeeBoostHeating","nousBattery","wlsBatteryPercentage"] ``` In general, this output should be sufficient to enable new Tuya devices (However, this won't decode more complex data structures for Saswell devices (like tuya_data_point_dump.py does for schedules)).
- Loading branch information
Showing
2 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters