Problem consistently communicating with Adafruit.io data dashboard

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.
User avatar
femur
 
Posts: 30
Joined: Sun Jan 22, 2012 9:53 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by femur »

Ah ha! OK! Thank you.

User avatar
femur
 
Posts: 30
Joined: Sun Jan 22, 2012 9:53 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by femur »

Hello,
I'm still getting an error on the exception. I tried both "MMQTTException" and "MQTTException".
Are these exceptions built into the library?
Attachments
Screen Shot 2023-04-30 at 2.00.50 PM.png
Screen Shot 2023-04-30 at 2.00.50 PM.png (23.41 KiB) Viewed 361 times
Screen Shot 2023-04-26 at 3.36.28 PM.png
Screen Shot 2023-04-26 at 3.36.28 PM.png (18.78 KiB) Viewed 361 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by mikeysklar »

These are from the library, but we should be able to catch and continue with the try/except setup.

What does your code look like for catching both?

User avatar
femur
 
Posts: 30
Joined: Sun Jan 22, 2012 9:53 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by femur »

Hi,
Here's the code I've been using:
https://gist.github.com/extrasleepy/875 ... 7d4aeec01f
check out lines 127 to 132 to see the "try...except" problem.
I've also included an image of my libraries.

Thank you!
Attachments
Screen Shot 2023-05-02 at 1.16.10 PM.png
Screen Shot 2023-05-02 at 1.16.10 PM.png (140.3 KiB) Viewed 349 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by mikeysklar »

Modify your try/except to handle both errors. Modify line 130 of your code from this:

Code: Select all

        except MMQTTException as mqttissue:
to this:

Code: Select all

        except (MMQTTException, MQTTException) as mqttissue:

User avatar
femur
 
Posts: 30
Joined: Sun Jan 22, 2012 9:53 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by femur »

OK. I'll give this a try tomorrow.

User avatar
femur
 
Posts: 30
Joined: Sun Jan 22, 2012 9:53 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by femur »

I'm still getting the same error unfortunatetly:
Attachments
Screen Shot 2023-05-10 at 8.34.45 AM.png
Screen Shot 2023-05-10 at 8.34.45 AM.png (15.04 KiB) Viewed 309 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by mikeysklar »

There is an open issue on this:

https://github.com/adafruit/Adafruit_Ci ... issues/163

Since the person who started it was not able to continue testing you should jump in with your setup:

* Hardware setup
* CircuitPython version
* Library versions
* A short description of the time duration before the problem appears
* The code you are running
* The error message should be enough to start the discussion

The last suggestion was to try this:

Code: Select all

from adafruit_minimqtt.adafruit_minimqtt import MMQTTException

User avatar
femur
 
Posts: 30
Joined: Sun Jan 22, 2012 9:53 pm

Re: Problem consistently communicating with Adafruit.io data dashboard

Post by femur »

Ok. I'll do that soon. Thank you again.

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”