forked from Cloudxtreme/insteon_hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInsteon.h
68 lines (56 loc) · 1.11 KB
/
Insteon.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef INSTEON_H
#define INSTEON_H
#define STATUS 1
#define RELAY 90
#define DIMMER 91
#define SCENE 92
#define THERMOSTAT 93
#define ON_HEAT 4
#define ON_COOL 5
#define ON_AUTO 6
#define ON_FAN 7
#define OFF_FAN 8
#define OFF_ALL 9
#define COOL_SET 10
#define HEAT_SET 11
#define ON 11
#define FAST_ON 12
#define OFF 13
#define FAST_OFF 14
#define BRIGHT 15
#define DIM 16
#include <string>
using namespace std;
class Insteon {
private:
string _IP;
int _tcp_port;
string _device;
int _deviceType;
int _command;
int _level;
int _random;
bool _level_is_raw;
unsigned char _return_value;
string getRelayCommand();
string getDimmerCommand();
string getSceneCommand();
string getThermostatCommand();
string getStatusCommand();
string getCommandString();
void int2hex(const int, char*);
void hex2bin(const char*, unsigned char*);
public:
Insteon(string);
void setType(int);
bool setDevice(string);
void setLevel(int, bool);
void setCommand(int);
bool sendCommand();
int getLastStatus();
int type() const;
string typeName();
string getLevel();
string getTemp();
};
#endif