Compare commits

...

29 Commits

Author SHA1 Message Date
Jesse Hills
81b2fd78f5 Merge pull request #3204 from esphome/bump-2022.2.0
2022.2.0
2022-02-16 21:12:45 +13:00
Jesse Hills
69002fb1e6 Bump version to 2022.2.0 2022-02-16 20:13:14 +13:00
Jesse Hills
75332a752d Merge branch 'beta' into bump-2022.2.0 2022-02-16 20:13:13 +13:00
Jesse Hills
b528f48417 Merge pull request #3201 from esphome/bump-2022.2.0b3
2022.2.0b3
2022-02-16 11:10:31 +13:00
Jesse Hills
ec7a79049a Bump version to 2022.2.0b3 2022-02-16 09:45:05 +13:00
Jesse Hills
6ddad6b299 Update HA addon token (#3200) 2022-02-16 09:45:05 +13:00
Maurice Makaay
16dc7762f9 Fix strlcpy() uses to make long SSIDs and passwords work (#3199)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2022-02-16 09:45:05 +13:00
Jesse Hills
dc0ed8857f Merge pull request #3198 from esphome/bump-2022.2.0b2
2022.2.0b2
2022-02-15 12:48:34 +13:00
Jesse Hills
bb6b77bd98 Bump version to 2022.2.0b2 2022-02-15 12:00:12 +13:00
Jesse Hills
dcc80f9032 Allow framework version validator to be maximum version (#3197) 2022-02-15 12:00:12 +13:00
Otto Winter
dd554bcdf4 Make generating combined binary output verbose (#3127) 2022-02-15 12:00:12 +13:00
Jesse Hills
f376a39e55 Clamp rotary_encoder restored value to min and max (#3184) 2022-02-15 12:00:12 +13:00
dependabot[bot]
8dcc9d6b66 Bump aioesphomeapi from 10.8.1 to 10.8.2 (#3182) 2022-02-15 12:00:11 +13:00
Jesse Hills
09ed1aed93 Merge pull request #3177 from esphome/bump-2022.1.4
2022.1.4
2022-02-09 12:42:47 +13:00
Jesse Hills
53d3718028 Bump version to 2022.1.4 2022-02-09 11:54:41 +13:00
Jesse Hills
2b5dce5232 Try fix canbus config validation (#3173) 2022-02-09 11:54:40 +13:00
Otto Winter
9ad84150aa Enable mDNS during OTA safe mode (#3146) 2022-02-09 11:54:40 +13:00
Jesse Hills
c0523590b4 Merge pull request #3154 from esphome/bump-2022.1.3
2022.1.3
2022-02-03 07:17:52 +13:00
Jesse Hills
c7f091ab10 Bump version to 2022.1.3 2022-02-02 22:16:24 +13:00
Jesse Hills
7479e0aada Fix backwards string case helpers (#3126) 2022-02-02 22:16:16 +13:00
Jesse Hills
5bbee1a1fe Merge pull request #3111 from esphome/bump-2022.1.2
2022.1.2
2022-01-25 09:36:20 +13:00
Jesse Hills
bdb9546ca3 Bump version to 2022.1.2 2022-01-25 09:11:20 +13:00
Plácido Revilla
46af4cad6e Set the wrapped single light in light partition to internal (#3092) 2022-01-25 09:11:19 +13:00
Martin
76a238912b [modbus_controller] fix incorrect start address for number write (#3073) 2022-01-25 09:11:19 +13:00
Jesse Hills
909a526967 Merge pull request #3075 from esphome/bump-2022.1.1
2022.1.1
2022-01-20 09:08:57 +13:00
Jesse Hills
cd6f4fb93f Bump version to 2022.1.1 2022-01-20 08:34:18 +13:00
Jesse Hills
c19458696e Add *.py.script files to distributions (#3074) 2022-01-20 08:34:18 +13:00
Jesse Hills
318b930e9f Merge pull request #3070 from esphome/bump-2022.1.0
2022.1.0
2022-01-19 19:43:54 +13:00
Jesse Hills
9296a078a7 Bump version to 2022.1.0 2022-01-19 16:08:27 +13:00
9 changed files with 61 additions and 24 deletions

View File

@@ -143,7 +143,7 @@ jobs:
needs: [deploy-docker]
steps:
- env:
TOKEN: ${{ secrets.DEPLOY_HASSIO_TOKEN }}
TOKEN: ${{ secrets.DEPLOY_HA_ADDON_REPO_TOKEN }}
run: |
TAG="${GITHUB_REF#refs/tags/}"
curl \

View File

@@ -1,13 +1,16 @@
# Source https://github.com/letscontrolit/ESPEasy/pull/3845#issuecomment-1005864664
import esptool
from SCons.Script import ARGUMENTS
# pylint: disable=E0602
Import("env") # noqa
def esp32_create_combined_bin(source, target, env):
print("Generating combined binary for serial flashing")
verbose = bool(int(ARGUMENTS.get("PIOVERBOSE", "0")))
if verbose:
print("Generating combined binary for serial flashing")
app_offset = 0x10000
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}-factory.bin")
@@ -24,18 +27,21 @@ def esp32_create_combined_bin(source, target, env):
"--flash_size",
flash_size,
]
print(" Offset | File")
if verbose:
print(" Offset | File")
for section in sections:
sect_adr, sect_file = section.split(" ", 1)
print(f" - {sect_adr} | {sect_file}")
if verbose:
print(f" - {sect_adr} | {sect_file}")
cmd += [sect_adr, sect_file]
print(f" - {hex(app_offset)} | {firmware_name}")
cmd += [hex(app_offset), firmware_name]
print()
print(f"Using esptool.py arguments: {' '.join(cmd)}")
print()
if verbose:
print(f" - {hex(app_offset)} | {firmware_name}")
print()
print(f"Using esptool.py arguments: {' '.join(cmd)}")
print()
esptool.main(cmd)

View File

@@ -49,7 +49,12 @@ CONFIG_SCHEMA = cv.All(
}
),
_validate,
cv.only_with_arduino,
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 7, 4),
esp32_arduino=cv.Version(99, 0, 0),
max_version=True,
extra_message="Please see note on documentation for FastLED",
),
)

View File

@@ -33,7 +33,12 @@ CONFIG_SCHEMA = cv.All(
cv.Optional(CONF_DATA_RATE): cv.frequency,
}
),
cv.only_with_arduino,
cv.require_framework_version(
esp8266_arduino=cv.Version(2, 7, 4),
esp32_arduino=cv.Version(99, 0, 0),
max_version=True,
extra_message="Please see note on documentation for FastLED",
),
)

View File

@@ -138,6 +138,8 @@ void RotaryEncoderSensor::setup() {
initial_value = 0;
break;
}
initial_value = clamp(initial_value, this->store_.min_value, this->store_.max_value);
this->store_.counter = initial_value;
this->store_.last_read = initial_value;

View File

@@ -161,8 +161,8 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
// https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#_CPPv417wifi_sta_config_t
wifi_config_t conf;
memset(&conf, 0, sizeof(conf));
strlcpy(reinterpret_cast<char *>(conf.sta.ssid), ap.get_ssid().c_str(), sizeof(conf.sta.ssid));
strlcpy(reinterpret_cast<char *>(conf.sta.password), ap.get_password().c_str(), sizeof(conf.sta.password));
strncpy(reinterpret_cast<char *>(conf.sta.ssid), ap.get_ssid().c_str(), sizeof(conf.sta.ssid));
strncpy(reinterpret_cast<char *>(conf.sta.password), ap.get_password().c_str(), sizeof(conf.sta.password));
// The weakest authmode to accept in the fast scan mode
if (ap.get_password().empty()) {
@@ -709,7 +709,7 @@ bool WiFiComponent::wifi_start_ap_(const WiFiAP &ap) {
wifi_config_t conf;
memset(&conf, 0, sizeof(conf));
strlcpy(reinterpret_cast<char *>(conf.ap.ssid), ap.get_ssid().c_str(), sizeof(conf.ap.ssid));
strncpy(reinterpret_cast<char *>(conf.ap.ssid), ap.get_ssid().c_str(), sizeof(conf.ap.ssid));
conf.ap.channel = ap.get_channel().value_or(1);
conf.ap.ssid_hidden = ap.get_ssid().size();
conf.ap.max_connection = 5;
@@ -720,7 +720,7 @@ bool WiFiComponent::wifi_start_ap_(const WiFiAP &ap) {
*conf.ap.password = 0;
} else {
conf.ap.authmode = WIFI_AUTH_WPA2_PSK;
strlcpy(reinterpret_cast<char *>(conf.ap.password), ap.get_password().c_str(), sizeof(conf.ap.ssid));
strncpy(reinterpret_cast<char *>(conf.ap.password), ap.get_password().c_str(), sizeof(conf.ap.ssid));
}
#if ESP_IDF_VERSION_MAJOR >= 4

View File

@@ -1713,30 +1713,49 @@ def require_framework_version(
esp_idf=None,
esp32_arduino=None,
esp8266_arduino=None,
max_version=False,
extra_message=None,
):
def validator(value):
core_data = CORE.data[KEY_CORE]
framework = core_data[KEY_TARGET_FRAMEWORK]
if framework == "esp-idf":
if esp_idf is None:
raise Invalid("This feature is incompatible with esp-idf")
msg = "This feature is incompatible with esp-idf"
if extra_message:
msg += f". {extra_message}"
raise Invalid(msg)
required = esp_idf
elif CORE.is_esp32 and framework == "arduino":
if esp32_arduino is None:
raise Invalid(
"This feature is incompatible with ESP32 using arduino framework"
)
msg = "This feature is incompatible with ESP32 using arduino framework"
if extra_message:
msg += f". {extra_message}"
raise Invalid(msg)
required = esp32_arduino
elif CORE.is_esp8266 and framework == "arduino":
if esp8266_arduino is None:
raise Invalid("This feature is incompatible with ESP8266")
msg = "This feature is incompatible with ESP8266"
if extra_message:
msg += f". {extra_message}"
raise Invalid(msg)
required = esp8266_arduino
else:
raise NotImplementedError
if max_version:
if core_data[KEY_FRAMEWORK_VERSION] > required:
msg = f"This feature requires framework version {required} or lower"
if extra_message:
msg += f". {extra_message}"
raise Invalid(msg)
return value
if core_data[KEY_FRAMEWORK_VERSION] < required:
raise Invalid(
f"This feature requires at least framework version {required}"
)
msg = f"This feature requires at least framework version {required}"
if extra_message:
msg += f". {extra_message}"
raise Invalid(msg)
return value
return validator

View File

@@ -1,6 +1,6 @@
"""Constants used by esphome."""
__version__ = "2022.2.0b1"
__version__ = "2022.2.0"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"

View File

@@ -10,7 +10,7 @@ platformio==5.2.4 # When updating platformio, also update Dockerfile
esptool==3.2
click==8.0.3
esphome-dashboard==20220209.0
aioesphomeapi==10.8.1
aioesphomeapi==10.8.2
zeroconf==0.37.0
# esp-idf requires this, but doesn't bundle it by default