# Multiple photon inter communication

**URL:** <https://community.particle.io/t/multiple-photon-inter-communication/18517>\
**Category:** General\
**Created:** [December 24, 2015, 12:32pm UTC](https://community.particle.io/t/multiple-photon-inter-communication/18517 "2015-12-24T12:32:18Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [December 24, 2015, 4:37pm UTC](https://community.particle.io/t/multiple-photon-inter-communication/18517/5 "2015-12-24T16:37:52Z")

</div>

The cloud based approach would definetly be the easiest.

Whatever condition needs attention would be “broadcasted” via `Particle.publish("IncidentBucket1", "WhateverHappened")` and the other devices would subscribe to these notifications via `Particle.subscribe("IncidentBucket", doSomething)` where `void doSomething(const char* event, const char* data)` is a function that would look at `event` and `data` and act upon it.

Notice that the subscription only looks for any event **_starting with_** _“IncidentBucket”_, which bucket can be distinguished by looking at `event` inside the subscription handler.

---

_[View the full topic](https://community.particle.io/t/multiple-photon-inter-communication/18517)._
