Anyone gotten External Control Working?

Started by garf-lloydell
9f066b45b1d66f41b71a38f4bfcfadd2?s=128&d=mm

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"
}'
D82f51c8f6028e0c3681d1e83dc4c3d4?s=128&d=mm

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!