This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
owmqtt.h
60 lines (43 loc) · 1.56 KB
/
owmqtt.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
/*
OQMQTT - 1-wire to MQTT bridge
Copyright (C) 2011-2012 Nicholas J Humfrey <njh@aelius.com>
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 _OWMQTT_H_
#define _OWMQTT_H_
/* Constants */
#define DEFAULT_OWFS_PARAMS "-u -f fic"
#define DEFAULT_POLLING (10)
#define DEFAULT_MQTT_PREFIX "/1wire"
#define DEFAULT_MQTT_HOST "mqtt.aelius.co.uk"
#define DEFAULT_MQTT_PORT (1883)
#define DEFAULT_MQTT_QOS (0)
#define DEFAULT_MQTT_RETAIN (1)
#define DEFAULT_MQTT_KEEPALIVE (10)
#define MAX_PATH_LEN (255)
#ifndef TRUE
#define TRUE (1)
#endif
#ifndef FALSE
#define FALSE (0)
#endif
// ------- Logging ---------
#define OWMQTT_DEBUG (2)
#define OWMQTT_INFO (4)
#define OWMQTT_ERROR (8)
#define owmqtt_debug( ... ) \
owmqtt_log(OWMQTT_DEBUG, __VA_ARGS__ )
#define owmqtt_info( ... ) \
owmqtt_log(OWMQTT_INFO, __VA_ARGS__ )
#define owmqtt_error( ... ) \
owmqtt_log(OWMQTT_ERROR, __VA_ARGS__ )
#endif