But regardless which core I choose, the event never gets there … They are connected to the cloud (at least I can call functions and get variables from them) …
The event you publish must be exactly the event you are subscribing to,but in your code this is not the case.
The extra /1 has to be part of the subscription event, too.
If you want to know which Core has published the event you either put this info into the event payload or you pull the DeviceID out the events standard info.
A subscription works like a prefix filter. If you subscribe to "foo", you will receive any event whose name begins with "foo", including "foo", "fool", "foobar", and "food/indian/sweet-curry-beans".
void motionDetected(const char *event, const char *data)
{
int randomNumber = rand() % 3;
// the following line just plays a sound - this method works in a loop without a problem ...
wtv020sd16p.asyncPlayVoice(randomNumber + 1);
}
Agreed, but now you could start narrowing things down, and maybe file an issue, once you have nailed down the culprit.
Just to be on the safe side, always try to incorporate some means of checking action that doesn’t involve “black box code” which might not work with some other “black box code” (e.g. subscribe handler invocation vs. wtv020sd16p).
I’d either do a D7 LED blink or a Serial.print().
Well I do believe it has to work for quite a lot of other people otherwise the community would be full with complains … for me, my setup, my account or whatever it is - it does only work for public events
“spark subscribe mine” lists all my private events