-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwhr930.h
53 lines (44 loc) · 1.15 KB
/
whr930.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef ZEHNDER_WHR930_h
#define ZEHNDER_WHR930_h
#include "espMQTT.h"
class ZEHNDER_WHR930
{
private:
uint8_t sendCounter = 0;
uint8_t sendCleared = false;
struct
{
uint8_t exhaustabsent = 10;
uint8_t exhaustlow = 20;
uint8_t exhaustmedium = 50;
uint8_t exhausthigh = 90;
uint8_t intakeabsent = 15;
uint8_t intakelow = 25;
uint8_t intakemedium = 55;
uint8_t intakehigh = 95;
bool send = 0;
} fanspeed;
struct
{
uint8_t level;
bool send = 0;
} fanlevel;
struct
{
uint8_t calculated_temperature;
bool send = 0;
} comfort;
//uint16_t uptime = 0;
unsigned long lastTXtime = 0;
void sendPacket(uint16_t command, uint8_t *data = nullptr, uint8_t length = 0);
void requestData(bool startSequence = false);
static void mqttClientCallback(char* topic, byte* payload, unsigned int length);
public:
void loop();
void setup();
void secondTick(uint16_t uptime);
void setfanlevel(uint8_t level);
void setcomforttemperature(float temperature); // In 0,5 degrees celcius
};
extern ZEHNDER_WHR930 zehnder_whr930;
#endif