Firmware for ES8266-based smart devices (https://github.com/xoseperez/espurna)
mcspr on patch-1
mcspr on dev
relay: fix sync reentrancy lock… led: fix relay ID associations … debug: formatting and 6 more (compare)
mcspr on patch-1
relay: fix sync reentrancy lock… led: fix relay ID associations … debug: formatting and 6 more (compare)
platformio/fs.py
func get_file_contents(...)
to print the original exception (which should at least show file position)diff --git a/platformio/fs.py b/platformio/fs.py
index ed0102cd..461ad925 100644
--- a/platformio/fs.py
+++ b/platformio/fs.py
@@ -54,6 +54,8 @@ def get_file_contents(path, encoding=None):
with io.open(path, encoding=encoding) as fp:
return fp.read()
except UnicodeDecodeError:
+ import traceback
+ traceback.print_exc()
click.secho(
"Unicode decode error has occurred, please remove invalid "
"(non-ASCII or non-UTF8) characters from %s file" % path,
#if SONAR_SUPPORT
{
SonarSensor * sensor = new SonarSensor();
sensor->setEcho(SONAR_ECHO);
sensor->setIterations(SONAR_ITERATIONS);
sensor->setMaxDistance(SONAR_MAX_DISTANCE);
sensor->setTrigger(SONAR_TRIGGER);
_sensors.push_back(sensor);
}
#endif
#if SONAR_SUPPORT
{
SonarSensor * sensor = new SonarSensor();
sensor->setEcho(SONAR_ECHO);
sensor->setIterations(SONAR_ITERATIONS);
sensor->setMaxDistance(SONAR_MAX_DISTANCE);
sensor->setTrigger(SONAR_TRIGGER);
_sensors.push_back(sensor);
SonarSensor * sensor2 = new SonarSensor();
sensor2->setEcho(SONAR_ECHO_2);
sensor2->setIterations(SONAR_ITERATIONS);
sensor2->setMaxDistance(SONAR_MAX_DISTANCE);
sensor2->setTrigger(SONAR_TRIGGER_2);
_sensors.push_back(sensor2); }
#endif
hi again, I'm still going in circles with TZ.h, I have added "#include </home/oscar/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/TZ.h>" but with no luck, now I get the following:
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino: In function 'String _ntpGetServer()':
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:174:44: error: invalid conversion from 'const ip_addr_t {aka const ip4_addr}' to 'uint32_t {aka unsigned int}' [-fpermissive]
server = IPAddress(sntp_getserver(0)).toString();
^
In file included from /home/oscar/.platformio/packages/framework-arduinoespressif8266@2.20402.4/libraries/ESP8266WiFi/src/ESP8266WiFi.h:31:0,
from espurna/wifi.h:12,
from /home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/espurna.ino:38:
/home/oscar/.platformio/packages/framework-arduinoespressif8266@2.20402.4/cores/esp8266/IPAddress.h:48:9: error: initializing argument 1 of 'IPAddress::IPAddress(uint32_t)' [-fpermissive]
IPAddress(uint32_t address);
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino: In function 'void _ntpConfigure()':
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:220:33: error: invalid conversion from 'const char' to 'long int' [-fpermissive]
configTime(cfg_tz.c_str(), _ntp_server.c_str());
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:220:54: error: invalid conversion from 'const char' to 'int' [-fpermissive]
configTime(cfg_tz.c_str(), _ntp_server.c_str());
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:220:55: error: too few arguments to function 'void configTime(long int, int, const char, const char, const char)'
configTime(cfg_tz.c_str(), _ntp_server.c_str());
^
In file included from /tmp/tmpGCxRSF:1:0:
/home/oscar/.platformio/packages/framework-arduinoespressif8266@2.20402.4/cores/esp8266/Arduino.h:295:17: note: declared here
extern "C" void configTime(long timezone, int daylightOffset_sec,
^
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino: In function 'void _ntpBrokerSchedule(int)':
/home/oscar/PlatformIO/Projects/espurna-1.14.2.PA5/espurna/code/espurna/ntp.ino:264:23: error: 'class Ticker' has no member named 'once_scheduled'
_ntp_broker_timer.once_scheduled(offset ?: 1, _ntpBrokerCallback);
^
** [.pio/build/generic-esp01s-dht11-10-ota/src/espurna.ino.cpp.o] Error 1
please help
Oscar
hi again, this time I'm facing this:
[163904] [WEBSERVER] Request: GET /auth
[163939] [WEBSOCKET] #1 connected, ip: 192.168.4.2, url: /ws
[164086] [WEBSOCKET] #1 error(1002): Invalid UTF-8 in text frame"ipL�- $ ' mask","dns","stored"],"networks":[]},"max":5}
[164089] [WEBSOCKET] #1 disconnected
[165659] [WEBSERVER] Request: GET /index.html
[165789] [WEBSERVER] Request: GET /auth
[165812] [WEBSOCKET] #2 connected, ip: 192.168.4.2, url: /ws
[165962] [WEBSOCKET] #2 error(1002): Invalid UTF-8 in text frame"9f␟�� j␁
[165964] [WEBSOCKET] #2 disconnected
[166904] [WEBSERVER] Request: GET /index.html
[167031] [WEBSERVER] Request: GET /auth
[167055] [WEBSOCKET] #3 connected, ip: 192.168.4.2, url: /ws
[167205] [WEBSOCKET] #3 error(1002): Invalid UTF-8 in text frame
[167207] [WEBSOCKET] #3 disconnected
after trying with "platform = ${common.arduino_core_2_6_3}", any hints?
Thanks once more
Oscar
ompiling .pio\build\arilux-al-lc02\lib77b\ESP Async WebServer\WebAuthentication.cpp.o
^
compilation terminated.
* [.pio\build\arilux-al-lc02\libb1a\AsyncTCP_ID1826\AsyncTCP.cpp.o] Error 1
hi, unfortunately I have deleted old .elf & .bin, and I have replaced them with new ones, but something strange is still happening since it doesn't allow me to add any new wifi network and it still not appearing any sensors fields:
STATUS
Current configuration
Manufacturer
GENERIC
Device
ESP01S_DHT11_10
Chip ID
erase.config
command too. so far I am not seeing any issues with communication, but what you are describing may be explained by missing ws packets. like when you can't create network and it says "Max number of networks reached", for some reason that message was lost (part of which you have seen in the ws log as error(1002): Invalid UTF-8 in text frame"ipL�- $ ' mask","dns","stored"],"networks":[]},"max":5}
)