The reason is it needs to send an answer to the host saying something like {"method":"props","params":{"power":"on"}} while printf "something" > /dev/tcp/xxx/yyy does not imply answers.
The solution is to change from
printf "{\"id\":1,$2}\r\n" >/dev/tcp/$ip/55443
to
printf "{\"id\":1,$2}\r\n" | nc -w 1 $ip 55443 &
It means netcat gets an answer and closes the connection after 1 second working in background. Works OK after that.
While Yeelight s1 works OK, the new W3 does not.
The reason is it needs to send an answer to the host saying something like
{"method":"props","params":{"power":"on"}}
whileprintf "something" > /dev/tcp/xxx/yyy
does not imply answers.The solution is to change from
printf "{\"id\":1,$2}\r\n" >/dev/tcp/$ip/55443
toprintf "{\"id\":1,$2}\r\n" | nc -w 1 $ip 55443 &
It means netcat gets an answer and closes the connection after 1 second working in background. Works OK after that.