Recieving push data from the cloud instead of polling?

I want to create a DTH for a cloud-connected device (Photon). but I want to be able to handle events in real-time instead of waiting for ST to poll the cloud service.

I already have an intermediate cloud service setup, so I need some kind of end-point in the ST API to accept a HTTP POST for example, then trigger an even in my device handler on receipt of data.

So the particle publishes “switch:on” my service receives this event and calls [switch:on] then ST instantly updates the state of the device to on and triggers any associated actions.

I can’t find any info in the documentation about doing this but it seems a common scenario.

Your use case is actually trivial.

A web service SmartApp can generate an “access token” to share with your pushing service and that can then contact the Endpoints defined in your SmartApp and mapped to methods).

If you have a budget for consulting, please feel encouraged to contact me for further assistance.

1 Like