Page 1 of 1

Advice how to run function on Particle Photon using POST

Posted: Monday 24 July 2017 12:58
by Jumper3126
Hi all,
I have a particle photon, basically an advance arduino with wifi onboard, to run a linear actuator that opens a window. I want my Domoticz (raspi) to give instructions when to open and close it (for example at certain temp). The photon is already programmed, and open en close can be initiated from outside, using HTTP post function.

I dont however get this to work on the domoticz site. What would the proper way be? Lua, Blockly, Python?

For an example, please check https://docs.particle.io/guide/getting- ... hoton/#use

Re: Advice how to run function on Particle Photon using POST

Posted: Tuesday 25 July 2017 21:41
by Jumper3126
Solved it :)

Created bash file OpenSerreWindow.sh, which calls the function OpenWindow:

Code: Select all

#!/bin/bash
curl https://api.particle.io/v1/devices/your-device-ID-goes-here/OpenWindow -d access_token=your-access-token-goes-here
make executable
Then call it as a switch on action

Code: Select all

script://bash/OpenSerreWindow.sh