1
0
Fork 0
mirror of https://github.com/Luzifer/tasmota-build.git synced 2024-12-22 22:01:18 +00:00

Upgrade to tasmota v8.x.x

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-07-04 00:56:47 +02:00
parent fc750c70b3
commit 3d2417824a
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
4 changed files with 75 additions and 239 deletions

View file

@ -1,7 +1,7 @@
TASMOTA_VERSION=v6.4.1 TASMOTA_VERSION=v8.3.1
export PLATFORMIO_BUILD_FLAGS=-DUSE_CONFIG_OVERRIDE export PLATFORMIO_BUILD_FLAGS=-DUSE_CONFIG_OVERRIDE
default: build_sonoff build_sonoff-minimal default: build_tasmota
chown: chown:
chown -R $(UID) build chown -R $(UID) build
@ -9,10 +9,10 @@ chown:
ci: full-clean default ci: full-clean default
build_%: download korvike venv build_%: download korvike venv
./korvike -i override_$*.h -o tasmota/sonoff/user_config_override.h ./korvike -i user_config_override.h -o tasmota/tasmota/user_config_override.h
cd tasmota && ../venv/bin/platformio run -e $* cd tasmota && ../venv/bin/platformio run -e $*
mkdir -p build mkdir -p build
cp tasmota/.pio/build/$*/firmware.bin build/$*.bin cp tasmota/.pioenvs/$*/firmware.bin build/$*.bin
clean final: clean final:
rm -rf korvike tasmota venv rm -rf korvike tasmota venv
@ -29,7 +29,7 @@ korvike:
mv korvike_linux_amd64 korvike mv korvike_linux_amd64 korvike
venv: venv:
virtualenv -p python2 venv virtualenv venv
./venv/bin/pip install -r requirements.txt ./venv/bin/pip install -r requirements.txt
.PHONY: venv .PHONY: venv

View file

@ -1,118 +0,0 @@
#ifndef _USER_CONFIG_OVERRIDE_H_
#define _USER_CONFIG_OVERRIDE_H_
// force the compiler to show a warning to confirm that this file is inlcuded
#warning **** user_config_override.h: Using settings override with flavour "sonoff-minimal"
/*********************************************************************************************\
* SECTION 1
* - After initial load any change here only take effect if CFG_HOLDER is changed too
\*********************************************************************************************/
// -- Wifi ----------------------------------------
#undef STA_SSID1
#define STA_SSID1 "{{ env "WIFI_SSID" }}" // [Ssid1] Wifi SSID
#undef STA_PASS1
#define STA_PASS1 "{{ env "WIFI_PASS" }}" // [Password1] Wifi password
// -- Ota -----------------------------------------
#undef OTA_URL
#define OTA_URL "{{ env "OTA_URL" }}" // [OtaUrl]
// -- MQTT ----------------------------------------
#undef MQTT_HOST
#define MQTT_HOST "{{ env "MQTT_HOST" }}" // [MqttHost]
#undef MQTT_USER
#define MQTT_USER "{{ env "MQTT_USER" }}" // [MqttUser] MQTT user
#undef MQTT_PASS
#define MQTT_PASS "{{ env "MQTT_PASS" }}" // [MqttPassword] MQTT password
// -- MQTT topics ---------------------------------
// %topic% token options (also ButtonTopic and SwitchTopic)
#undef MQTT_TOPIC
#define MQTT_TOPIC "unconfigured" // [Topic] (unique) MQTT device topic, set to 'PROJECT "_%06X"' for unique topic including device MAC address
// -- MQTT - Telemetry ----------------------------
#undef TELE_PERIOD
#define TELE_PERIOD 30 // [TelePeriod] Telemetry (0 = disable, 10 - 3600 seconds)
// -- Time - Up to three NTP servers in your region
#undef NTP_SERVER1
#define NTP_SERVER1 "ptbtime1.ptb.de" // [NtpServer1] Select first NTP server by name or IP address (129.250.35.250)
#undef NTP_SERVER2
#define NTP_SERVER2 "ptbtime2.ptb.de" // [NtpServer2] Select second NTP server by name or IP address (5.39.184.5)
// -- Location ------------------------------------
#undef LATITUDE
#define LATITUDE 53.58328 // [Latitude] Your location to be used with sunrise and sunset
#undef LONGITUDE
#define LONGITUDE 9.71719 // [Longitude] Your location to be used with sunrise and sunset
/*********************************************************************************************\
* END OF SECTION 1
*
* SECTION 2
* - Enable a feature by removing both // in front of it
* - Disable a feature by preceding it with //
\*********************************************************************************************/
// -- MQTT - Domoticz -----------------------------
#undef USE_DOMOTICZ // Enable Domoticz (+6k code, +0.3k mem)
// -- MQTT - Home Assistant Discovery -------------
#undef USE_HOME_ASSISTANT // Enable Home Assistant Discovery Support (+2k code)
// -- HTTP ----------------------------------------
#undef USE_EMULATION // Enable Belkin WeMo and Hue Bridge emulation for Alexa (+16k code, +2k mem)
// -- mDNS ----------------------------------------
#undef USE_DISCOVERY // Enable mDNS for the following services (+8k code, +0.3k mem)
// -- Time ----------------------------------------
#undef USE_TIMERS // Add support for up to 16 timers (+2k2 code)
// -- Rules ---------------------------------------
#undef USE_RULES // Add support for rules (+4k4 code)
// -- Internal Analog input -----------------------
#define USE_ADC_VCC // Display Vcc in Power status. Disable for use as Analog input on selected devices
// -- One wire sensors ----------------------------
#undef USE_DS18x20 // Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
// -- I2C sensors ---------------------------------
#undef USE_I2C
// -- Serial sensors ------------------------------
#undef USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
#undef USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
#undef USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code)
#undef USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code)
#undef USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+0k8 code)
#undef USE_TUYA_DIMMER // Add support for Tuya Serial Dimmer
#undef USE_ARMTRONIX_DIMMERS // Add support for Armtronix Dimmers (+1k4 code)
#undef USE_PS_16_DZ // Add support for PS-16-DZ Dimmer
// Power monitoring sensors -----------------------
#undef USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code)
#undef USE_PZEM_AC // Add support for PZEM014,016 Energy monitor (+1k1 code)
#undef USE_PZEM_DC // Add support for PZEM003,017 Energy monitor (+1k1 code)
#undef USE_MCP39F501 // Add support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code)
// -- Low level interface devices -----------------
#undef USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram)
#undef USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
#undef USE_ARILUX_RF // Add support for Arilux RF remote controller (+0k8 code, 252 iram (non 2.3.0))
#undef USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
#undef USE_HX711 // Add support for HX711 load cell (+1k5 code)
#undef USE_RF_FLASH // Add support for flashing the EFM8BB1 chip on the Sonoff RF Bridge. C2CK must be connected to GPIO4, C2D to GPIO5 on the PCB (+3k code)
#undef USE_TX20_WIND_SENSOR // Add support for La Crosse TX20 anemometer (+2k code)
#undef USE_RC_SWITCH // Add support for RF transceiver using library RcSwitch (+2k7 code, 460 iram)
#endif // _USER_CONFIG_OVERRIDE_H_

