Advice how to run function on Particle Photon using POST

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Advice how to run function on Particle Photon using POST

Post 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
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest