build using platformio
[Arduino] / sonoff / user_config.h
1 /* 
2  * user_config.h
3  * 
4  * User specific configuration parameters
5  */
6
7 #define PROJECT                "sonoff"     // PROJECT is used as the default topic delimiter and OTA file name
8 #define CFG_HOLDER             0x20160520   // Change this value to load default configurations
9
10 // Wifi
11 #define STA_SSID               "indebuurt3"      // Wifi SSID
12 #define STA_PASS               "VnsqrtnrsddbrN"  // Wifi password
13 #define WIFI_HOSTNAME          "esp-%06x-%s"
14
15 // Syslog
16 #define SYS_LOG_HOST           "domus1"
17 #define SYS_LOG_PORT           514
18 #define SYS_LOG_LEVEL          LOG_LEVEL_NONE
19 #define SERIAL_LOG_LEVEL       LOG_LEVEL_NONE
20
21 // Ota
22 #if (ARDUINO >= 168)
23   #define OTA_URL              "http://domus1:80/api/arduino/"PROJECT".ino.bin"
24 #else
25   #define OTA_URL              "http://domus1:80/api/arduino/"PROJECT".cpp.bin"
26 #endif
27
28 // MQTT
29 #define MQTT_HOST              "domus1"
30 #define MQTT_PORT              1883
31
32 #define MQTT_CLIENT_ID         "DVES_%06X"  // Also fall back topic using Chip Id = last 6 characters of MAC address
33 #define MQTT_USER              "DVES_USER"
34 #define MQTT_PASS              "DVES_PASS"
35
36 #define SUB_PREFIX             "cmnd"       // Sonoff devices subscribe to:- cmnd/MQTT_TOPIC and cmnd/MQTT_GRPTOPIC
37 #define PUB_PREFIX             "stat"       // Sonoff devices publish to:- stat/MQTT_TOPIC
38 #define MQTT_TOPIC             PROJECT
39 #define MQTT_GRPTOPIC          PROJECT"s"   // Group topic
40
41 // Application
42 #define MQTT_SUBTOPIC          "POWER"
43 #define APP_TIMEZONE           1            // +1 hour (Amsterdam)
44 #define APP_POWER              0            // Saved power state Off
45 #define APP_LEDSTATE           0            // Do not show power state (1 = Show power state)
46