13 lines
418 B
C
13 lines
418 B
C
#pragma once
|
|
#include <Arduino.h>
|
|
#include <PubSubClient.h>
|
|
#include "thermostat.h"
|
|
|
|
extern float currentTemp; // Global temperature variable updated by MQTT callback
|
|
|
|
bool mqtt_connect(PubSubClient& client);
|
|
void mqtt_loop(PubSubClient& client);
|
|
void mqtt_publish_state(PubSubClient& client, ThermostatMode mode, float targetTemp, bool heating);
|
|
void mqtt_callback(char* topic, byte* payload, unsigned int length);
|
|
|