How to address the yeelight bulb via a script?

Grant your device ip address is 123.456.123.456, you can use telnet to control it:

telnet 123.456.123.456 55443
Trying 123.456.123.456…
Connected to 123.456.123.456.
Escape character is ‘^]’.

 // Command : powe on/off
 {"id":1,"method":"set_power","params":["on","smooth",500]}
 {"id":1,"method":"set_power","params":["off","smooth",500]}

 // Command :  change bright
 {"id":1,"method":"set_bright","params":[%value, "smooth", 200]}

 // Command : change color temperature
{"id":1,"method":"set_ct_abx","params":[%value, "smooth", 500]}

You can have a try, good luck!