Gestion MQTT

This commit is contained in:
Serge NOEL
2026-03-11 14:29:08 +01:00
parent e723bf87cb
commit 59f7ae7ab3
4 changed files with 20 additions and 2 deletions

5
Thermostat/.gitignore vendored Normal file
View 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
View 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"
]
}

View File

@@ -1,6 +1,8 @@
#pragma once
#include <Arduino.h>
#include <PubSubClient.h>
#include "thermostat.h"
void setup_mqtt(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);
extern String mqtt_device_id;
extern String mqtt_temp_topic;

View File

@@ -1,6 +1,6 @@
[env:sonoff_basic_r2]
[env:sonoff_basic]
platform = espressif8266
board = sonoff_basic_r2
board = sonoff_basic
framework = arduino
monitor_speed = 115200
upload_speed = 115200