ESP32 firmware to control a thermal solar installation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
362 B

#ifndef __MQTT_H__
#define __MQTT_H__
#define MQTT_TYPE_UNDEFINED 0
#define MQTT_TYPE_STRING 1
#define MQTT_TYPE_INT 2
#define MQTT_TYPE_FLOAT 3
typedef struct {
int type;
union {
char* str;
float f;
int i;
} value;
} json_value;
void mqtt_init();
void mqtt_publish_data(char* key, json_value value);
#endif