I have a mixed population of Spark and Photons controlling lights in a smart home configuration. The publishes from both types are picked up just fine within my PC web browser if it subscribes to the event streams concerned. However, I have a photon subscribing to those same “smartHome” events from a Spark board and it doesn’t seem to be getting those events - though clearly they are being generated because a web server running on a PC on the same LAN is getting and displaying them. Is there any basic incompatibility between Spark.publish() and Particle.subscribe() Or, should they be fully interchangeable? I can’t find any mentioned of incompatibility in the reference pages.
In addition to @Moors7’s question: Are all devices claimed to the same account, all publishing PRIVATE and subscribing to MY_DEVICES (or PUBLIC/ALL_DEVICES - which is default without explicitly telling) and are all devices running the same system version.
There have been changes between 0.3.4 pub/sub that might have broken the communication between “incompatible” versions.
which as you can see, should just mean that whenever the photon gets a message via the subscription, it toggles the LED state - but that never happens.
The Spark is firmware version 0.3.4 whilst the Photon is 0.5.2 Does that amount to a version mismatch? @ScruffR? Or do the two have different release streams?
Best regards
Alan T
Yes, you’ll see some incompatibility between those versions.
Previously the distinction between PRIVATE publishes and ALL_DEVICES subscriptions was different, but now you need to subscribe with MY_DEVICES when you want to catch a PRIVATE event.
See https://github.com/spark/firmware/issues/645
But I’d suggest upgrading your 0.3.4 to 0.5.2 for all the bug fixes and consistency anyway.
Yes, that did it, added MY_DEVICES and we’re off to the races! Thanks.
As you suggest I will update my residual Spark devices ASAP - although I may be replacing them with Photons anyway in a couple of weeks.