AllWize Library
configuration.sample.h
Go to the documentation of this file.
1 /*
2 
3 Configuration file
4 
5 */
6 
7 #pragma once
8 
9 //------------------------------------------------------------------------------
10 // Payload data format
11 //------------------------------------------------------------------------------
12 
13 #define DECODE_PAYLOAD 1
14 
15 #define PAYLOAD_CSV 1
16 #define PAYLOAD_MBUS 2
17 #define PAYLOAD_LPP 3
18 
19 #define PAYLOAD_ENCODING PAYLOAD_LPP
20 
21 //------------------------------------------------------------------------------
22 // General configuration
23 //------------------------------------------------------------------------------
24 
25 #define DEBUG_SERIAL Serial
26 
27 //------------------------------------------------------------------------------
28 // WiFi credentials
29 //------------------------------------------------------------------------------
30 
31 #define WIFI_SSID "..."
32 #define WIFI_PASSWORD "..."
33 
34 //------------------------------------------------------------------------------
35 // Radio module connections
36 //------------------------------------------------------------------------------
37 
38 #define RESET_PIN 14
39 #define RX_PIN 5
40 #define TX_PIN 4
41 
42 //------------------------------------------------------------------------------
43 // Wize configuration
44 //------------------------------------------------------------------------------
45 
46 #define WIZE_CHANNEL CHANNEL_04
47 #define WIZE_POWER POWER_20dBm
48 #define WIZE_DATARATE DATARATE_2400bps
49 
50 //------------------------------------------------------------------------------
51 // MQTT configuration
52 //------------------------------------------------------------------------------
53 
54 #define MQTT_HOST "192.168.2.2"
55 #define MQTT_PORT 1883
56 #define MQTT_USER ""
57 #define MQTT_PASS ""
58 #define MQTT_QOS 2
59 #define MQTT_RETAIN 0
60 
61 //------------------------------------------------------------------------------
62 // Forwarder
63 //------------------------------------------------------------------------------
64 
65 #define PING_INTERVAL 30000