mlnz
October 17, 2018, 8:11pm
1
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
Karel
October 17, 2018, 9:17pm
2
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
mlnz
October 18, 2018, 5:12am
3
Thank you very much! It is exactly what I need…
mlnz
October 18, 2018, 5:20am
4
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…
Karel
October 18, 2018, 6:26am
5
Ou,
this header file is without doc, we must fix it
#ifndef _BC_RADIO_PUB_H
#define _BC_RADIO_PUB_H
#include <bc_radio.h>
//! @addtogroup bc_radio bc_radio
//! @brief Radio implementation send to gateway
//! @{
enum
{
BC_RADIO_PUB_CHANNEL_R1_I2C0_ADDRESS_DEFAULT = 0x00,
BC_RADIO_PUB_CHANNEL_R1_I2C0_ADDRESS_ALTERNATE = 0x01,
BC_RADIO_PUB_CHANNEL_R1_I2C1_ADDRESS_DEFAULT = 0x80,
BC_RADIO_PUB_CHANNEL_R1_I2C1_ADDRESS_ALTERNATE = 0x81,
BC_RADIO_PUB_CHANNEL_R2_I2C0_ADDRESS_DEFAULT = 0x02,
BC_RADIO_PUB_CHANNEL_R2_I2C0_ADDRESS_ALTERNATE = 0x03,
BC_RADIO_PUB_CHANNEL_R2_I2C1_ADDRESS_DEFAULT = 0x82,
BC_RADIO_PUB_CHANNEL_R2_I2C1_ADDRESS_ALTERNATE = 0x83,
This file has been truncated. show original