Thingproperties.h no such file or directory

Hi there I am trying to do the "Connecting ESP32 & ESP8266 to Arduino Cloud IoT "straight from the Arduino website but when loading the code provided

#include "thingProperties.h"

int LED = 13;

void setup() {
pinMode(LED, OUTPUT);
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);

// Defined in thingProperties.h
initProperties();

// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}

void loop() {
ArduinoCloud.update();
// Your code here
random_value = random(0, 500);
delay(500);
}

void onLedSwitchChange() {
// Do something
if(led_switch){
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED, LOW);
}
}

it always says thingProperties.h no such file or directory

I've searched all over for the install code for it and can't find it anywhere. I have found exacty two threads on the internet with the same problem but no solutions! How do I get this include to install and work.

1 Like

Hello, do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation or links for your ask).

I will but need an answer please, simple question

2 Likes

When you create a “Thing”, the sketch that is auto-generated contains a “thingProperties.h” file which has the declarations of the properties you added to the “Thing”. Add this to your project if it's not there

look at examples, here is one https://www.arduino.cc/en/IoT-Prime/Experiment04

please fix your post. simple ask...

  1. Open https://create.arduino.cc/iot/things
  2. Open the Thing you want to download the sketch for.
  3. Select the Sketch tab.
  4. Click the </> Open full editor button.
    The Thing sketch will now open in Arduino Web Editor.
  5. Click the ••• button on the right of the board selection menu.
  6. Select Download Sketch from the dropdown menu.

Something to note: the network configuration and any other secrets from the "Secret" tab of Arduino Web Editor are downloaded as the file named arduino_secrets.h. However, the secret values are not downloaded. So you will need to fill in these values in the downloaded sketch before you can use it. It will be shown in the Arduino IDE as a tab named arduino_secrets.h.

For example:

#define SECRET_SSID ""
#define SECRET_PASS ""
1 Like

thanks that is best way

in local i get "Compile error for ESP32 Dev Module board" when uploading file
it work fine in local if i upload any other sketch or if i upload from iot cloud
any idea ?. thanks

I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. When you encounter an error, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V.
    This will paste the compilation output into the code block.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Click the Reply button to post the output.
Arduino : 1.8.12 (Windows 10), Carte : "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

In file included from sketch\thingProperties.h:3:0,

                 from C:\Users\JEJ\Documents\arduino\2022\IOT_CLOUD\Untitled_jan03a\Untitled_jan03a.ino:19:

C:\Users\JEJ\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:27:39: fatal error: Arduino_ConnectionHandler.h: No such file or directory

compilation terminated.

exit status 1
Erreur de compilation pour la carte ESP32 Dev Module
Bibliothèque non valide trouvée dans C:\Program Files (x86)\Arduino\libraries\StepperDriver-master : aucun fichier d'en-tête (.h) trouvé dans C:\Program Files (x86)\Arduino\libraries\StepperDriver-master
Bibliothèque non valide trouvée dans C:\Program Files (x86)\Arduino\libraries\StepperDriver-master : aucun fichier d'en-tête (.h) trouvé dans C:\Program Files (x86)\Arduino\libraries\StepperDriver-master

Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

The reason for this error is that you don't have one of the library dependencies installed. All the >4500 libraries of the Arduino Library Manager are pre-installed in Arduino Web Editor and Arduino IoT Cloud, so you might be accustomed to all the libraries you need already being available, but when using sketches with the desktop IDE on your computer you will often need to install library dependencies. What might be a little confusing is that in addition to the libraries your sketch uses directly, those libraries may have their own library dependencies, which is the case here.

Fortunately, the Arduino Library Manager makes it very easy to install libraries. Please try this:

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus.

  2. Wait for the update to finish.

  3. In the "Filter your search" field, type Arduino_ConnectionHandler.

  4. Press Enter.

  5. Scroll down through the list of search results until you see "Arduino_ConnectionHandler by Arduino.cc". Click on it.

  6. Click the Install button.

  7. You may now get a dialog asking:

    Would you like to install also all the missing dependencies?

    If so, click the Install all button.

  8. Wait for the installation to finish.

  9. Click the Close button.

