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

I cannot set the warm value #1

Open
fariazz opened this issue Mar 20, 2021 · 4 comments
Open

I cannot set the warm value #1

fariazz opened this issue Mar 20, 2021 · 4 comments

Comments

@fariazz
Copy link

fariazz commented Mar 20, 2021

Hi there, first of all, thanks for making this script! I'm using it to automate a couple of lights to have cold light at day time, and warm light at night.

I'm able to set any RGB value to the light bulb, but sending the warm command doesn't do anything on my end. I can set the warmness via the mobile app, but not with command.

Example of command I'm running: python3 magichue.py -ip {ip_here} -warm 150 it also doesn't work if I try to send the warm in a raw command. cool doesn't work either.

Do you know what could be causing this? No issues at all with sending RGB values or querying status.

@domisol
Copy link

domisol commented May 3, 2021

Hi. Probably your bulb have both cold and leds.
You should try this:
"31 00 00 00 ww cc 0f 0f" where ww is warm value and cc is cold value. Both can be used at the same time.

@domisol
Copy link

domisol commented May 3, 2021

you can also change lines 133-139 in magichue.py:

    if parsed_args.warm is not None:
        warm = hex(int(parsed_args.warm)).replace('0x','')
        values = process_raw('31:00:00:00:'+warm+':00:0f:0f')

    if parsed_args.cool is not None:
        cool = hex(int(parsed_args.cool)).replace('0x','')
        values = process_raw('31:00:00:00:00:'+cool+':0f:0f')

@domisol
Copy link

domisol commented May 3, 2021

Or also if you want to use both warm and cool (interesting to make a mix):

    if parsed_args.warm is not None and parsed_args.cool is None:
        warm = hex(int(parsed_args.warm)).replace('0x','')
        values = process_raw('31:00:00:00:'+warm+':00:0f:0f')

    if parsed_args.cool is not None and parsed_args.warm is None:
        cool = hex(int(parsed_args.cool)).replace('0x','')
        values = process_raw('31:00:00:00:00:'+cool+':0f:0f')

    if parsed_args.cool is not None and parsed_args.warm is not None:
        warm = hex(int(parsed_args.warm)).replace('0x','')
        cool = hex(int(parsed_args.cool)).replace('0x','')
        values = process_raw('31:00:00:00:'+warm+":"+cool+':0f:0f')

All this because our lamp has a RGBCW driver.

@fariazz
Copy link
Author

fariazz commented May 4, 2021

Thanks @domisol ! I'll see if with these I'm able to revive a couple of lightbulbs that I got permanently stuck in the RGB mode.

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

No branches or pull requests

2 participants