Skip to content

Commit 3a97a5e

Browse files
committed
Merge branch 'master' of github.com:OpenEVSE/ESP32_WiFi_V3.x
2 parents c92e926 + 1f34874 commit 3a97a5e

File tree

12 files changed

+41
-17
lines changed

12 files changed

+41
-17
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ env:
3434
- PIO_ENV=openevse_featheresp32
3535
- PIO_ENV=openevse_esp32-gateway
3636
- PIO_ENV=openevse_esp32-gateway-e
37+
- PIO_ENV=openevse_esp32-heltec-wifi-lora-v2
3738
# - SCRIPT=ci_arduino.sh
3839
# BUILD_TARGET=esp8266:esp8266:huzzah:FlashSize=4M1M
3940

platformio.ini

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ version = -DBUILD_TAG=3.0.2
3434
monitor_speed = 115200
3535
lib_deps =
3636
37-
37+
3838
extra_scripts = scripts/extra_script.py
3939
debug_flags =
4040
-DENABLE_DEBUG
@@ -82,6 +82,7 @@ platform_stage = https://github.com/platformio/platform-espressif8266.git#featur
8282
#platform_esp32 = https://github.com/platformio/platform-espressif32.git#feature/stage
8383
#platform_esp32 = https://github.com/platformio/platform-espressif32.git#develop
8484
platform_esp32 = [email protected]
85+
#platform_esp32 = espressif32
8586

8687
[env:openevse]
8788
platform = ${common.platform}
@@ -278,23 +279,38 @@ extra_scripts = ${common.extra_scripts}
278279
board_build.partitions = ${common.build_partitions_esp32}
279280

280281
[env:openevse_esp32-gateway-e]
282+
extends = env:openevse_esp32-gateway
283+
framework = arduino
284+
build_flags =
285+
${common.build_flags}
286+
${common.build_flags_esp32}
287+
-DRX2=16
288+
-DTX2=32
289+
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY=\'E\'"
290+
291+
[env:openevse_esp32-heltec-wifi-lora-v2]
281292
platform = ${common.platform_esp32}
282-
board = esp32-gateway
293+
board = heltec_wifi_lora_32_V2
283294
framework = arduino
284295
lib_deps = ${common.lib_deps}
285296
src_build_flags =
286297
${common.version}.dev
287298
${common.src_build_flags}
288299
${common.src_build_flags_esp32}
289300
${common.debug_flags_esp32}
290-
${common.src_build_flags_esp32_gateway}
301+
-DWIFI_LED=25
302+
-DWIFI_BUTTON=2
303+
-DWIFI_LED_ON_STATE=HIGH
304+
-DRAPI_PORT=Serial1
305+
-DONBOARD_LEDS=0,2,4
291306
build_flags =
292307
${common.build_flags}
293308
${common.build_flags_esp32}
294-
-DRX2=16
295-
-DTX2=32
296-
upload_speed = 115200
309+
-DRX1=25
310+
-DTX1=27
311+
#upload_port = openevse.local
312+
#upload_speed = 921600
313+
upload_protocol = esptool
297314
monitor_speed = 115200
298315
extra_scripts = ${common.extra_scripts}
299316
board_build.partitions = ${common.build_partitions_esp32}
300-
board_build.extra_flags = "-DARDUINO_ESP32_GATEWAY=\'E\'"

src/app_config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ config_load_settings() {
204204
EEPROM_read_string(EEPROM_EMON_API_KEY_START, EEPROM_EMON_API_KEY_SIZE,
205205
emoncms_apikey);
206206
EEPROM_read_string(EEPROM_EMON_SERVER_START, EEPROM_EMON_SERVER_SIZE,
207-
emoncms_server, "data.openevse.com/emoncms");
207+
emoncms_server, "https://data.openevse.com/emoncms");
208208
EEPROM_read_string(EEPROM_EMON_NODE_START, EEPROM_EMON_NODE_SIZE,
209209
emoncms_node, esp_hostname);
210210
EEPROM_read_string(EEPROM_EMON_FINGERPRINT_START, EEPROM_EMON_FINGERPRINT_SIZE,

src/mqtt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ MongooseMqttClient mqttclient;
1515
long lastMqttReconnectAttempt = 0;
1616
int clientTimeout = 0;
1717
int i = 0;
18-
String payload_str = "";
1918
bool connecting = false;
2019

2120
String lastWill = "";
@@ -34,7 +33,7 @@ void mqttmsg_callback(MongooseString topic, MongooseString payload) {
3433
DBUGLN("MQTT received:");
3534
DBUGLN("Topic: " + topic_string);
3635

37-
payload_str = payload.toString();
36+
String payload_str = payload.toString();
3837
DBUGLN("Payload: " + payload_str);
3938

4039
// If MQTT message is solar PV
@@ -61,6 +60,7 @@ void mqttmsg_callback(MongooseString topic, MongooseString payload) {
6160
// Detect if MQTT message is a RAPI command e.g to set 13A <base-topic>/rapi/$SC 13
6261
// Locate '$' character in the MQTT message to identify RAPI command
6362
int rapi_character_index = topic_string.indexOf('$');
63+
DBUGVAR(rapi_character_index);
6464
if (rapi_character_index > 1) {
6565
DBUGF("Processing as RAPI");
6666
// Print RAPI command from mqtt-sub topic e.g $SC

src/net_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void net_event(WiFiEvent_t event, system_event_info_t info)
319319
DBUGLN("ETH Started");
320320
//set eth hostname here
321321
if(ETH.setHostname(esp_hostname.c_str())) {
322-
DBUGF("Set host name to %s", WiFi.getHostname());
322+
DBUGF("Set host name to %s", ETH.getHostname());
323323
} else {
324324
DBUGF("Setting host name failed: %s", esp_hostname.c_str());
325325
}

src/web_server.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,8 @@ handleConfig(MongooseHttpServerRequest *request) {
588588
s += "\",";
589589
s += "\"mqtt_solar\":\""+mqtt_solar+"\",";
590590
s += "\"mqtt_grid_ie\":\""+mqtt_grid_ie+"\",";
591+
s += "\"mqtt_supported_protocols\":[\"mqtt\"],";
592+
s += "\"http_supported_protocols\":[\"http\",\"https\"],";
591593
s += "\"www_username\":\"" + www_username + "\",";
592594
s += "\"www_password\":\"";
593595
if(www_password != 0) {

src/web_static/web_server.home.html.h

Lines changed: 6 additions & 1 deletion
Large diffs are not rendered by default.

src/web_static/web_server.home.js.h

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/web_static/web_server.lib.js.h

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)