Files
AI-on-the-edge-device/code/components/jomjol_mqtt/server_mqtt.h
CaCO3 3e082ed06e Enhance homeassistant discovery (V5) (#1275)
* manual re-creation of #1246

* removed non-working approach to get interval

* postpone the MQTT service start until the ClassFlowControll::ReadParameter() gets called

* Increase the max_uri_handlers to 35 (was 30)

* removed newlines in logs

* added parameter to UI

* Register handler to re-start MQTT Discovery

* fix param
2022-11-05 19:32:58 +01:00

19 lines
703 B
C++

#include "ClassFlowDefineTypes.h"
#define LWT_TOPIC "connection"
#define LWT_CONNECTED "connected"
#define LWT_DISCONNECTED "connection lost"
void SetHomeassistantDiscoveryEnabled(bool enabled);
void mqttServer_setParameter(std::vector<NumberPost*>* _NUMBERS, int interval, float roundInterval);
void mqttServer_setMeterType(std::string meterType, std::string valueUnit, std::string timeUnit,std::string rateUnit);
void setMqtt_Server_Retain(int SetRetainFlag);
void mqttServer_setMainTopic( std::string maintopic);
void register_server_mqtt_uri(httpd_handle_t server);
void publishSystemData();
std::string getTimeUnit(void);
void GotConnected(std::string maintopic, int SetRetainFlag);