Replies: 1 comment
-
The syntax to set a non-default property is I don't personally use color bulbs so I don't know exactly how they work. If you search through the issues here, I believe others have posted the control scheme for similar devices in the past. Documentation for set: https://codetheweb.github.io/tuyapi/#tuyadeviceset |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, and thank you for making this API package! I am trying to build a raspberry pi control panel for some smart bulbs in my house. I got my Pi Zero running your asynchronous example code after a little trouble shooting, works great to toggle the lights on/off!
I would like the ability to toggle between colour and white mode but am having no luck.
I tried changing the index of data.dps but it still just toggles the light on off. I also realize that setting the ! of a string value makes no sense, so a quick if statement is probably needed to set the set value based on the existing one.
I am brand new to node.js and its hard for me to tell what your codes doing, whats generic js and what is built on your repo. Here is the dps hash: and advice would be greatly appreciated!
dps: { '1': false, **'2': 'colour',** '3': 255, '4': 255, '5': '9e001d015dff9d', '6': '3855b40168ffff', '7': 'ffff500100ff00', '8': 'ffff8003ff000000ff000000ff000000000000000000', '9': 'ffff5001ff0000', '10': 'ffff0505ff000000ff00ffff00ff00ff0000ff000000' } }
Beta Was this translation helpful? Give feedback.
All reactions