How to publish custom MQTT messages?

Hi,
I would like to publish my own MQTT messages from Core module. At this moment I am using Climate monitor example which publish MQTT messages on every sensor change. I would like to publish my custom message. Does exists some example for this?

Thanks!
Milan

Hi,
yes exists, for example here https://github.com/bigclownlabs/bcf-radio-flood-detector/blob/master/app/application.c#L88

We have these features for user topics in the SDK

bool bc_radio_pub_bool(const char *subtopic, bool *value);
bool bc_radio_pub_int(const char *subtopic, int *value);
bool bc_radio_pub_uint32(const char *subtopic, uint32_t *value);
bool bc_radio_pub_float(const char *subtopic, float *value);
bool bc_radio_pub_string(const char *subtopic, const char *value);

1 Like

Thank you very much! It is exactly what I need…

Can you please send me some link to one of these features? Because before I wrote here I looked for it on sdk.bigclown.com without success…

Ou,
this header file is without doc, we must fix it :slight_smile: