Newer
Older
WH1080 / mqtt.h
/*
 */

#ifndef _MQTT_H_
#define _MQTT_H_

#include <stdbool.h>

extern bool MQTT_init(const char * hostname, int port, const char * username, const char * password, const char * topic);
extern bool MQTT_observation
  (
  double TemperatureC,                   // temperature in C
  double Humidity,                       // as a percentage
  double WindAveMs,
  double WindGustMs,
  char *WindDirection,                   // string "N", "NNE", "NE", "ENE", "E", etc.
  double TotalRainMm,                    // total since battery change
  double PressureHpa                     // pressure at sea level
  );
extern void MQTT_destroy();

#endif