Open tommicarraro opened 1 year ago
I am slowly unfolding the actual encoding of the Dreamlight scene mode format:
def encode_simple_custom_base64(value):
characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
value = max(1, min(value, 64))
encoded_char = characters[value - 1]
return encoded_char
def encode_custom_base64(value):
value = max(1, min(value, 100))
quotient, remainder = divmod(value , 64)
encoded_char = encode_simple_custom_base64(quotient) + encode_simple_custom_base64(remainder)
return encoded_char
def main(name):
header = "AckAZGT" - related to static dreamlight mode
header += "A" # color transition
header += "AA" # probably another setting
header += encode_custom_base64(50) #brighness
R = 60 #saturation
G = 12 #color wheel value
B = 64 #not very clear
for i in range(15):
header += 'A'
header += encode_simple_custom_base64(G)
header += encode_simple_custom_base64(R)
header += encode_simple_custom_base64(B)
print(insert_text_in_main_body(header))
I would really enjoy some propper support eventually, especially for the static mode so I can write home assistent scripts that trigger basic animations.
I'm not quite sure but I think I've got at least a similar or maybe the same problem. If that's not on topic let me know.
It's a tuya controllable RGBIC strip, which doesn't seem to work correctly for me. I'm attaching some screenshots from my app and available configuration here, maybe that helps! Would love to see this integrated in local tuya correctly.
From what your "modes" (seems to be called "dynamic_mod" in the API) are saying these seem to be different ones to mine tho, being:
Also I can choose from the following "scenes" in the app:
Besides that I have the option for "dimmer" (just a color selection), "music" and "timer".
If there's anything else I could read from the Tuya IoT explorer that helps, let me know.
Hi everyone. I'm also interested in taking full control of this led light strip. Please DM when you've had any success in setting indivudal segments through python/homeassistant control. Thanks!
Hi, Im having the same issue (I think): LocalTuya: Detected most of my devices but one RGB Strip is not discovered. I tried to add it manually but I got this message: Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.
I went on a little wild goose chase in trying to reverse engineer the individual segment control... No luck so far, but maybe it inspires one of you to the correct path.: https://chat.openai.com/share/69b96cbf-b258-4786-ab53-56b8b650ef59
Also watching this in hopes for a solution. If only it was possible to flash WLED on the majority of these controllers!
following as same issue
Looks like tuya has documented the protocol for this! https://developer.tuya.com/en/docs/iot/sdk?id=Kbhjudllricrx Odd issue is that DP 58 (number of LEDs) is not exposed, but I suppose this is perhaps set via the hardware and isn't something we'd need to play with.
Also looks like there's some code on how to make scenes, but it's beyond my coding ability: https://github.com/tuya/tuya-panel-demo/tree/main/examples/lampLightString
The problem
Device Informations
Product Name: WIFI幻彩灯带 Product Category: dd
From the product category, it seems that the instruction set is the following: https://developer.tuya.com/en/docs/iot/strip-lights?id=Kaof81gv0qj9i
DP dump and missing DPS
Missing DPS that the test.py script is not able to discover but are present on the tuya iot "Device Debugging" console. To get them, I've followed the tutorial that Zigbee2MQTT.io provides at: https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#_8-find-your-data-point
and the data found are confirmed by official API through Postman https://developer.tuya.com/en/docs/iot/set-up-postman-environment?id=Ka7o385w1svns
What is working, and what not with localtuya:
Some Device Commands
Dreamlight scene mode
Dreamlight built-in music sync