@AndyRawson Resurrecting a old post here… sorry.
I’m working on improving the blind project mentioned above by adding a local potentiometer control and some temperature, luminance, humidity sensors.
Local control and reading on the Photon are working fine but my challenge is to have the Photon send those data back to Smartthings.
I saw your code and I was very exited to use some parts of it.
Where I am:
First on ST side:
Creating a Smartapp, basic, I was able to run in a simulator, and manually call the function using Curl, worked fine.
Then on the Photon side:
Long story short… I ended up using Webhook that you create in the CLI; it allowed me to PUT some commands/values with particle.publish in the Photon’s firmware. (in theory at least, I’m not there yet).
I had to create a JSON file with the header containing the Authorisation Bearer and send the HTTPS PUT to Smarthings containing the API Endpoint and the Token I had from the simulator, and it worked fine too.
BUT that works only with the Simulator, I have the impression that the Photon need to call some sort of authorization URL at Smartthings to get a proper Endpoint and/or Token… this concept is still very blurry to me.
So I have a couple of question for you… I know it’s been a year… but:
-In the Photon CLI, did you use any JSON file to create Webhooks?
-In Smartthing, How do we get the Endpoint and/or Token, can we get it and configure manually in the Photon, or is it changing on a regular basis?
I’m not a programmer in no means, I use bits I found useful, try to decipher and understand them and modify them to match my needs… so I’m learning a lot, but this Webhook, OAuth part, I’m very very confused…
Can you point me to the right direction?