-
Notifications
You must be signed in to change notification settings - Fork 568
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
support for nebula lights #34
Comments
You can set the default DPS by specifying |
Thanks. I was able to add and define the dps but couldn't see any devices/entities. The logs says:
|
I was able to add it by modifying TuyaCache to TuyaDevice on light.py. Anyway, I can only turn the light on and off. However, I was trying to add it again by specifying different DPS (to control laser at DPS 102 and nebula light at 103) but the integration wouldn't let me since it's already added. Workaround maybe to send command using this integration to specific dps, is this possible? |
@rospogrigio I think the error above is a side-affect from #38. We really need to setup GitHub actions and with to run static code-analysis, it shouldn't be possible to merge broken code. I can try to fix that. |
If you remove the device fist, you can add multiple lights (one for each of the DP of interest). But you cannot do that after already adding one device. Maybe we should change that. |
great, was able to do this. Is it possible to map the DP for each light entity attribute (brightness/color/contrast)? |
Sorry about late reply! We support that for brightness and color temperature. Brightness is a bit buggy now as we only support 255 brightness levels (due to Home Assistant API) and tuya uses roughly 1000. So I guess you will only get the first quarter of brightness levels for now. See #73. |
Brightness levels will be fixed in #80, so we are getting closer. Would be great if you tried out that PR and verified if your bulb works. |
Thanks. The way I mapped this right now:
note: brightness of this light is on a DP that has 12 digit hexadecimal so it might be a special type. I'm contented that I can control this locally so many thanks! Here's the log when trying to control brightness (no errors):
|
note: this device uses wb3s board as I updated on blakkader, so flashing is out of the option for anyone who might get to bump on this github. |
Can you provide some values for DP 22 for various settings, so we can try to reverse engineer it? 12 hex bytes almost suggests it's some kind of RGB encoding. I'm not sure I understand what you mean regarding brightness for nebula light? Rotation speed? |
For the nebula light component DP24, it's the same as #33 which is HSV. For DP 22 (brightness of laser) and DP 24 (rotation speed), setting the value using tuya-cli, it ranges from 29 to 1000. It will not take any values below or above that range.
The device has three components - the master control, laser and nebula light. I was thinking to map the rotation speed as brightness since they have the same lower and upper value. Here's a link of the demo so you got the idea of the rotation of the laser stars and nebula light - https://youtu.be/rhdYzAY2pVE I am thinking of just configuring this device with 3 existing components
|
Ok, I think I got it. With #80 you should hopefully be able to configure the brightness range according to your needs. Maybe you can try it out? Otherwise it's just color support that is missing for the last part? Should not be any problems as long as we don't have any special encodings to deal with. |
Tested with the master branch after your merge and it is working. I guess we can close this now and I will just follow #33 for the RGB support. DP 26 for the timer is not that important. Thanks again! |
Hello, I just got this and it uses a different dps for status, I tried 1.2 and master. It's working on 1.2 by modifying the DEFAULT_ID from 1 to 20.
Below is the DPS:
102 - laser light control/status
103 - nebula control/status
22 - laser brightness default 800 (80%) max 1000 (100%)
101 - laser/rotation speed default 500 (50%) max 1000 (100%)
24 - color (first four digit - color, 2nd four digit - contrast, last four digit - brightness of nebula)
26 - timer in seconds
25 -?
20 - state
21 - mode (colour/white)
The text was updated successfully, but these errors were encountered: