Make a file that executes a command through telnet?

I am new here, so please excuse some of my mistakes :D

I want to turn my Yeelight light bulb (compatible with Google Home/Wifi/LAN) on and off by simply pressing a key on my keyboard. The only thing I need, is a file which connects to the light bulb using telnet (I didn't find any other ways to do so) and then execute a command ( {"id":0,"method":"set_power","params":["on"]} or {"id":0,"method":"set_power","params":["off"]} ). The only issue is, the bat file i made doesn't work.

I can manually connect to the bulb using telnet and then execute the command to turn the lights on/off but not automate it.
I want to create a file that turns the lights on and file that does the opposite, using whatever is needed, so I can use my keyboard to execute that file later on.

Much thanks and sorry if this post doesn't belong here!

The bat file I made:

telnet ip port