Anyone gotten External Control Working?

Started by garf-lloydell

garf-lloydell

I've been banging my head against a wall trying to get th External Control working as described here :

https://forum.nanoleaf.me/docs/openapi#_Toc411084321

I've got this version/firmware

  "firmwareVersion": "3.0.8",
  "model": "NL22",

but when I try to enable streaming as described I get a 404

curl --request PUT \
  --url http://192.168.0.103:16021/api/v1/<TOKENYTOKENTOKENY>/effects \
  --header 'content-type: application/json' \
  --data '{
	"command": "display",
	"animType": "extControl", "extControlVersion" : "v1"
}'

Rowak

Three things:

  1. You need to wrap your data with a "write" object. This actually seems to be a common mistake, since it isn't clear in the documentation.
  2. You need to use backslashes before your quotes when sending a curl request.
  3. You don't need to include the "extControlVersion" key in streaming protocol v1.

Your code seemed to give me a strange error so I had to change it a bit. It should look something like this:

curl -X PUT -H "Content-Type: application/json" -d "{\"write\":{\"command\":\"display\", \"animType\":\"extControl\"}}" "http://<YOUR_DEVICE_IP>:16021/api/v1/<YOUR_ACCESS_TOKEN>/effects"

Hope this helps!