Nono ESP32 ArduinoIoTCloud.h IDE2 Compiler errors

This is my first post for help on the forum, so I hope I have posted in the right place.

I'm trying to compile a sketch that compiles just fine with the Arduino cloud editor but now using IDE2 however I can't find out whats causing errors in the ArduinoIoTCloud.h include.

As far as I can tell I am using latest ESP32 board manager 3.1.1 and ArduinoIoTCloud 2.3.1 (Which appears to be the same used by the cloud.

There are 12 errors as per example below

void addPropertyReal(Property& property, String name, int tag, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0f, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated**("Use addProperty(property, Permission::ReadWrite) instead.")));**

Any guidance is much appreciated.

Thank you.

Hi @nake-350. I'm going to ask you to provide the full output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select Sketch > Verify/Compile from the Arduino IDE menus.
  2. Wait for the compilation to fail.
  3. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the <CODE/> 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.
  6. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  7. Move the cursor outside of the code block markup before you add any additional text to your reply.
  8. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:

    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

In file included from E:\Radio\Microchip\Arduino\Test_Master_jan22a\thingProperties.h:3,
                 from E:\Radio\Microchip\Arduino\Test_Master_jan22a\Test_Master_jan22a.ino:23:
E:\Radio\Microchip\Arduino\Test_Master_jan22a\thingProperties.h: In function 'void initProperties()':
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:106:45: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
  106 | #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)
E:\Radio\Microchip\Arduino\Test_Master_jan22a\thingProperties.h:26:16: note: in expansion of macro 'addProperty'
   26 |   ArduinoCloud.addProperty(Hours, READ, ON_CHANGE, onHoursChange);
      |                ^~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:115:10: note: declared here
  115 |     void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
      |          ^~~~~~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:106:45: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
  106 | #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)
E:\Radio\Microchip\Arduino\Test_Master_jan22a\thingProperties.h:27:16: note: in expansion of macro 'addProperty'
   27 |   ArduinoCloud.addProperty(Minutes, READ, ON_CHANGE, onMinutesChange);
      |                ^~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:115:10: note: declared here
  115 |     void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
      |          ^~~~~~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:106:45: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
  106 | #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)
E:\Radio\Microchip\Arduino\Test_Master_jan22a\thingProperties.h:28:16: note: in expansion of macro 'addProperty'
   28 |   ArduinoCloud.addProperty(rx_address, READ, ON_CHANGE, NULL);
      |                ^~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:115:10: note: declared here
  115 |     void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
      |          ^~~~~~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:106:45: warning: 'void ArduinoIoTCloudClass::addPropertyReal(int&, String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]
  106 | #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)
E:\Radio\Microchip\Arduino\Test_Master_jan22a\thingProperties.h:29:16: note: in expansion of macro 'addProperty'
   29 |   ArduinoCloud.addProperty(rx_data, READ, ON_CHANGE, NULL);
      |                ^~~~~~~~~~~
c:\Users\XXX\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:115:10: note: declared here
  115 |     void addPropertyReal(int& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));
      |          ^~~~~~~~~~~~~~~

Thank you. I hope this helps

You are using old deprecated libraries. Do an update check on your libraries.

Thank you, but nothing showing as needing updating.

In that case you are using a deprecated library. Do you recall the Library name?

Why are there two drives C and E referenced?

@sonofcy, because the sketch is on the E-drive and the libraries are on the C-drive.

Hello, I'm sorry I don't understand what you mean. What library do mean?

Yes the sketch is saved on E whereas the IDE and libraries are on C.

The libraries folder is normally in the sketchbook location (NOT the builtin or board libraries) In other words your sketch folder and your libraries folder are side by side.

So should I copy the sketch to the default Arduino location and recomplile from there?

Are you using the desktop ide ? normally this are just warnings. It looks like that warning are consideres as error. Would you try to reduce the build verbosity from the preferences menu of the IDE?

I'm relatively new to this, but I was trying to get my IoT sketch working in the desktop IDE 2 yes.
I have only been Verifying the code on IDE 2 when I got the error notifications. These appear whether verbose settings are on or off in preferences. I have not actually tried flashing to see if the errors /warnings are ignored, but from what you are saying worth a try?

Update. So the code does compile and flash with the warnings in approximately 35 seconds with the cloud IDE, but taking somewhere between 5-10 minutes with IDE 2. How can I reduce the IDE 2 time?

I'm going to ask you to provide the full verbose output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to finish.
  6. Right click on the black "Output" panel at the bottom of the Arduino IDE window.
    A context menu will open.
  7. Select Copy All from the menu.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> 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.
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:

    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.