Skip to content

Commit

Permalink
Merge PR corbanmailloux#31, adding the unified sketch.
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanmailloux committed Dec 10, 2017
2 parents 318d6d5 + 82d5df4 commit 798f6d9
Show file tree
Hide file tree
Showing 2 changed files with 617 additions and 0 deletions.
57 changes: 57 additions & 0 deletions mqtt_esp8266/config-sample.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* This is a sample configuration file for the "mqtt_esp8266" light.
*
* Change the settings below and save the file as "config.h"
* You can then upload the code using the Arduino IDE.
*/

// Leave this here. These are the choices for CONFIG_STRIP below.
enum strip {
BRIGHTNESS, // only one color
RGB, // RGB LEDs
RGBW // RGB LEDs with an extra white LED per LED
};

#define CONFIG_STRIP RGB // Choose one of the options from above.

// Pins
// In case of BRIGHTNESS: only WHITE is used
// In case of RGB(W): red, green, blue(, white) is used
// All values need to be present, if they are not needed, set to -1,
// it will be ignored.
#define CONFIG_PIN_RED 0 // For RGB(W)
#define CONFIG_PIN_GREEN 2 // For RGB(W)
#define CONFIG_PIN_BLUE 3 // For RGB(W)
#define CONFIG_PIN_WHITE -1 // For BRIGHTNESS and RGBW

// WiFi
#define CONFIG_WIFI_SSID "{WIFI-SSID}"
#define CONFIG_WIFI_PASS "{WIFI-PASSWORD}"

// MQTT
#define CONFIG_MQTT_HOST "{MQTT-SERVER}"
#define CONFIG_MQTT_USER "{MQTT-USERNAME}"
#define CONFIG_MQTT_PASS "{MQTT-PASSWORD}"
#define CONFIG_MQTT_CLIENT_ID "ESP_LED" // Must be unique on the MQTT network

// MQTT Topics
#define CONFIG_MQTT_TOPIC_STATE "home/ESP_LED"
#define CONFIG_MQTT_TOPIC_SET "home/ESP_LED/set"

#define CONFIG_MQTT_PAYLOAD_ON "ON"
#define CONFIG_MQTT_PAYLOAD_OFF "OFF"

// Miscellaneous
// Default number of flashes if no value was given
#define CONFIG_DEFAULT_FLASH_LENGTH 2
// Number of seconds for one transition in colorfade mode
#define CONFIG_COLORFADE_TIME_SLOW 10
#define CONFIG_COLORFADE_TIME_FAST 3

// Reverse the LED logic
// false: 0 (off) - 255 (bright)
// true: 255 (off) - 0 (bright)
#define CONFIG_INVERT_LED_LOGIC false

// Enables Serial and print statements
#define CONFIG_DEBUG false
Loading

0 comments on commit 798f6d9

Please sign in to comment.