Now try compiling the sketch again. There might be additional libraries which are missing. In that case, you can repeat the instruction above, only adjusting the search keywords according to the file name shown in the new error message.

1 Like

Thanks for reply, i did but still i get compilation error :

Arduino : 1.8.19 (Windows 10), Carte : "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

ATTENTION : la bibliothèque ArduinoIoTCloud prétend être exécutable sur la (ou les) architecture(s) mbed, samd, esp8266, mbed_nano, mbed_portenta et peut être incompatible avec votre carte actuelle qui s'exécute sur esp32.

C:\Users\JEJ\Documents\Arduino\libraries\ArduinoIoTCloud\src\ArduinoIoTCloudTCP.cpp: In member function 'int ArduinoIoTCloudTCP::begin(bool, String, uint16_t)':

C:\Users\JEJ\Documents\Arduino\libraries\ArduinoIoTCloud\src\ArduinoIoTCloudTCP.cpp:226:14: error: 'class WiFiClientSecure' has no member named 'setInsecure'

   _sslClient.setInsecure();

              ^

Plusieurs bibliothèque trouvées pour "WiFi.h"

Utilisé : C:\Users\JEJ\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi

Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi

Non utilisé : C:\Users\JEJ\Documents\Arduino\libraries\WiFiNINA

exit status 1

Erreur de compilation pour la carte ESP32 Dev Module



Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

The 1.0.4 version of the ESP32 boards platform is about a year out of date. Even though I normally recommend always using the latest version, I can see that 1.0.6 is the version in use by Arduino IoT Cloud and Arduino Web Editor, so I will recommend you to use that one.

Follow these instructions to update:

  1. Select Tools > Board > Boards Manager from the Arduino IDE menus.
  2. Wait for the updates to finish.
  3. Scroll down through the list of boards platforms until you see "esp32 by Espressif Systems". Click on it.
  4. Select "1.0.6" from the "Select version" menu.
  5. Click the Install button.
  6. Wait for the installation to finish.
  7. Click the Close button.

Now try compiling your Thing sketch again.

1 Like

done, but still error

Arduino : 1.8.19 (Windows 10), Carte : "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

ATTENTION : la bibliothèque ArduinoIoTCloud prétend être exécutable sur la (ou les) architecture(s) mbed, samd, esp8266, mbed_nano, mbed_portenta et peut être incompatible avec votre carte actuelle qui s'exécute sur esp32.

C:\Users\JEJ\Documents\Arduino\libraries\ArduinoIoTCloud\src\property\Property.cpp:25:19: note: #pragma message: No RTC available on this architecture - ArduinoIoTCloud will not keep track of local change timestamps .

   #pragma message "No RTC available on this architecture - ArduinoIoTCloud will not keep track of local change timestamps ."

                   ^

usage: gen_esp32part.exe [-h] [--flash-size [{1MB,2MB,4MB,8MB,16MB}]]

                         [--disable-md5sum] [--no-verify] [--verify] [--quiet]

                         [--offset OFFSET] [--secure]

                         input [output]

gen_esp32part.exe: error: argument input: can't open 'C:\Users\JEJ\AppData\Local\Temp\arduino_build_858495/partitions.csv': [Errno 2] No such file or directory: 'C:\\Users\\JEJ\\AppData\\Local\\Temp\\arduino_build_858495/partitions.csv'

Plusieurs bibliothèque trouvées pour "WiFi.h"

Utilisé : C:\Users\JEJ\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi

Non utilisé : C:\Users\JEJ\Documents\Arduino\libraries\WiFiNINA

Non utilisé : C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 2

C:\Program Files (x86)\Arduino\arduino-builder a retourné 2

Erreur de compilation pour la carte ESP32 Dev Module



Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

i get same error with my own sketch too, even with 1.0.5 so i put back 1.0.4.
anyway it's not a big issue if i can't compile localy, i will do on cloud

OK, well if you ever decide you want to try compiling sketches for ESP32 again using the Arduino IDE, let us know and we'll help you troubleshoot this error.

1 Like

that's great, thanks for your kindness, i will come back if needed

Arduino: 1.8.13 (Windows 10), 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, SSL, Only Sketch, 115200"

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\haziq\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\haziq\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\haziq\Documents\Arduino\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=SSL,wipe=none,baud=115200 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\haziq\AppData\Local\Temp\arduino_build_343928 -warnings=none -build-cache C:\Users\haziq\AppData\Local\Temp\arduino_cache_274026 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\haziq\AppData\Local\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=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs-3.0.4-gcc10.3-1757bed.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs-3.0.4-gcc10.3-1757bed.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.python3.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -verbose C:\Users\haziq\Desktop\Sem4\WAN NORHISYAM\LAB6\P3\cloudiot\cloudiot.ino

C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\haziq\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\haziq\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\haziq\Documents\Arduino\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=SSL,wipe=none,baud=115200 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\haziq\AppData\Local\Temp\arduino_build_343928 -warnings=none -build-cache C:\Users\haziq\AppData\Local\Temp\arduino_cache_274026 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\haziq\AppData\Local\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=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs-3.0.4-gcc10.3-1757bed.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs-3.0.4-gcc10.3-1757bed.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.python3.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -verbose C:\Users\haziq\Desktop\Sem4\WAN NORHISYAM\LAB6\P3\cloudiot\cloudiot.ino

Using board 'd1_mini' from platform in folder: C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2

Using core 'esp8266' from platform in folder: C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2

Detecting libraries used...

"C:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/include" "-IC:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/lwip2/include" "-IC:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\haziq\AppData\Local\Temp\arduino_build_343928/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 -DDEBUG_ESP_SSL -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD="ESP8266_WEMOS_D1MINI"" -DFLASHMODE_DIO -DESP8266 "-IC:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266" "-IC:\Users\haziq\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\variants\d1_mini" "C:\Users\haziq\AppData\Local\Temp\arduino_build_343928\sketch\cloudiot.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for thingProperties.h: []cloudiot:1:10: fatal error: thingProperties.h: No such file or directory

ResolveLibrary(thingProperties.h)

1 | #include "thingProperties.h"

-> candidates: []

  |          ^~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

thingProperties.h: No such file or directory

Hi @vittoscar79. Although you will often find Arduino sketches that consist of only a single .ino file, it is possible for them to contain multiple files.

That is the case with the "Thing" sketches generated by Arduino IoT Cloud. You must make sure to download all the files of the sketch from Arduino Cloud. If you only have the primary .ino file, you will get an error like this.

I'll provide instructions for downloading the full sketch from Arduino Cloud:

  1. Open your "Thing" in Arduino IoT Cloud.
  2. Select the "Sketch" tab.
  3. Click the </> Open full editor button.
  4. Wait for the sketch to open in Arduino Web Editor (AKA "full editor").
  5. Click the ••• button to the right of the board selector.
  6. Select "Download Sketch" from the menu.
  7. Wait for download to finish.
  8. Unzip the downloaded file.
  9. Open the .ino file from the unzipped folder in the Arduino IDE.

Note that, to help protect your private information, the network credentials you set on Arduino IoT Cloud are not contained in the downloaded "Thing" sketch. After opening the sketch in the Arduino IDE, select the "arduino_secrets.h" and set the network credentials there.

For example:

#define SECRET_SSID "MY_SSID"
#define SECRET_PASS "correcthorsebatterystaple"
#define SECRET_DEVICE_KEY "mysecretkey"

Noted.
And can i know? Why is my device third party in arduino cloud iot status is "offline" im using lolin(wemos)d1 and r2 board. Although i have put my ssid password and secret key

Do you experience the same problem if you upload the "Thing" sketch to your ESP8266 board using Arduino Web Editor ("full editor")?