Adafruit IO changes??

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Adafruit IO changes??

Post by _phillip »

Has Adafruit changed the IO publishing code from this:

Code: Select all

Adafruit_MQTT_Publish temperature = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/temperature");
to this?

Code: Select all

AdafruitIO_Feed *temperature = io.feed("temperature");
I have started getting an 'overload' error that I have never seen before from a sketch (that uses IO) that I have been working with for over a year. I understand this error, but after digging around for the cause I came across this Adafruit tutorial:

https://cdn-learn.adafruit.com/download ... midity.pdf

that uses the latter IO code. I will put the hardware together and run this tutorial sketch just to be certain.

Any help will be greatly appreciated.

Thanks.

User avatar
jwcooper
 
Posts: 1004
Joined: Tue May 01, 2012 9:08 pm

Re: Adafruit IO changes??

Post by jwcooper »

Have you recently updated your client libraries? Particularly the Adafruit_MQTT_Library? Could you let us know the versions you're using? Some example code would be good too.

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: Adafruit IO changes??

Post by _phillip »

@jwcooper

Thank you for your comments.

Perhaps two days ago I reinstalled the Adafruit_MQTT library and the error persisted. Today I did as you suggested and reinstalled the same library and the error vanished. Here is a grab of this latest library install.

Image

While I am grateful for the error elimination, has the publishing code changed as I noted in my original post?

I sincerely appreciate your help.
Attachments
adafruit_MQTT_lib.png
adafruit_MQTT_lib.png (384.42 KiB) Viewed 205 times

User avatar
jwcooper
 
Posts: 1004
Joined: Tue May 01, 2012 9:08 pm

Re: Adafruit IO changes??

Post by jwcooper »

Thanks for the reply, and I'm glad it's now working for you.

We haven't made any server side changes that would have changed how we handle publishing via MQTT.

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: Adafruit IO changes??

Post by _phillip »

While I do not have any compiler errors, this compiler text is a concern. Should I worry about any of this?

Thank you.

Code: Select all

/Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -Wall -Wextra -Werror=return-type -Wno-expansion-to-defined -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD "-D__SKETCH_NAME__=\"\"\"talavera_final_13NOV2022.ino\"\"\"" -DF_CPU=48000000L -DARDUINO=10819 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ADAFRUIT -D__SAMD21G18A__ -DADAFRUIT_FEATHER_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DUSB_VID=0x239A -DUSB_PID=0x800B -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Adafruit\"" "-DUSB_PRODUCT=\"Feather M0\"" -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Adafruit_TinyUSB_Arduino/src/arduino -Os -D__SAMD21G18A__ -DADAFRUIT_FEATHER_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -DUSB_VID=0x239A -DUSB_PID=0x800B -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Adafruit\"" "-DUSB_PRODUCT=\"Feather M0\"" -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Adafruit_TinyUSB_Arduino/src/arduino -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/tools/CMSIS/5.4.0/CMSIS/Core/Include/ -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/tools/CMSIS/5.4.0/CMSIS/DSP/Include/ -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/tools/CMSIS-Atmel/1.2.2/CMSIS/Device/ATMEL/ -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/variants/feather_m0 -I/

Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_LiquidCrystal -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Wire -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/SPI -I/

Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Adafruit_ZeroDMA -I/

Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library -I/

Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_FONA_Library -I/

Users/phillipanthonybriles/Documents/Arduino/libraries/DHT_sensor_library -I/

Users/phillipanthonybriles/Documents/Arduino/libraries/WiFi101/src -I/

Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_Unified_Sensor /var/folders/y_/lvhgrt551bn5zg3t3g_kzw240000gn/T/arduino_build_190790/sketch/talavera_final_13NOV2022.ino.cpp -o /var/folders/y_/lvhgrt551bn5zg3t3g_kzw240000gn/T/arduino_build_190790/sketch/talavera_final_13NOV2022.ino.cpp.o

In file included from /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT_FONA.h:25,
                 from /Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino:407:
/Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.h:28: warning: "strncpy_P" redefined
   28 | #define strncpy_P(dest, src, len) strncpy((dest), (src), (len))

      | 
In file included from /Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino/Arduino.h:36,
                 from /var/folders/y_/lvhgrt551bn5zg3t3g_kzw240000gn/T/arduino_build_190790/sketch/talavera_final_13NOV2022.ino.cpp:1:
/Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino/avr/pgmspace.h:74: note: this is the location of the previous definition
   74 | #define strncpy_P(s1, s2, n) strncpy((s1), (s2), (n))

      | 
In file included from /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT_FONA.h:25,
                 from /Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino:407:
/Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library/Adafruit_MQTT.h:29: warning: "strncasecmp_P" redefined
   29 | #define strncasecmp_P(f1, f2, len) strncasecmp((f1), (f2), (len))

      | 
In file included from /Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino/Arduino.h:36,
                 from /var/folders/y_/lvhgrt551bn5zg3t3g_kzw240000gn/T/arduino_build_190790/sketch/talavera_final_13NOV2022.ino.cpp:1:
/Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/cores/arduino/avr/pgmspace.h:72: note: this is the location of the previous definition
   72 | #define strncasecmp_P(s1, s2, n) strncasecmp((s1), (s2), (n))

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit IO changes??

Post by brubell »

Why is that text a concern? This looks like the normal output of the GNU Arm Embedded Toolchain building for an Adafruit Feather M0..

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: Adafruit IO changes??

Post by _phillip »

Thank you for your comments.

It's the multiple 'warning: ...' text lines that I was referring to. If that is normal then I suppose I have nothing to be concerned with.

Thanks.

User avatar
_phillip
 
Posts: 313
Joined: Fri Apr 09, 2021 3:28 pm

Re: Adafruit IO changes??

Post by _phillip »

@jwcooper

I just opened and compiled the same sketch I was working with yesterday and the 'overload' compiler error has returned. I have not modified this sketch in any way whatsoever.

Code: Select all

      |        ^~~~~~~
/Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library-2.5.1/Adafruit_MQTT.h:302:8: note: candidate: 'bool Adafruit_MQTT_Publish::publish(uint32_t, bool)'
  302 |   bool publish(uint32_t i, bool retain);
      |        ^~~~~~~
/Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino: In function 'void power_check(float)':
/Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino:670:26: warning: unused parameter 'interval' [-Wunused-parameter]
  670 |   void power_check(float interval)
      |                    ~~~~~~^~~~~~~~
/Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino: In function 'void read_tank_level(float)':
/Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino:857:15: warning: unused variable 'wtr_seconds' [-Wunused-variable]
  857 |           int wtr_seconds = wtr_currentMillis / 1000;  // convert ms to seconds ...
      |               ^~~~~~~~~~~
/Users/phillipanthonybriles/Documents/Arduino/Talavera ƒ/talavera_final_13NOV2022/talavera_final_13NOV2022.ino:822:13: warning: unused variable 'num' [-Wunused-variable]
  822 |       float num = 0.0;;  // NEW! 1 JUL 21 @ 1551H local dummy var to use with readDistance(num) ...
      |             ^~~
Multiple libraries were found for "Adafruit_MQTT_FONA.h"
 Used: /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library-2.5.1
 Not used: /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library
Using library Adafruit_LiquidCrystal at version 1.1.0 in folder: /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_LiquidCrystal 
Using library Wire at version 1.0 in folder: /Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Wire 
Using library SPI at version 1.0 in folder: /Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/SPI 
Using library Adafruit_ZeroDMA at version 1.1.0 in folder: /Users/phillipanthonybriles/Library/Arduino15/packages/adafruit/hardware/samd/1.7.10/libraries/Adafruit_ZeroDMA 
Using library Adafruit_MQTT_Library-2.5.1 at version 2.5.1 in folder: /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_MQTT_Library-2.5.1 
Using library Adafruit_FONA_Library at version 1.3.11 in folder: /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_FONA_Library 
Using library DHT_sensor_library at version 1.4.4 in folder: /Users/phillipanthonybriles/Documents/Arduino/libraries/DHT_sensor_library 
Using library WiFi101 at version 0.16.1 in folder: /Users/phillipanthonybriles/Documents/Arduino/libraries/WiFi101 
Using library Adafruit_Unified_Sensor at version 1.1.6 in folder: /Users/phillipanthonybriles/Documents/Arduino/libraries/Adafruit_Unified_Sensor 
exit status 1

call of overloaded 'publish(volatile float&, double)' is ambiguous
This is getting very old. I will reinstall the Adafruit_MQTT library once again and see if that helps. Thanks.

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit IO changes??

Post by brubell »

Update your Adafruit MQTT Library version to the latest version, v2.5.2

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”