Firmware for ES8266-based smart devices (https://github.com/xoseperez/espurna)
mcspr on garland-rebase
#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}
)
I just noticed it keeps on rebooting
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
[000184]
After erasing the flash and flashing the latest build back it does still happen
[WEBSERVER] Request: GET /auth
[051035] [WEBSOCKET] #1 connected, ip: 192.168.4.2, url: /ws
[051178] [WEBSOCKET] #1 error(1002): Invalid UTF-8 in text frame
[051181] [WEBSOCKET] #1 disconnected
[054080] [SENSOR] Error reading data from DHT11 @ GPIO2 (error: 3)
[060005] [MAIN] System OK
I could only change the password, no wifi, nothing
can you send the resulting .elf?
sure, where shall I sent it to?
only one device has this issue or all of 2.6.3 Core builds?
as far as I know relays doesn't have any issue but I haven't tested any more
any way you can capture http session with wireshark / tcpdump so we can see exactly the way frames are sent?
good idea, please let me know where shall I upload it
thanks once more
Oscar