Stand alone batch file or vera integration

Started by mjbok

mjbok

I'm looking for something I haven't been able to find with lots of searching. That is a standalone file that can run a command to the nanoleaf cluster I have. I was able to use postman to get my auth token and I can query states, but I have had no luck to actually build that into a script.

What I'm looking to do is a couple of things. I want to have a file (or other mechanism) that turns on the nanoleafs when my PC boots. If I had a working batch file or script I could just put that in the start up routine.

The other thing I'm looking for is Vera integration. I got some LUUP code that is supposed to toggle the state between on and off, but I can't get that script to run either. I know these products aren't Zwave devices, but I can call other connected devices by http requests or if it is a script I have a Pi that I use to run python scripts.

I'm not a developer by trade (PM), but I can read and parse code and if I have an example of one thing I usually can adapt the function calls to do other things. Any help would be greatly appreciated.

mjbok

I did get a curl command to work from the command line (which I turned into a batch file), so I got half of what I want going. Basically I'm stupid, but if I get the template for one function I can use that for all other functions I want. I used Postman and though I could get it working fine within postman my exported Python script didn't work!?!

For reference (in case it might help anyone) the curl command to turn off the leaf is:
curl –location –request PUT "http://192.168.x.x:16021/api/v1/YOURAUTHTOKEN/state" –header "Content-Type: application/json" –data "{"on": {"value": false}}"