-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
[docs] Add more UPK key descriptions #219
Conversation
This time by experimenting on my PIR-enabled lamp. Motion is reported correctly via GPIO defined as pirin_pin. I am also trying to set the PIR sensitivity by applying PWM to the pirsense_pin, and I _think_ it works. More experiments are needed.
docs/resources/tuya-pin-config.md
Outdated
@@ -8,7 +8,7 @@ Key(s) | Meaning | |||
--------------------------------------------|---------------------------------------|--------------------------------------------------------- | |||
`crc` | | | |||
`module` | | | |||
`category` | | | |||
`category` |Device type encoded on a set of digits | 0502 - cw light<br>0505 - rgbcw light |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are values from my actual devices, not from the description. The ones in description had 1s instead of 5s.
@@ -113,9 +119,23 @@ Key(s) | Meaning | |||
`keyccfg1`, `keyccfg2` | | | |||
`keyfunc`, `keyglobefunc` | | | |||
`keylt`, `keynumber` | | | |||
**Pairing-related** | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see a need for keeping detailed description of the pairing-related keys.
I doubt anyone would want to duplicate this behavior in esphome :)
IMHO, simply enumerating them as ones should be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rstnum
is useful for Cutting, as they indicate how to get a device into the proper pairing modes without having the specific product manual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I didn't think of them. Then we should re-check the ones i marked as "not relevant", as they did have a description in sdk and might actually be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to keep the "known, not relevant" keys apart from the "unknown, not described yet" keys.
--------------------------------------------|---------------------------------------|--------------------------------------------------------------------------------------- | ||
`crc` | UPK data checksum | | ||
`module` | Tuya module used | `CB3S` / `WB3S` / `CBU`, etc. | ||
`category` | Device type as a number | 0502 - CW light<br>0505 - RGBCW light |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually belongs in the Lights/bulbs
section, it only exists for bulbs, and they always start with 050
The last number is number of channels
0501
is monochromatic (usually warm white)
0503
is RGB
0504
is RGBW
but all this is covered by cmod
anyway
docs/resources/tuya-pin-config.md
Outdated
`pmemory` | Power-off memory enabled | 0 / 1 | ||
`defcolor` | Default Color | `c` / `r` | ||
`defbright` | Default Brightness | 0%-100% | ||
`deftemp` | Default Color Temperature | 0-100 when defcolor is cool white | ||
`cwmaxp` | Cold-Warm Max Power | 0%-100% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The values here are wrong, the docs say it's 100-200 with a pitch of 10. I've actually just flashed a lamp which has it set to 200.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to correct it, of course. What I did today was just move stuff around, add a few missing descriptions and introduce some formatting changes. I didn't change the values or ranges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide an example. CloudCutter has ~175 UPKs with defbright
and deftemp
and none are above 100.
Sorry, I was looking at the highlighted section. I see you're referring to cwmaxp
in which case, yes, there are 2 examples of 200
and none below 100, none inbetween, but pitch 10 is probably right if documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I should've been more precise, but github's UI is still new to me (i'm used to gerrit).
@kuba2k2 Sure, this note was more for me to remember later :)
@@ -111,6 +111,12 @@ Key(s) | Meaning | |||
`pirsense_pin` + `pirsense_lv` | PIR sensitivity (PWM) + Active Level | | |||
`pirrange` | | | |||
`pirwarn` | | | |||
**Ambient light sensor** | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are actually a guess, but I have 4 lamps (2 brennenstuhls and 2 lsc) with PIR and ambient light sensor and can observe that these valuse more or less match the actual lighting reported as ADC value. And they do differ between models a bit.
Is it ready to merge, or are you going to add more descriptions? |
I guess it's ready, don't have anything I could add at the moment
…On Fri, Dec 8, 2023, 19:04 Kuba Szczodrzyński ***@***.***> wrote:
Is it ready to merge, or are you going to add more descriptions?
—
Reply to this email directly, view it on GitHub
<#219 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGFABHXP4EBECUYK36ZVWMLYINJDJAVCNFSM6AAAAABAKGRPN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGYYDKMZXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Based on description from tuya website (links provided in #218) I have filled in some of the missing information. The description was for bluetooth devices, but the keys I described seem to be more or less universal.