Photon IoT Gateway

I’ll admit it, I own IoT devices other than Particle-branded ones. However, given the strength and ease-of-use of the Particle Cloud, I have invested a lot of work building on this platform. But what do you do with devices that aren’t natively part of the Particle ecosystem? Paperweights!

Well, not anymore! With a little ingenuity, those devices can also participate in the Particle ecosystem. In this particular project, I wanted to be able to publish temperature data from an Adafruit HUZZAH ESP8266 to my Particle event stream. Now that I finally have the deep sleep problem figured out (on the Adafruit board, not Particle), I can finally share this little trick.

Check out my Photon IoT Gateway article with code samples to help you get started putting those other, non-Particle devices to work on the Particle Cloud.


@wgbartley, thank you for this. It certainly opens up some possibilities I hadn’t considered. I did have to insert a delay(100); immediately after WiFi.disconnect();; in the esp8266 code, otherwise with your code the esp8266 always sent 2 identical packets, despite all the requisite capacitors and resistors on the esp module. And they were always sent 1 second or so apart. Any idea why?
I am using a esp -07

I can’t think of why off the top of my head. The code I posted immediately goes to sleep after sending the packets. If you removed the sleep code, It probably immediately goes back through loop() and does the sensor reading, wifi connect, packet send, and disconnect all over again.

I am also running into inconsistent deep sleep behavior with the Adafruit HUZZAH version. As popular as the ESP8266 is, it seems inconsistent across all the different implementations, so things may not behave the same way on one as it does others.

There is a API endpoint also that allows you to publish events.

Its pretty cool way to loosely tie together 2 systems.