This commit is contained in:
2021-02-27 16:37:22 +00:00
parent e505dc4b50
commit 5b0280220e
3 changed files with 50 additions and 0 deletions

20
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,20 @@
image: python:3.8
stages:
- build
before_script:
- "pip install -U platformio"
main_mcu:
stage: build
script:
- cd firmware/main_mcu/
- cp src/config-example.h src/config.h
- pio run
lowpower_mcu:
stage: build
script:
- cd firmware/lowpower_mcu/
- pio run

View File

@@ -16,6 +16,17 @@ lib_deps =
knolleary/PubSubClient@^2.8.0 knolleary/PubSubClient@^2.8.0
bblanchon/ArduinoJson@^6.17.2 bblanchon/ArduinoJson@^6.17.2
upload_speed = 115200 upload_speed = 115200
src_filter =
;; Default filter
+<*>
-<.git/>
-<.svn/>
-<example/>
-<examples/>
-<test/>
-<tests/>
;; Don't compile until the user adds their own config
-<src/config-example.h>
[env:button-release] [env:button-release]

View File

@@ -0,0 +1,19 @@
// This is an example config file. Copy this file to "config.h" and set the
// values needed for your network.
#ifndef __CONFIG_H_
#define __CONFIG_H_
// These values will need to be modified for your environment
#define CONFIG_SSID "network-name"
#define CONFIG_PSK "password"
#define CONFIG_MQTT_SERVER "mqtt.example.com" // Either IP or hostname
#define CONFIG_MQTT_SERVER_PORT 1883 // 1883 is the default to unencrypted MQTT port
// You might want to change these, but don't likely need to.
#define CONFIG_BUTTON_EVENT_TOPIC_PREFIX "devices/"
#define CONFIG_HOMEASSISTANT_MQTT_PREFIX "homeassistant/"
#define CONFIG_BUTTON_STATE_TOPIC_NAME "state"
#define CONFIG_BUTTON_TRIGGER_TOPIC_NAME "trigger"
#endif // __CONFIG_H_