6.4.0.3 Hass and Alexa fixes

6.4.0.3 20181222
 * Change Hass discovery to short MQTT messages as used by Hass 0.81 and up (#4711)
 * Change FallbackTopic detection (#4706)
 * Add define WIFI_SOFT_AP_CHANNEL in my_user_config.h to set Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI (#4673)
 * Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (#3159, #4712)
This commit is contained in:
Theo Arends 2018-12-22 16:13:07 +01:00
parent a20ae4fd04
commit e2cd656286
4 changed files with 20 additions and 4 deletions

View File

@ -1,6 +1,12 @@
/* 6.4.0.2 20181221
/* 6.4.0.3 20181222
* Change Hass discovery to short MQTT messages as used by Hass 0.81 and up (#4711)
* Change FallbackTopic detection (#4706)
* Add define WIFI_SOFT_AP_CHANNEL in my_user_config.h to set Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI (#4673)
* Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (#3159, #4712)
*
* 6.4.0.2 20181221
* Fix possible dtostrf buffer overflows by increasing buffers
*
*
* 6.4.0.1 20181217
* Add support for AZ-Instrument 7798 CO2 meter/datalogger (#4672)
* Change RAM usage BMP/BME I2C sensors

View File

@ -217,6 +217,7 @@
//#define MY_LANGUAGE zh-TW // Chinese (Traditional) in Taiwan
// -- Wifi Config tools ---------------------------
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI
//#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+))
//#define USE_SMARTCONFIG // Add support for Wifi SmartConfig as initial wifi configuration tool (+23k code, +0.6k mem)

View File

@ -467,7 +467,8 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
if (XdrvMqttData(topicBuf, sizeof(topicBuf), dataBuf, sizeof(dataBuf))) return;
grpflg = (strstr(topicBuf, Settings.mqtt_grptopic) != NULL);
fallback_topic_flag = (strstr(topicBuf, mqtt_client) != NULL);
snprintf_P(stemp1, sizeof(stemp1), PSTR(D_CMND "/%s/"), mqtt_client); // Full Fallback topic = cmnd/DVES_xxxxxxxx
fallback_topic_flag = (!strncmp(topicBuf, stemp1, strlen(stemp1)));
type = strrchr(topicBuf, '/'); // Last part of received topic is always the command (type)
index = 1;

View File

@ -27,6 +27,10 @@
#define XDRV_01 1
#ifndef WIFI_SOFT_AP_CHANNEL
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 11 as used by SmartConfig web GUI
#endif
#define HTTP_REFRESH_TIME 2345 // milliseconds
#define HTTP_RESTART_RECONNECT_TIME 9000 // milliseconds
#define HTTP_OTA_RESTART_RECONNECT_TIME 20000 // milliseconds
@ -441,7 +445,11 @@ void WifiManagerBegin(void)
StopWebserver();
DnsServer = new DNSServer();
WiFi.softAP(my_hostname);
int channel = WIFI_SOFT_AP_CHANNEL;
if ((channel < 1) || (channel > 13)) { channel = 1; }
WiFi.softAP(my_hostname, NULL, channel);
delay(500); // Without delay I've seen the IP address blank
/* Setup the DNS server redirecting all the domains to the apIP */
DnsServer->setErrorReplyCode(DNSReplyCode::NoError);