Skip to content
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

How to set arbitrary RGB colors using the easy tool? #156

Open
unfa opened this issue Dec 27, 2022 · 2 comments
Open

How to set arbitrary RGB colors using the easy tool? #156

unfa opened this issue Dec 27, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@unfa
Copy link

unfa commented Dec 27, 2022

I've managed to turn on/off my lights using the simple tool, but when I tried using set_state or the Python example code I had errors and wasn't able to set arbitrary RGB colors.

Would it be possible to add an option to set RGB colors in the easy tool?
If it is already possible - is there any documentation or examples of how to do that? I wasn't abel to figure it out based on the help text and Python code alone.

@sbidy
Copy link
Owner

sbidy commented Jan 6, 2023

You can do this with await light.turn_on(PilotBuilder(rgb = (0, 128, 255))) this will turn_on the bulb with the defined rgb values.
In the CLI "tool" you can't do this.

A full example you can find in the readme (create the need objects etc.).

@sbidy sbidy added the question Further information is requested label Jan 6, 2023
@sbidy sbidy self-assigned this Jan 6, 2023
@unfa
Copy link
Author

unfa commented Jan 6, 2023

Thanks. I managed to implement this using Godot game engine. I've looked into pywizlight's source code to find out what data is sent and I have figured out how to send UDP packets from Godot.

Demo and source code are here: https://youtu.be/SEbsYTw1rY8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants