Closed weswitt closed 5 years ago
Think this related to #444 (were trying to fix this)
Yeah i'm using PlatformIO and don't have any issues with this. Go into PlatformIO libraries, and make sure to install WifiManager
which provides ESP8266WiFi.h
@tripflex thats odd ?? ESP8266WiFi.h
is park of the core....
I did not had the problem with WifiManager, but in some of my projects I suddently had to add other internal libs to platformio.ini, e.g. Hash or SPI.
Yes, I think Hash is missing from ESP Async. Have mentioned it here https://github.com/me-no-dev/ESPAsyncWebServer/issues/312.
Aside from that, mostly all resolved?
Okay so I just tested this myself on a clean project in PlatformIO ... you must add #include <Homie.h>
at the top of your main.cpp
to be able to without throwing this error.
I'm guessing you were just trying to test an empty project without having any homie specific code yet?
I can confirm this error is thrown when using the blank project, once I added the code to include homie it builds without any issues
Thanks everyone. I've moved on and am no longer user PlatformIO or any other IDE. Just too unreliable and unpredictable. I'm using simple tried & true makefiles and am much happier.
:(, something for us to work towards. Making getting started as easy as we can and improving on our examples and documentation. These things i wish to work on and improve.
@tripflex can you share your platform.ini
? I just created a new project, and I still have problems with ESPAsyncTCP.
@fermuch for instance this one: https://github.com/luebbe/homie-ota/blob/master/platformio.ini
You just need this part:
lib_deps = https://github.com/marvinroger/homie-esp8266.git
Do you have any "other" libraries inside .piolibdeps in your working directory? If yes, delete .piolibdeps before you build.
Do you have any libraries in the global storage? They could get into the way. I got rid of using the global library storage. All my projects are self contained.
@fermuch here's mine:
[env:nodemcuv2]
; platform = espressif8266
platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
board = nodemcuv2
framework = arduino
monitor_baud = 115200
; lib_deps = git+https://github.com/marvinroger/homie-esp8266.git#develop
lib_deps = git+https://github.com/timpur/homie-esp8266.git#v2.1
Just keep in mind, that the code above will use the latest staging version of esp8266 for PIO (using GitHub), and @timpur v2.1
branch (which I was using for testing)
Seems like this issue is back again. I today installed VSC, Platform.io on a fresh system and created a new project. platform.ini is
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps = Homie
And I am getting the same error as described above.
Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 2.5.1 > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 3.20701.0 (2.7.1)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for Homie library in registry
Found: https://platformio.org/lib/show/555/Homie
LibraryManager: Installing id=555
Homie @ 3.0.0 is already installed
Installing dependencies
LibraryManager: Installing id=64 @ ^6.11.4
ArduinoJson @ 6.15.2 is already installed
Looking for AsyncMqttClient library in registry
Found: https://platformio.org/lib/show/346/AsyncMqttClient
LibraryManager: Installing id=346 @ ^0.8.0
AsyncMqttClient @ 0.8.2 is already installed
Installing dependencies
Looking for ESPAsyncTCP library in registry
Found: https://platformio.org/lib/show/305/ESPAsyncTCP
LibraryManager: Installing id=305 @ 1.2.0
ESPAsyncTCP @ 1.2.0 has been successfully installed!
Looking for AsyncTCP library in registry
Found: https://platformio.org/lib/show/1826/AsyncTCP
LibraryManager: Installing id=1826 @ ^1.0.0
AsyncTCP @ 1.1.1 is already installed
Looking for Bounce2 library in registry
Found: https://platformio.org/lib/show/1106/Bounce2
LibraryManager: Installing id=1106 @ ^2.1.0
Bounce2 @ 2.53 has been successfully installed!
Looking for ESP Async WebServer library in registry
Found: https://platformio.org/lib/show/306/ESP Async WebServer
LibraryManager: Installing id=306
Downloading [##########################----------] 72%
Downloading [###########################---------] 75%
Downloading [############################--------] 78%
Downloading [#############################-------] 81%
Downloading [##############################------] 84%
Downloading [###############################-----] 87%
Downloading [################################----] 90%
Downloading [#################################---] 93%
Downloading [##################################--] 96%
Downloading [####################################] 100%
ESP Async WebServer @ 1.2.3 has been successfully installed!
Installing dependencies
LibraryManager: Installing id=305
ESPAsyncTCP @ 1.2.0 is already installed
LibraryManager: Installing id=1826
AsyncTCP @ 1.1.1 is already installed
Looking for Hash library in registry
Warning! Library `{'name': 'Hash', 'platforms': ['espressif8266']}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'name': 'Hash', 'platforms': ['espressif8266']}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Homie> 3.0.0
| |-- <ArduinoJson> 6.15.2
| |-- <AsyncMqttClient> 0.8.2
| | |-- <ESPAsyncTCP> 1.2.0
| |-- <Bounce2> 2.53
| |-- <ESP Async WebServer> 1.2.3
| | |-- <ESPAsyncTCP> 1.2.0
| | |-- <Hash> 1.0
| | |-- <ArduinoJson> 6.15.2
| |-- <ESPAsyncTCP> 1.2.0
Building in release mode
Compiling .pio/build/d1_mini/src/main.cpp.o
Generating LD script .pio/build/d1_mini/ld/local.eagle.app.v6.common.ld
Archiving .pio/build/d1_mini/lib199/libArduinoJson_ID64.a
Compiling .pio/build/d1_mini/liba81/ESPAsyncTCP_ID305/AsyncPrinter.cpp.o
Compiling .pio/build/d1_mini/liba81/ESPAsyncTCP_ID305/ESPAsyncTCP.cpp.o
Compiling .pio/build/d1_mini/liba81/ESPAsyncTCP_ID305/ESPAsyncTCPbuffer.cpp.o
Compiling .pio/build/d1_mini/liba81/ESPAsyncTCP_ID305/SyncClient.cpp.o
Compiling .pio/build/d1_mini/liba81/ESPAsyncTCP_ID305/tcp_axtls.c.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/ConnAckPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/PingRespPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/PubAckPacket.cpp.o
Indexing .pio/build/d1_mini/lib199/libArduinoJson_ID64.a
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/PubCompPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/PubRecPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/PubRelPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/PublishPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/SubAckPacket.cpp.o
Compiling .pio/build/d1_mini/lib212/AsyncMqttClient_ID346/AsyncMqttClient/Packets/UnsubAckPacket.cpp.o
Compiling .pio/build/d1_mini/lib42b/Bounce2_ID1106/Bounce2.cpp.o
Compiling .pio/build/d1_mini/lib0c0/Hash/Hash.cpp.o
Compiling .pio/build/d1_mini/lib2b7/ESP Async WebServer_ID306/AsyncEventSource.cpp.o
Compiling .pio/build/d1_mini/lib2b7/ESP Async WebServer_ID306/AsyncWebSocket.cpp.o
In file included from .pio/libdeps/d1_mini/ESP Async WebServer_ID306/src/AsyncEventSource.h:29:0,
from .pio/libdeps/d1_mini/ESP Async WebServer_ID306/src/AsyncEventSource.cpp:21:
.pio/libdeps/d1_mini/ESP Async WebServer_ID306/src/ESPAsyncWebServer.h:35:25: fatal error: ESP8266WiFi.h: No such file or directory
*********************************************************************
* Looking for ESP8266WiFi.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:ESP8266WiFi.h"
* Web > https://platformio.org/lib/search?query=header:ESP8266WiFi.h
*
*********************************************************************
#include <ESP8266WiFi.h>
^
compilation terminated.
*** [.pio/build/d1_mini/lib2b7/ESP Async WebServer_ID306/AsyncEventSource.cpp.o] Error 1
In file included from .pio/libdeps/d1_mini/ESP Async WebServer_ID306/src/AsyncWebSocket.h:32:0,
from .pio/libdeps/d1_mini/ESP Async WebServer_ID306/src/AsyncWebSocket.cpp:22:
.pio/libdeps/d1_mini/ESP Async WebServer_ID306/src/ESPAsyncWebServer.h:35:25: fatal error: ESP8266WiFi.h: No such file or directory
*********************************************************************
* Looking for ESP8266WiFi.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:ESP8266WiFi.h"
* Web > https://platformio.org/lib/search?query=header:ESP8266WiFi.h
*
*********************************************************************
#include <ESP8266WiFi.h>
^
compilation terminated.
*** [.pio/build/d1_mini/lib2b7/ESP Async WebServer_ID306/AsyncWebSocket.cpp.o] Error 1
============================================== [FAILED] Took 13.99 seconds ==============================================
The terminal process terminated with exit code: 1
Any known issues here? Thanks in advance!
Using the current docs the develop branch will not build. The build fails in "ESP Async WebServer" portion:
With lib_deps set to: git+https://github.com/marvinroger/homie-esp8266.git#develop git+https://github.com/bblanchon/ArduinoJson.git#v5.6.7 git+https://github.com/marvinroger/async-mqtt-client.git#master git+https://github.com/thomasfredericks/Bounce2.git#master git+https://github.com/me-no-dev/ESPAsyncTCP.git#master
I get this:
Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\AsyncEventSource.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\AsyncWebSocket.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\SPIFFSEditor.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\WebAuthentication.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\WebHandlers.o In file included from .piolibdeps\ESP Async WebServer_ID306\src\SPIFFSEditor.h:3:0, from .piolibdeps\ESP Async WebServer_ID306\src\SPIFFSEditor.cpp:1: .piolibdeps\ESP Async WebServer_ID306\src/ESPAsyncWebServer.h:35:25: fatal error: ESP8266WiFi.h: No such file or directory
With lib_deps set to: git+https://github.com/marvinroger/homie-esp8266.git#develop
I get this: Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\AsyncEventSource.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\AsyncWebSocket.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\SPIFFSEditor.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\WebAuthentication.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\WebHandlers.o Compiling .pioenvs\esp01\lib41c\ESP Async WebServer_ID306\WebRequest.o Archiving .pioenvs\esp01\lib11b\libBounce2_ID1106.a In file included from .piolibdeps\ESP Async WebServer_ID306\src\WebRequest.cpp:21:0: .piolibdeps\ESP Async WebServer_ID306\src\ESPAsyncWebServer.h:35:25: fatal error: ESP8266WiFi.h: No such file or directory
I'm sure there is some version of lib_deps that works with the current develop branch, but it does not seem to be documented and I haven't found it anywhere online. If someone knows what is necessary to build the develop branch please let me know.