This might be of interest.
In the first post the -d '{"command":"on"}' in the GET doesn’t need to be there.
-d '{"command":"on"}'