digistump / OakCore

Arduino/Platformio Core for Oak including Particle library
GNU Lesser General Public License v2.1
54 stars 28 forks source link

Enable cloud serial comms to individual devices #60

Closed kh90909 closed 8 years ago

kh90909 commented 8 years ago

I've implemented the workaround discussed in #30, as described below. With a corresponding change to OakTerm, this works correctly for my Oaks. You can test this modified OakTerm here: https://rawgit.com/kh90909/OakTerm/send-to-specific-devices/index.html. It's still in a feature branch for now, but hope to merge it into master tomorrow, along with lots more progress by @emcniece and myself.


Commit message

The Particle Cloud API and ParticleJS do not appear to allow publishing events to specific devices. This change works around that limitation by having the Oaks listen to /oak/device/stdin/:deviceid and /oak/device/reset/:deviceid so that they can be individually addressed.

The Oaks are also still listening to /oak/device/stdin and /oak/device/reset so that all of one's Oaks can be addressed simultaneously if desired.

digistump commented 8 years ago

Looks good - thanks!