im triying to comunicate with telnetlib to my yeelight desk lamp with commands like this:{"id":1,"method":"set_power","params":["on","smooth",500]} and im getting errors like this:
tn.write("{"id":1,"method":"set_power","params":["off","smooth",500]}")
^
SyntaxError: invalid syntax
and my code is:
import time
import telnetlib
HOST ="192.168.1.100"
tn=telnetlib.Telnet(HOST,55443)
tn.write("{"id":1,"method":"set_power","params":["off","smooth",500]}")
l=tn.read_all()