Gestion MQTT
This commit is contained in:
5
Thermostat/.gitignore
vendored
Normal file
5
Thermostat/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.pio
|
||||||
|
.vscode/.browse.c_cpp.db*
|
||||||
|
.vscode/c_cpp_properties.json
|
||||||
|
.vscode/launch.json
|
||||||
|
.vscode/ipch
|
||||||
10
Thermostat/.vscode/extensions.json
vendored
Normal file
10
Thermostat/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
|
// for the documentation about the extensions.json format
|
||||||
|
"recommendations": [
|
||||||
|
"platformio.platformio-ide"
|
||||||
|
],
|
||||||
|
"unwantedRecommendations": [
|
||||||
|
"ms-vscode.cpptools-extension-pack"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <PubSubClient.h>
|
#include <PubSubClient.h>
|
||||||
|
#include "thermostat.h"
|
||||||
|
|
||||||
|
|
||||||
void setup_mqtt(PubSubClient& client);
|
void setup_mqtt(PubSubClient& client);
|
||||||
void mqtt_loop(PubSubClient& client);
|
void mqtt_loop(PubSubClient& client);
|
||||||
@@ -8,3 +10,4 @@ void mqtt_publish_state(PubSubClient& client, ThermostatMode mode, float targetT
|
|||||||
void mqtt_callback(char* topic, byte* payload, unsigned int length);
|
void mqtt_callback(char* topic, byte* payload, unsigned int length);
|
||||||
extern String mqtt_device_id;
|
extern String mqtt_device_id;
|
||||||
extern String mqtt_temp_topic;
|
extern String mqtt_temp_topic;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[env:sonoff_basic_r2]
|
[env:sonoff_basic]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = sonoff_basic_r2
|
board = sonoff_basic
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_speed = 115200
|
upload_speed = 115200
|
||||||
|
|||||||
Reference in New Issue
Block a user