View file

@ -1,116 +0,0 @@
#ifndef _USER_CONFIG_OVERRIDE_H_
#define _USER_CONFIG_OVERRIDE_H_
// force the compiler to show a warning to confirm that this file is inlcuded
#warning **** user_config_override.h: Using settings override with flavour "sonoff"
/*********************************************************************************************\
* SECTION 1
* - After initial load any change here only take effect if CFG_HOLDER is changed too
\*********************************************************************************************/
// -- Wifi ----------------------------------------
#undef STA_SSID1
#define STA_SSID1 "{{ env "WIFI_SSID" }}" // [Ssid1] Wifi SSID
#undef STA_PASS1
#define STA_PASS1 "{{ env "WIFI_PASS" }}" // [Password1] Wifi password
// -- Ota -----------------------------------------
#undef OTA_URL
#define OTA_URL "{{ env "OTA_URL" }}" // [OtaUrl]
// -- MQTT ----------------------------------------
#undef MQTT_HOST
#define MQTT_HOST "{{ env "MQTT_HOST" }}" // [MqttHost]
#undef MQTT_USER
#define MQTT_USER "{{ env "MQTT_USER" }}" // [MqttUser] MQTT user
#undef MQTT_PASS
#define MQTT_PASS "{{ env "MQTT_PASS" }}" // [MqttPassword] MQTT password
// -- MQTT topics ---------------------------------
// %topic% token options (also ButtonTopic and SwitchTopic)
#undef MQTT_TOPIC
#define MQTT_TOPIC "unconfigured" // [Topic] (unique) MQTT device topic, set to 'PROJECT "_%06X"' for unique topic including device MAC address
// -- MQTT - Telemetry ----------------------------
#undef TELE_PERIOD
#define TELE_PERIOD 30 // [TelePeriod] Telemetry (0 = disable, 10 - 3600 seconds)
// -- Time - Up to three NTP servers in your region
#undef NTP_SERVER1
#define NTP_SERVER1 "ptbtime1.ptb.de" // [NtpServer1] Select first NTP server by name or IP address (129.250.35.250)
#undef NTP_SERVER2
#define NTP_SERVER2 "ptbtime2.ptb.de" // [NtpServer2] Select second NTP server by name or IP address (5.39.184.5)
// -- Location ------------------------------------
#undef LATITUDE
#define LATITUDE 53.58328 // [Latitude] Your location to be used with sunrise and sunset
#undef LONGITUDE
#define LONGITUDE 9.71719 // [Longitude] Your location to be used with sunrise and sunset
/*********************************************************************************************\
* END OF SECTION 1
*
* SECTION 2
* - Enable a feature by removing both // in front of it
* - Disable a feature by preceding it with //
\*********************************************************************************************/
// -- MQTT - Domoticz -----------------------------
#undef USE_DOMOTICZ // Enable Domoticz (+6k code, +0.3k mem)
// -- MQTT - Home Assistant Discovery -------------
#undef USE_HOME_ASSISTANT // Enable Home Assistant Discovery Support (+2k code)
// -- HTTP ----------------------------------------
#undef USE_EMULATION // Enable Belkin WeMo and Hue Bridge emulation for Alexa (+16k code, +2k mem)
// -- Time ----------------------------------------
#undef USE_TIMERS // Add support for up to 16 timers (+2k2 code)
// -- Rules ---------------------------------------
#undef USE_RULES // Add support for rules (+4k4 code)
// -- Internal Analog input -----------------------
#define USE_ADC_VCC // Display Vcc in Power status. Disable for use as Analog input on selected devices
// -- One wire sensors ----------------------------
// WARNING: Select none for default one DS18B20 sensor or enable one of the following two options for multiple sensors
//#define USE_DS18x20_LEGACY // Optional for more than one DS18x20 sensors with dynamic scan using library OneWire (+1k5 code)
#undef USE_DS18x20 // Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
// #define W1_PARASITE_POWER // If using USE_DS18x20 then optimize for parasite powered sensors
// -- Serial sensors ------------------------------
#undef USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
#undef USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
#undef USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code)
#undef USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code)
#undef USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+0k8 code)
#undef USE_TUYA_DIMMER // Add support for Tuya Serial Dimmer
#undef USE_ARMTRONIX_DIMMERS // Add support for Armtronix Dimmers (+1k4 code)
#undef USE_PS_16_DZ // Add support for PS-16-DZ Dimmer
// Power monitoring sensors -----------------------
#undef USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code)
#undef USE_PZEM_AC // Add support for PZEM014,016 Energy monitor (+1k1 code)
#undef USE_PZEM_DC // Add support for PZEM003,017 Energy monitor (+1k1 code)
#undef USE_MCP39F501 // Add support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code)
// -- Low level interface devices -----------------
#undef USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram)
#undef USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
#undef USE_ARILUX_RF // Add support for Arilux RF remote controller (+0k8 code, 252 iram (non 2.3.0))
#undef USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
#undef USE_HX711 // Add support for HX711 load cell (+1k5 code)
#undef USE_RF_FLASH // Add support for flashing the EFM8BB1 chip on the Sonoff RF Bridge. C2CK must be connected to GPIO4, C2D to GPIO5 on the PCB (+3k code)
#undef USE_TX20_WIND_SENSOR // Add support for La Crosse TX20 anemometer (+2k code)
#undef USE_RC_SWITCH // Add support for RF transceiver using library RcSwitch (+2k7 code, 460 iram)
#endif // _USER_CONFIG_OVERRIDE_H_

