mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
Fix after merging PR.(DUE and Mega)
This commit is contained in:
31
build_flags_due-5500.sh
Normal file
31
build_flags_due-5500.sh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# usage:
|
||||||
|
# first make your own copy of template
|
||||||
|
# cp build_flags_template.sh build_flags_ENVNAME.sh
|
||||||
|
# then edit, change or comment something
|
||||||
|
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
|
||||||
|
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||||
|
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||||
|
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
|
||||||
|
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
|
||||||
|
export FLAGS="$FLAGS -DWiz5500"
|
||||||
|
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
|
||||||
|
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:ff"
|
||||||
|
# export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DARTNET_ENABLE"
|
||||||
|
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
|
||||||
|
# export FLAGS="$FLAGS -DLAN_INIT_DELAY=2000"
|
||||||
|
# export FLAGS="$FLAGS -DCONTROLLINO"
|
||||||
|
# export FLAGS="$FLAGS -DESP_WIFI_AP=MYAP"
|
||||||
|
# export FLAGS="$FLAGS -DESP_WIFI_PWD=MYPWD"
|
||||||
|
# export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DRESET_PIN=5"
|
||||||
|
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
|
||||||
|
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
|
||||||
|
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
|
||||||
|
export FLAGS="$FLAGS -DWITH_STREAMING_LIB"
|
||||||
|
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||||
|
echo $FLAGS
|
||||||
31
build_flags_mega2560-net.sh
Normal file
31
build_flags_mega2560-net.sh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# usage:
|
||||||
|
# first make your own copy of template
|
||||||
|
# cp build_flags_template.sh build_flags_ENVNAME.sh
|
||||||
|
# then edit, change or comment something
|
||||||
|
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
|
||||||
|
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||||
|
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||||
|
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
|
||||||
|
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
|
||||||
|
#export FLAGS="$FLAGS -DWiz5500"
|
||||||
|
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
|
||||||
|
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:fe"
|
||||||
|
# export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DARTNET_ENABLE"
|
||||||
|
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
|
||||||
|
# export FLAGS="$FLAGS -DLAN_INIT_DELAY=2000"
|
||||||
|
# export FLAGS="$FLAGS -DCONTROLLINO"
|
||||||
|
# export FLAGS="$FLAGS -DESP_WIFI_AP=MYAP"
|
||||||
|
# export FLAGS="$FLAGS -DESP_WIFI_PWD=MYPWD"
|
||||||
|
# export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DRESET_PIN=5"
|
||||||
|
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
|
||||||
|
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
|
||||||
|
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
|
||||||
|
export FLAGS="$FLAGS -DWITH_STREAMING_LIB"
|
||||||
|
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||||
|
echo $FLAGS
|
||||||
30
build_flags_mega2560.sh
Normal file
30
build_flags_mega2560.sh
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# usage:
|
||||||
|
# first make your own copy of template
|
||||||
|
# cp build_flags_template.sh build_flags_ENVNAME.sh
|
||||||
|
# then edit, change or comment something
|
||||||
|
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
|
||||||
|
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||||
|
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||||
|
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
|
||||||
|
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
|
||||||
|
#export FLAGS="$FLAGS -DWiz5500"
|
||||||
|
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
|
||||||
|
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:ed"
|
||||||
|
# export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DARTNET_ENABLE"
|
||||||
|
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
|
||||||
|
# export FLAGS="$FLAGS -DLAN_INIT_DELAY=2000"
|
||||||
|
# export FLAGS="$FLAGS -DCONTROLLINO"
|
||||||
|
# export FLAGS="$FLAGS -DESP_WIFI_AP=MYAP"
|
||||||
|
# export FLAGS="$FLAGS -DESP_WIFI_PWD=MYPWD"
|
||||||
|
# export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DDHT_DISABLE"
|
||||||
|
# export FLAGS="$FLAGS -DRESET_PIN=5"
|
||||||
|
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
|
||||||
|
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
|
||||||
|
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
|
||||||
|
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||||
|
echo $FLAGS
|
||||||
@@ -173,7 +173,7 @@ void mqttCallback(char *topic, byte *payload, unsigned int length) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++)
|
||||||
debugSerial<<((char) payload[i]);
|
debugSerial<<((char) payload[i]);
|
||||||
debugSerial<<endl;
|
debugSerial<<endl;
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ void ip_ready_config_loaded_connecting_to_broker() {
|
|||||||
udpSyslog.defaultPriority(LOG_KERN);
|
udpSyslog.defaultPriority(LOG_KERN);
|
||||||
udpSyslog.log(LOG_INFO, F("UDP Syslog initialized!"));
|
udpSyslog.log(LOG_INFO, F("UDP Syslog initialized!"));
|
||||||
debugSerial<<F("UDP Syslog initialized!");
|
debugSerial<<F("UDP Syslog initialized!");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!mqttClient.connected() && mqttArr && ((n = aJson.getArraySize(mqttArr)) > 1)) {
|
if (!mqttClient.connected() && mqttArr && ((n = aJson.getArraySize(mqttArr)) > 1)) {
|
||||||
@@ -937,7 +937,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
|
|||||||
if (configStream != NULL) {
|
if (configStream != NULL) {
|
||||||
if (responseStatusCode == 200) {
|
if (responseStatusCode == 200) {
|
||||||
|
|
||||||
debugSerial<<F("got Config"));
|
debugSerial<<F("got Config");
|
||||||
char c;
|
char c;
|
||||||
aJsonFileStream as = aJsonFileStream(configStream);
|
aJsonFileStream as = aJsonFileStream(configStream);
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
@@ -948,29 +948,29 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
|
|||||||
hclient.closeStream(configStream); // this is very important -- be sure to close the STREAM
|
hclient.closeStream(configStream); // this is very important -- be sure to close the STREAM
|
||||||
|
|
||||||
if (!root) {
|
if (!root) {
|
||||||
debugSerial<<F("Config parsing failed"));
|
debugSerial<<F("Config parsing failed");
|
||||||
nextLanCheckTime = millis() + 15000;
|
nextLanCheckTime = millis() + 15000;
|
||||||
return READ_RE_CONFIG;//-11;
|
return READ_RE_CONFIG;//-11;
|
||||||
} else {
|
} else {
|
||||||
// char *outstr = aJson.print(root);
|
// char *outstr = aJson.print(root);
|
||||||
// debugSerial<<outstr);
|
// debugSerial<<outstr);
|
||||||
// free(outstr);
|
// free(outstr);
|
||||||
debugSerial<<F("Applying."));
|
debugSerial<<F("Applying.");
|
||||||
applyConfig();
|
applyConfig();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
debugSerial<<F("ERROR: Server returned "));
|
debugSerial<<F("ERROR: Server returned ");
|
||||||
debugSerial<<responseStatusCode);
|
debugSerial<<responseStatusCode;
|
||||||
nextLanCheckTime = millis() + 5000;
|
nextLanCheckTime = millis() + 5000;
|
||||||
return READ_RE_CONFIG;//-11;
|
return READ_RE_CONFIG;//-11;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
debugSerial<<F("failed to connect"));
|
debugSerial<<F("failed to connect");
|
||||||
debugSerial<<F(" try again in 5 seconds"));
|
debugSerial<<F(" try again in 5 seconds");
|
||||||
nextLanCheckTime = millis() + 5000;
|
nextLanCheckTime = millis() + 5000;
|
||||||
return READ_RE_CONFIG;//-11;
|
return READ_RE_CONFIG;//-11;
|
||||||
}
|
}
|
||||||
|
|||||||
2
pioenvs.sh
Executable file
2
pioenvs.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
echo /tmp/$1/pioenvs
|
||||||
2
piolibdeps.sh
Executable file
2
piolibdeps.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
echo /tmp/$1/piolibdeps
|
||||||
@@ -13,15 +13,15 @@ env_default =
|
|||||||
; megaatmega2560
|
; megaatmega2560
|
||||||
; megaatmega2560-net
|
; megaatmega2560-net
|
||||||
; due
|
; due
|
||||||
esp8266
|
; esp8266
|
||||||
; esp32
|
; esp32
|
||||||
; megaatmega2560-5500
|
; megaatmega2560-5500
|
||||||
; due-5500
|
due-5500
|
||||||
; controllino
|
; controllino
|
||||||
; stm32
|
; stm32
|
||||||
|
|
||||||
build_dir = /tmp/pioenvs
|
;build_dir = !sh pioenvs.sh ${platformio.env_default}
|
||||||
libdeps_dir = /tmp/piolibdeps
|
;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default}
|
||||||
|
|
||||||
[env:esp32]
|
[env:esp32]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
@@ -171,6 +171,8 @@ lib_deps =
|
|||||||
FastLED
|
FastLED
|
||||||
Adafruit Unified Sensor
|
Adafruit Unified Sensor
|
||||||
DHT sensor library
|
DHT sensor library
|
||||||
|
https://github.com/arcao/Syslog.git
|
||||||
|
Streaming
|
||||||
|
|
||||||
|
|
||||||
[env:due-5500]
|
[env:due-5500]
|
||||||
@@ -198,7 +200,7 @@ lib_deps =
|
|||||||
Adafruit Unified Sensor
|
Adafruit Unified Sensor
|
||||||
DHT sensor library
|
DHT sensor library
|
||||||
https://github.com/arcao/Syslog.git
|
https://github.com/arcao/Syslog.git
|
||||||
; Streaming
|
Streaming
|
||||||
; PrintEx
|
; PrintEx
|
||||||
https://github.com/livello/PrintEx.git#is-select-redecl
|
https://github.com/livello/PrintEx.git#is-select-redecl
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user