-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve tuya_data_point_dump
: Log decoded DPs
#3687
Merged
Merged
Conversation
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 improvement proposal came up in a discussion with @flatsiedatsie in Koenkk/zigbee2mqtt#10534. If we want to go this direction, I will adapt the documentation accordingly. |
looks good, if you can make a pr for the docs I can merge this. |
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-herdsman-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]}}': type='commandDataResponse', 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]}}': type='commandDataResponse', 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)).
gmbnomis
force-pushed
the
improve_tuya_dump
branch
from
January 16, 2022 17:03
c7d5bd5
to
a16f833
Compare
gmbnomis
added a commit
to gmbnomis/zigbee2mqtt.io
that referenced
this pull request
Jan 16, 2022
Describe how to use the logging introduced by Koenkk/zigbee-herdsman-converters#3687 to identify data points when adding a new Tuya device.
(I re-pushed the commit to correct typos in the commit message, no code changes) |
Documentation MR is at Koenkk/zigbee2mqtt.io#1143 |
thanks! |
Koenkk
pushed a commit
to Koenkk/zigbee2mqtt.io
that referenced
this pull request
Jan 16, 2022
Describe how to use the logging introduced by Koenkk/zigbee-herdsman-converters#3687 to identify data points when adding a new Tuya device.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-herdsman-converters
actually has the most up-to-date list of DPvalues 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:
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)).