1 #ifndef _TWR_RADIO_PUB_H
2 #define _TWR_RADIO_PUB_H
56 TWR_RADIO_PUB_EVENT_PUSH_BUTTON = 0,
57 TWR_RADIO_PUB_EVENT_PIR_MOTION = 1,
58 TWR_RADIO_PUB_EVENT_LCD_BUTTON_LEFT = 2,
59 TWR_RADIO_PUB_EVENT_LCD_BUTTON_RIGHT = 3,
60 TWR_RADIO_PUB_EVENT_ACCELEROMETER_ALERT = 4,
61 TWR_RADIO_PUB_EVENT_HOLD_BUTTON = 5
66 TWR_RADIO_PUB_STATE_LED = 0,
67 TWR_RADIO_PUB_STATE_RELAY_MODULE_0 = 1,
68 TWR_RADIO_PUB_STATE_RELAY_MODULE_1 = 2,
69 TWR_RADIO_PUB_STATE_POWER_MODULE_RELAY = 3
74 TWR_RADIO_PUB_VALUE_HOLD_DURATION_BUTTON = 0
bool twr_radio_pub_float(const char *subtopic, float *value)
Publish float value in custom topic.
bool twr_radio_pub_luminosity(uint8_t channel, float *lux)
Publish luminosity.
bool twr_radio_pub_value_int(uint8_t value_id, int *value)
Publish int value.
bool twr_radio_pub_state(uint8_t state_id, bool *state)
Publish battery.
bool twr_radio_pub_event_count(uint8_t event_id, uint16_t *event_count)
Publish event count.
bool twr_radio_pub_barometer(uint8_t channel, float *pascal, float *meter)
Publish barometer.
bool twr_radio_pub_acceleration(float *x_axis, float *y_axis, float *z_axis)
Publish acceleration.
bool twr_radio_pub_humidity(uint8_t channel, float *percentage)
Publish humidity.
bool twr_radio_pub_int(const char *subtopic, int *value)
Publish int value in custom topic.
bool twr_radio_pub_string(const char *subtopic, const char *value)
Publish string value in custom topic.
bool twr_radio_pub_temperature(uint8_t channel, float *celsius)
Publish temperature.
bool twr_radio_pub_uint32(const char *subtopic, uint32_t *value)
Publish uint32 value in custom topic.
bool twr_radio_pub_buffer(void *buffer, size_t length)
Publish buffer.
bool twr_radio_pub_battery(float *voltage)
Publish battery.
bool twr_radio_pub_push_button(uint16_t *event_count)
Publish push button event count, same as use twr_radio_pub_event_count with TWR_RADIO_PUB_EVENT_PUSH_...
bool twr_radio_pub_bool(const char *subtopic, bool *value)
Publish bool value in custom topic.
void twr_radio_pub_decode(uint64_t *id, uint8_t *buffer, size_t length)
Internal decode function for twr_radio.c.
bool twr_radio_pub_co2(float *concentration)
Publish co2.
@ TWR_RADIO_PUB_CHANNEL_R3_I2C0_ADDRESS_DEFAULT
channel 0:4
@ TWR_RADIO_PUB_CHANNEL_R2_I2C1_ADDRESS_ALTERNATE
channel 1:3
@ TWR_RADIO_PUB_CHANNEL_NONE
channel -
@ TWR_RADIO_PUB_CHANNEL_R2_I2C1_ADDRESS_DEFAULT
channel 1:2
@ TWR_RADIO_PUB_CHANNEL_R1_I2C0_ADDRESS_ALTERNATE
channel 0:1
@ TWR_RADIO_PUB_CHANNEL_R1_I2C1_ADDRESS_ALTERNATE
channel 1:1
@ TWR_RADIO_PUB_CHANNEL_R4_I2C1_ADDRESS_DEFAULT
channel 1:6
@ TWR_RADIO_PUB_CHANNEL_R2_I2C0_ADDRESS_DEFAULT
channel 0:2
@ TWR_RADIO_PUB_CHANNEL_R2_I2C0_ADDRESS_ALTERNATE
channel 0:3
@ TWR_RADIO_PUB_CHANNEL_R1_I2C0_ADDRESS_DEFAULT
channel 0:0
@ TWR_RADIO_PUB_CHANNEL_R1_I2C1_ADDRESS_DEFAULT
channel 1:0
@ TWR_RADIO_PUB_CHANNEL_R4_I2C0_ADDRESS_DEFAULT
channel 0:6
@ TWR_RADIO_PUB_CHANNEL_B
channel b
@ TWR_RADIO_PUB_CHANNEL_R4_I2C1_ADDRESS_ALTERNATE
channel 1:7
@ TWR_RADIO_PUB_CHANNEL_SET_POINT
channel set-point
@ TWR_RADIO_PUB_CHANNEL_R3_I2C1_ADDRESS_DEFAULT
channel 1:4
@ TWR_RADIO_PUB_CHANNEL_R4_I2C0_ADDRESS_ALTERNATE
channel 0:7
@ TWR_RADIO_PUB_CHANNEL_R3_I2C0_ADDRESS_ALTERNATE
channel 0:5
@ TWR_RADIO_PUB_CHANNEL_A
channel a
@ TWR_RADIO_PUB_CHANNEL_R3_I2C1_ADDRESS_ALTERNATE
channel 1:5