Developer - help for Night Mode

Hello all,

I’m doing my first attempts to send commands to my BS_lamp.

First thing I’d like to learn is to force the “night mode” light, beacuse I like it and I think it is the lowest light I can obtain with these lights.

Can you help me in finding the right commands?

Setting the “night mode” using Yeelight APP while having an open connection (telnet) gives this output:
{“method”:“props”,“params”:{“nl_br”:1}} to me, which is something not documented as I can understand.

Thank you for your help.
Simon

Hi Simon,

“nl_br” is a property of night mode bright value which “bright” is sun mode bright value. If “nl_br” is not 0, it means the lamp is in “Night Mode”, otherwise, it’s in sun mode.

You can use command below to set night mode for the lamp, “5” in the end mean night mode.
{"id":1,"method":"set_power","params":["on","smooth",500,5]}

Following is the definition of the mode.
public static final int TURN_ON_TO_DEFAULT = 0;
public static final int TURN_ON_TO_CT = 1;
public static final int TURN_ON_TO_COLOR = 2;
public static final int TURN_ON_TO_HSV = 3;
public static final int TURN_ON_TO_CF = 4;
public static final int TURN_ON_TO_NL = 5;

Thanks,
Andy

Thank you,
work like a charm!