add remote room controller, add mqtt-set for thermostat-settings

This commit is contained in:
MichaelDvP
2020-06-04 14:35:39 +02:00
parent be7445d024
commit 5e90d264bc
6 changed files with 271 additions and 16 deletions

45
src/roomcontrol.h Normal file
View File

@@ -0,0 +1,45 @@
/*
* EMS-ESP - https://github.com/proddy/EMS-ESP
* Copyright 2019 Paul Derbyshire
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EMSESP_ROOMCTRL_H
#define EMSESP_ROOMCTRL_H
#include "emsesp.h"
#include "telegram.h"
#include "uart/emsuart_esp8266.h"
#include "uart/emsuart_esp32.h"
namespace emsesp {
class Roomctrl {
public:
static void send(uint8_t addr);
static void check(uint8_t addr, uint8_t * data, const uint8_t length);
static void set_remotetemp(uint8_t hc, int16_t temp);
private:
#define ADDR 0x18
static void version(uint8_t addr, uint8_t dst);
static void unknown(uint8_t addr, uint8_t dst, uint8_t type, uint8_t offset);
static void temperature(uint8_t addr, uint8_t dst);
};
} // namespace emsesp
#endif