Hi all, I’m posting this here because I don’t know if it’s a bug or not.
I’m trying to use the Homie library. I installed Homie using the library manager and it found the dependencies: ArduinoJson, Bounce2, PubSubClient. So now I have all 4 libraries installed. However when I go to compile a program with Homie, I get this error:
Error: Could not find `Json` dependency for `Homie` library
But there is no Json dependency, only ArduinoJson, which I have. So where is it getting this idea that I need a library called Json?
No that’s the thing, I don’t have any libraries called Json. At least, I don’t remember installing one, and it doesn’t appear when I type pio lib list. All I’ve done is install Homie, like you have above, but I can’t compile my script. Test it with a file that only has one line: #include <Homie.h>.
Some more information… I tried compiling scripts that just have a single include line. This is the results from each test, run one at a time:
#include <Arduino.h> //this works (aside from the expected error about lacking setup() and loop())
#include <Homie.h> //Error: Could not find `Json` dependency for `Homie` library
#include <Bounce2.h> //Error: Could not find `Json` dependency for `Homie` library
#include <ESP8266WebServer.h> //Error: Could not find `Json` dependency for `Homie` library
So hang on, why is it complaining about the Homie library when I’m not including it?
I just created an entirely new project in a new folder and the problem persists… so I can’t use any third-party libraries now.
Yeah I see, I just didn’t get the important of the -g flag. In both cases I got the same successful-install messages, but I just couldn’t compile anything unless the -g flag was used.
Sorry, something is wrong with your project. -g means install to global storage. looks like you have other storages. Please read the docs and check where you have obsolete Homie library. Remove it manually with system file manager.
Hi i change to PlatformIO and when I build Homie I get this error.
from .piolibdeps\ArduinoJson_ID64/include/ArduinoJson/JsonBufferBase.hpp:10,
from .piolibdeps\ArduinoJson_ID64/include/ArduinoJson/DynamicJsonBuffer.hpp:10,
from .piolibdeps\ArduinoJson_ID64/include/ArduinoJson.hpp:10,
from .piolibdeps\ArduinoJson_ID64/include/ArduinoJson.h:8,
from .piolibdeps\ArduinoJson_ID64/ArduinoJson.h:8,
from .piolibdeps\Homie_ID555\src\Homie\Datatypes/../Limits.hpp:3,
from .piolibdeps\Homie_ID555\src\Homie\Datatypes/Interface.hpp:3,
from .piolibdeps\Homie_ID555\src\Homie\Blinker.hpp:4,
from .piolibdeps\Homie_ID555\src\Homie\Blinker.cpp:1:
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:19:5: error: 'Stream' does not name a type
Stream& _stream;
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:22:20: error: expected ')' before '&' token
Iterator(Stream& stream) : _stream(stream) {}
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp: In member function 'char ArduinoJson::Internals::StdStreamFuncs::Iterator::next
()':
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:25:15: error: '_stream' was not declared in this scope
int n = _stream.read();
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp: At global scope:
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:35:24: error: 'Stream' was not declared in this scope
Stream, typename TypeTraits::RemoveReference<
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:36:50: error: template argument 1 is invalid
TStream>::type>::value>::type>
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:36:58: error: template argument 1 is invalid
TStream>::type>::value>::type>
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:37:5: error: expected '::' before ':' token
: StdStreamFuncs {};
^
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:37:5: error: expected identifier before ':' token
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:37:5: error: qualified name does not name a class before ':' token
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:37:5: error: expected '{' before ':' token
.piolibdeps\ArduinoJson_ID64/include/ArduinoJson/Deserialization/../Serialization/../StringTraits/
ArduinoStream.hpp:37:5: error: expected unqualified-id before ':' token
Compiling .pioenvs\esp01_1m\lib\Homie_ID555\Homie\Boot\BootConfig.o
*** [.pioenvs\esp01_1m\lib\Homie_ID555\Homie\Blinker.o] Error 1
[ERROR] Took 9.38 seconds