Fragility of IoT Cloud - It seems unusable - SOLVED

I've been working through the projects for the Opla kit. Invariably, I get to the point where I have created a Thing, attached the board, put in the network info, completed the sketch, verified the sketch and then the upload fails.

Often I get "Type Error: Failed to Fetch" and then a message on the IoT editor screen about needing to have the Create Agent running to load over USB. The Create agent seems to come and go (I am using Chrome Browser on Windows 10). Sometimes if I keep trying either (a) the board disappears from the editor tool bar above the sketch; (b) The editor toolbar above the sketch starts reporting an Over the Air connection and tries to do an OTA upload which always fails; 0r (c) it just starts working after I reinstall the Create Agent several times.

Today (c) did not happen, but I switched over to the full editor and the sketch verified and uploaded, serial monitor showed status and data and WiFi connection - but couldn't connect to the Arduino cloud. Tried verify/upload again - this time it worked.

There seem to be a lot of similar observations and mentions of updates being pushed to the IoT cloud or the Create Agent and asking if it works now.

Is there somewhere to check status of the Arduino/IoT cloud, kinda like the downforeveryoneorjustme.com sites?
This is not reliable enough to be useful at this point.

@k3tn

the behaviour you are experiencing might be due to a bug we recently discovered and is being fixed.
I’ll ask one of my colleague tomcheck if it’s the case and reply to this post with more information

thank you for your patience
regards,

ubi

Hi, sorry to hear that.
It seems like the agent is crashing.
What version of the agent are you using?
Could you please enable the crashreport functionality as explained here? How to use crashreport functionality · arduino/arduino-create-agent Wiki · GitHub

Agent crashes when dashboard is viewed mostly. Then, when returning to sketch, re-load the create and wait a bit. Its repeatable, but looks random at first.
Its best to:

  1. prior to compile/upload, refresh the screen.
  2. if the "verify/upload" icon isnt bold, then (on PC, right click the "show hidden icons" and see if the create icon disappears, then search on "ar" and reload
  3. icon will go bold
  4. verify/compile.

Update - a few weeks ago, while updating my environmental sensor cloud sketch, the IDE said I should update firmware on WiFi1010 board. Release notes say a watchdog function was added to restart when things went kerplooey.

Seems to have cured my problem. I have kept the MKR ENV Shield/WiFi1010 stack running for over a week and never had to restart board. Does take some time for cloud data to start updating sometimes, but zero outages in a week - nice!

4 Likes

hi... how did you manage to get the light working... would you be able to help me I am not able to get there...

Looks like you are using the Environmental Carrier/Opla kit. Take a lot my post here - I reported some errors in what the online instructions/sketch said to do and one of them was related to illuminance.

I read your post in the link and still can not find solution to my issue with Illuminance. I am not able to get illuminance display is always zero

how did you set up lluminance and which type you are using from Cloud?

I think you can the sketch I'm using at this link: Arduino Cloud

The light sensor is on the MKR ENV board, description at https://www.arduino.cc/en/Guide/MKRENVShield You can click on the link for the TEMT light sensor and see the specs.

Make sure you don't have illuminance declared as a BOOL variable, that was an error on the Arduino web site at one time.

TL-W

you are using MKR_ENV this is easy and organize as your illuminance is simple and you do not have to treat it differently from temperature, humidity so you do not have this issue. In MKR IOT is different you can not just directly read illuminance

illuminance = ENV.readIlluminance();

I had light working on the IoT carrier board, let me see if I can find that sketch.

I think this is the working sketch when I was using the IoT carrier board/Opla kit: Arduino Cloud

this is exactly my point...
seems you have previous version - old that was much nicer as was clear type of variables and you have

float pressure;
float humidity;
int light;
String weather_report;
float temperature;

new version looks like

CloudSwitch lEDswitch;
CloudColoredLight colorLightSwitch;
String weather_report;
CloudPressure pressure;
CloudTemperatureSensor temperature;
CloudRelativeHumidity humidity;
CloudIlluminance illuminance;

so you do not have control over type ...

therefore it works on your code
because the light was already an integer

  int none;
  carrier.Light.readColor(none, none, none, light);

as I have I suspect CloudIlluminance as float it will not work and I am force to declrate again as int...

thanks a lot for sharing it should help me to modify the code to get it working...
it took me few weeks to get some reply on this. I am disappointed that the Arduino team did not provide a simple explanation even during the support discussion... but @k3tn I am really happy that you provided a sample and this all makes sense now...
conclusion - documentation is wrong for new users...

I've found that the Arduino forum areas are not very beginner friendly - if you are an advanced user with an advanced questions seems like many responses. But near zero response for any beginner level questions I had.

Putting in an actual support request gets a response but the major problems I've had turned out to be Arduino library or firmware problems - and the support person first went through many steps making me retry things I said I already tried, send in videos of the IDE screen etc. I guess they are used to taking all the beginner calls and 99% of the time those script steps work... But ended up causing the process to take several weeks each time.

1 Like

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