70
user_config_override.h Normal file
View file

@ -0,0 +1,70 @@
/*
user_config_override.h - user configuration overrides my_user_config.h for Tasmota
Copyright (C) 2020 Theo Arends
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 _USER_CONFIG_OVERRIDE_H_
#define _USER_CONFIG_OVERRIDE_H_
// force the compiler to show a warning to confirm that this file is included
#warning **** user_config_override.h: Using Settings from this File ****
/*****************************************************************************************************\
* USAGE:
* To modify the stock configuration without changing the my_user_config.h file:
* (1) copy this file to "user_config_override.h" (It will be ignored by Git)
* (2) define your own settings below
* (3) for platformio:
* define USE_CONFIG_OVERRIDE as a build flags.
* ie1 : export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE'
* for Arduino IDE:
* enable define USE_CONFIG_OVERRIDE in my_user_config.h
******************************************************************************************************
* ATTENTION:
* - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
* - Expect compiler warnings when no ifdef/undef/endif sequence is used.
* - You still need to update my_user_config.h for major define USE_MQTT_TLS.
* - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
\*****************************************************************************************************/
// -- Master parameter control --------------------
#undef CFG_HOLDER
#define CFG_HOLDER 4617 // [Reset 1] Change this value to load SECTION1 configuration parameters to flash
// -- Setup your own Wifi settings ---------------
#undef STA_SSID1
#define STA_SSID1 "{{ env "WIFI_SSID" }}" // [Ssid1] Wifi SSID
#undef STA_PASS1
#define STA_PASS1 "{{ env "WIFI_PASS" }}" // [Password1] Wifi password
// -- Setup your own MQTT settings ---------------
#undef MQTT_HOST
#define MQTT_HOST "{{ env "MQTT_HOST" }}" // [MqttHost]
#undef MQTT_PORT
#define MQTT_PORT 1883 // [MqttPort] MQTT port (10123 on CloudMQTT)
#undef MQTT_USER
#define MQTT_USER "{{ env "MQTT_USER" }}" // [MqttUser] MQTT user
#undef MQTT_PASS
#define MQTT_PASS "{{ env "MQTT_PASS" }}" // [MqttPassword] MQTT password
#endif // _USER_CONFIG_OVERRIDE_H_