error: no matching function for call to 'CloudClass::subscribe(const char [37], <unresolved overloaded function type>, Spark_Subscription_Scope_TypeDef)'
MY_DEVICES);
^
The reason is that non-static methods always need to be “linked” to the “owning” instance in order to be resolvable, which requires the function (like Particle.subscribe()) to know which instance that method belongs to.
I am using this example for "class Subscriber", publishing event and not getting any data with handler (test webhook). I have tested publish/subscribe with no "class" only handler function and that is working. Can someone check if I am stupid for this and test on theirs devices!? OS 1.4.2
If using Web IDE can you post a SHARE THIS REVISION link to your project so that we can look it how you’ve done it exactly (including the triggering publish statement)?
I’d try MY_DEVICES when you are publishing PRIVATE.
Granted, ALL_DEVICES would suggest to be a superset of MY_DEVICES but unfortunately it’s not
I’d even think that _DEVICES is somewhat confusing since it’s not really a “device” but an “event” you are subscribing to, so PRIVATE_EVENTS and PUBLIC_EVENTS would make more sense IMO.
What device are you using?
Does your Webhook work as expected?
How does your Webhook definition look?
Do you see the hook-response/mockyOk event in Console?
Yup, I missed that part.
You are only instantiating the object locally in setup() once you fall out of that function the object will vanish and the subscription with it.
When you do it this way it should work
Subscriber* mySubscriber;
void setup() {
mySubscriber = new Subscriber();
}
Ok...now works!
At the moment I tested with global object I had ALL_DEVICES in subscribtion and that was the reason that didn't work! I agree with you that ALL_DEVICES should be a superset of MY_DEVICES!!! I didn't know that.
Thanks for your help.