Closed Sterling-101 closed 2 years ago
Which version of SinricPro do you use? The switch sample of version 2.9.8 compiles without errors.
Run "pio clean" and delete the contents of the libdeps directory.
In your platformio.ino you only need additionally
lib_deps =
sinricpro/SinricPro
I'm running 2.9.8 but I think there may be a problem with the PIO set up. As soon as I try and open the default switch I get the following error...
{ "resource": "/home/leigh/Documents/PlatformIO/Projects/Switch/src/main.cpp", "owner": "C/C++", "code": "1696", "severity": 8, "message": "cannot open source file \"SinricProNameSpace.h\" (dependency of \"SinricProSwitch.h\")", "source": "C/C++", "startLineNumber": 35, "startColumn": 1, "endLineNumber": 35, "endColumn": 29 }
I've checked my include paths and all seem to be OK. Won't have time to test today but later I will remove VSC and PIO and do a fresh install to rule anything out on there and post back my findings....
I do not know pio on Linux and the error messages are unknown to me.
Normally the dependencies are installed to the .pio/libdeps directory automatically.
Are you using the switch example provided?
SinricProNameSpace.h is used by (almost) every file in the SinricPro library, not just SinricProSwitch.h.
Did you also include SinricPro.h? (#include "SinricPro.h"
)
OK, so I've tried the set up on a brand new install of Linux Mint and have the same issues. PIO refuses to compile anything with the SinricPro library. So I have installed the latest ArduinoIDE, installed the library from the Arduino Library Manager and and I also get the same error message. In fact, selecting my regular ESP8266 board (WemosD1) on the new build gives the same error message every time.
This is a completely fresh install with no other bits interfering at all. Python is at the latest version and the dependencies to compile are all met (a standard ESP32 example compiles fine).
Switching on verbose compile logging gives me this when trying to compile an unedited version of the Switch.ino example...
`Arduino: 1.8.15 (Linux), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
/home/leigh/Arduino/arduino-1.8.15/arduino-builder -dump-prefs -logger=machine -hardware /home/leigh/Arduino/arduino-1.8.15/hardware -hardware /home/leigh/.arduino15/packages -tools /home/leigh/Arduino/arduino-1.8.15/tools-builder -tools /home/leigh/Arduino/arduino-1.8.15/hardware/tools/avr -tools /home/leigh/.arduino15/packages -built-in-libraries /home/leigh/Arduino/arduino-1.8.15/libraries -libraries /home/leigh/ArduinoSketch/libraries -fqbn=esp8266:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None__,wipe=none,baud=921600 -ide-version=10815 -build-path /tmp/arduino_build_336767 -warnings=none -build-cache /tmp/arduino_cache_758182 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.python3.path=/home/leigh/.arduino15/packages/esp8266/tools/python3/3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=/home/leigh/.arduino15/packages/esp8266/tools/python3/3.7.2-post1 -prefs=runtime.tools.mklittlefs.path=/home/leigh/.arduino15/packages/esp8266/tools/mklittlefs/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs-3.0.4-gcc10.3-1757bed.path=/home/leigh/.arduino15/packages/esp8266/tools/mklittlefs/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.xtensa-lx106-elf-gcc-3.0.4-gcc10.3-1757bed.path=/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs.path=/home/leigh/.arduino15/packages/esp8266/tools/mkspiffs/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs-3.0.4-gcc10.3-1757bed.path=/home/leigh/.arduino15/packages/esp8266/tools/mkspiffs/3.0.4-gcc10.3-1757bed -verbose /home/leigh/ArduinoSketch/libraries/SinricPro/examples/Switch/Switch/Switch.ino
/home/leigh/Arduino/arduino-1.8.15/arduino-builder -compile -logger=machine -hardware /home/leigh/Arduino/arduino-1.8.15/hardware -hardware /home/leigh/.arduino15/packages -tools /home/leigh/Arduino/arduino-1.8.15/tools-builder -tools /home/leigh/Arduino/arduino-1.8.15/hardware/tools/avr -tools /home/leigh/.arduino15/packages -built-in-libraries /home/leigh/Arduino/arduino-1.8.15/libraries -libraries /home/leigh/ArduinoSketch/libraries -fqbn=esp8266:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 -ide-version=10815 -build-path /tmp/arduino_build_336767 -warnings=none -build-cache /tmp/arduino_cache_758182 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.python3.path=/home/leigh/.arduino15/packages/esp8266/tools/python3/3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=/home/leigh/.arduino15/packages/esp8266/tools/python3/3.7.2-post1 -prefs=runtime.tools.mklittlefs.path=/home/leigh/.arduino15/packages/esp8266/tools/mklittlefs/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs-3.0.4-gcc10.3-1757bed.path=/home/leigh/.arduino15/packages/esp8266/tools/mklittlefs/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.xtensa-lx106-elf-gcc-3.0.4-gcc10.3-1757bed.path=/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs.path=/home/leigh/.arduino15/packages/esp8266/tools/mkspiffs/3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs-3.0.4-gcc10.3-1757bed.path=/home/leigh/.arduino15/packages/esp8266/tools/mkspiffs/3.0.4-gcc10.3-1757bed -verbose /home/leigh/ArduinoSketch/libraries/SinricPro/examples/Switch/Switch/Switch.ino
Using board 'd1_mini' from platform in folder: /home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2
Using core 'esp8266' from platform in folder: /home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2
Detecting libraries used...
/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++ -Dets -DICACHE_FLASH -U__STRICT_ANSI -D_GNU_SOURCE -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/lwip2/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_336767/core -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10815 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/variants/d1_mini /tmp/arduino_build_336767/sketch/Switch.ino.cpp -o /dev/null
Alternatives for ESP8266WiFi.h: [ESP8266WiFi@1.0]
ResolveLibrary(ESP8266WiFi.h)
-> candidates: [ESP8266WiFi@1.0]
/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++ -Dets -DICACHE_FLASH -USTRICT_ANSI__ -D_GNU_SOURCE -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/lwip2/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_336767/core -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10815 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/variants/d1_mini -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src /tmp/arduino_build_336767/sketch/Switch.ino.cpp -o /dev/null
Alternatives for SinricPro.h: [SinricPro@2.9.8]
ResolveLibrary(SinricPro.h)
-> candidates: [SinricPro@2.9.8]
/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++ -Dets -DICACHE_FLASH -U__STRICT_ANSI -D_GNU_SOURCE -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/lwip2/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_336767/core -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10815 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/variants/d1_mini -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src -I/home/leigh/ArduinoSketch/libraries/SinricPro/src /tmp/arduino_build_336767/sketch/Switch.ino.cpp -o /dev/null
Alternatives for ArduinoJson.h: [ArduinoJson@6.18.3]
ResolveLibrary(ArduinoJson.h)
-> candidates: [ArduinoJson@6.18.3]
/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++ -Dets -DICACHE_FLASH -USTRICT_ANSI__ -D_GNU_SOURCE -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/lwip2/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_336767/core -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10815 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/variants/d1_mini -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src -I/home/leigh/ArduinoSketch/libraries/SinricPro/src -I/home/leigh/ArduinoSketch/libraries/ArduinoJson/src /tmp/arduino_build_336767/sketch/Switch.ino.cpp -o /dev/null
Alternatives for WebSocketsClient.h: [WebSockets@2.3.5]
ResolveLibrary(WebSocketsClient.h)
-> candidates: [WebSockets@2.3.5]
/home/leigh/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++ -Dets -DICACHE_FLASH -U__STRICT_ANSI -D_GNU_SOURCE -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/lwip2/include -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/libc/xtensa-lx106-elf/include -I/tmp/arduino_build_336767/core -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10815 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266 -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/variants/d1_mini -I/home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi/src -I/home/leigh/ArduinoSketch/libraries/SinricPro/src -I/home/leigh/ArduinoSketch/libraries/ArduinoJson/src -I/home/leigh/ArduinoSketch/libraries/WebSockets/src /tmp/arduino_build_336767/sketch/Switch.ino.cpp -o /dev/null
Alternatives for SinricProNameSpace.h: []
ResolveLibrary(SinricProNameSpace.h)
-> candidates: []
In file included from /home/leigh/ArduinoSketch/libraries/SinricPro/src/Capabilities/PowerStateController.h:4,
from /home/leigh/ArduinoSketch/libraries/SinricPro/src/SinricProSwitch.h:12,
from /home/leigh/ArduinoSketch/libraries/SinricPro/examples/Switch/Switch/Switch.ino:35:
/home/leigh/ArduinoSketch/libraries/SinricPro/src/Capabilities/../EventLimiter.h:4:10: fatal error: SinricProNameSpace.h: No such file or directory
4 | #include "SinricProNameSpace.h"
| ^~~~~~
compilation terminated.
Using library ESP8266WiFi at version 1.0 in folder: /home/leigh/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/libraries/ESP8266WiFi
Using library SinricPro at version 2.9.8 in folder: /home/leigh/ArduinoSketch/libraries/SinricPro
Using library ArduinoJson at version 6.18.3 in folder: /home/leigh/ArduinoSketch/libraries/ArduinoJson
Using library WebSockets at version 2.3.5 in folder: /home/leigh/ArduinoSketch/libraries/WebSockets
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
`
Definitely at a loss here as to what's going on!
Do you use one of the provided examples?
And which SinricProVersion do you use?
There was a bug with the namespace in version 2.9.6, but it was only related to SinricProDimSwitch.h and was fixed in version 2.9.7. I have compiled the switch example for the ESP32 and the ESP8266. It compiles without problems in both ArduinoIDE and VS code. I cannot reproduce the problem.
Yes, this is with the very latest 2.9.8 official SinricPro library installed from the ArduinoIDE manager or the PIO download manager. And I'm trying to compile a completely unmodified version of the included switch.ino example from 2.9.8. I've found though that (as a test) if I installed the library "SinricProGeneric" then that lib's switch.ino example compiles fine in the ArduinoIDE.
One test I have just tried though is on my laptop install which has been current for around 18 months and has had Sinric updated regularly I can get it to compile through the ArduinoIDE, but not through VSCode which hasn't had the incremental library updates, only the very latest as it's only been set up in the past few days. I do have an upload problem relating to the pyserial setup from the ArduinoIDE on the laptop which isn't related I don't think as I can upload from VSC fine when not using a SinricPro library but it's the compile time issues that are more confusing.
The simultaneous presence of the SinricProGeneric could cause the problem. This library is different and will not be compatible with the SinricPro library.
Do you use global installed libraries in pio? Usually there are no global libraries anylonger. Each project have it's own .pio folder and a libdep subfolder where the needed libararies are installed automatically (through the informations provided in platformio.ini file).
No, I install them specifically for the project. I only installed the SinricProGeneric to test their switch.ino - I won't be using it permanently.
Can you search for duplicate file names on your hard disk? e.g. SinricProDevice.h ?
Your libdeps folder should look like this:
On Windows systems there was a global library folder like this one "C:\Users\
There is an issue in EventLimiter.h. I am going to fix this now...please stand by
There ware an upper-/lowercase issue in an include instruction in EventLimtier.h (SinricProNameSpace.h instead of SinricProNamespace.h). Maybe this happens only on linux systems - that's why i had no issues on my Windows system.
Version 2.9.9 is released now This may take a few hours to be available via the library manager's.
For PIO you can use the libdep instruction in platformio.ini:
lib_deps =
sinricpro/SinricPro @ 2.9.9
That may make sense as Linux is very case sensitive for file names. I'll see if I can do an manual update now and see what happens....
I just did a little "side test":
#include "MyLiBrArY.h"
works perfectly on Windows - even if the filename is "MyLibrary.h"
.
I think that this file cannot be compiled on a Linux system.
Sorry for the inconvenience.
Yes that does make sense. I'm just doing a full clean set up again on the laptop to test VSC. I have found that somehow in SinricPro.h there's a reference to ArduonoJson.h - I've corrected at my end so may be worth a check at source.
Ah yes, thank you. That's a leftover i have to remove
This issue has gone quiet. Spooky quiet. We currently close issues after 14 days of inactivity. It’s been at least 7 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks for being a part of the SinricPro community!
I've just picked up an ESP32Dev board and I want to try a few tests to see if it will be usable for a project I'm working on. However, when trying to set up the test (a simple switch set up - already works fine through ArduinoIDE on ESP8266) I get the following message on compile...
In file included from .pio/libdeps/esp32dev/SinricPro/src/Capabilities/PowerStateController.h:4:0, from .pio/libdeps/esp32dev/SinricPro/src/SinricProSwitch.h:12, from src/main.cpp:8: .pio/libdeps/esp32dev/SinricPro/src/Capabilities/../EventLimiter.h:4:32: fatal error: SinricProNameSpace.h: No such file or directory
All points to SinricProSwitch.h not finding the included SinricProNameSpace.h but it's there in the directory fine.
If it makes any difference I'm running PIO through VisualStudioCode on Linux Mint.
Any clues as to what might be going on?