I have something very weird happening here : My students and I suddenly can't connect to Arduino IoT Cloud
Everything seems to be fine, we create a new thing, a new device, add the network credentials.
We upload the sketch without changing anything.
The upload is ok.
BUT
in the Serial Monitor, we see that it can connect to the network, but it doesn't return the Thing ID as it should do.
We don't have any error message.
But we see that the device is OFFLINE and it doesn't react with the dashboard, if we add cloud variables and link it to a widget etc etc.
Everything was working well on Tuesday...It is absolute chaos since yesterday, for everyone in my class (12 Wemos) I don't know why.
We use my own Network, nothing has change on it...We have tried with phones access point. Nothing is working.
Are you able to test the same code on an official Arduino board model with WiFi? Or any other arduino compatible board with WiFi? That way, you can rule out the Wemos mini as the cause of the problem.
I don't have any other suggestions. I don't use Arduino IOT cloud. But I'm sure others here on the forum do, so maybe they know if there are any current problems with it.
You could post your code so others can check it. Please follow forum guide when posting code.
I have tested on an NODE MCU 1.0 and an ESP WROOM 32, It is reacting exactly the same as Wemos D1 Mini
Here is my code...as I said, it is very basic. Even the automatically generated code by Arduino IoT Cloud doesn't work (well, I mean the device is always OFFLINE and the serial monitor doesn't return the Thing ID as it should do)
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled 2"
https://create.arduino.cc/cloud/things/38065c52-53d6-4300-b896-b5a3a33a28d7
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
CloudLight light;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
void setup() {
// 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();
//pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
ArduinoCloud.update();
// Your code here
}
/*
Since Light is READ_WRITE variable, onLightChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLightChange() {
// Add your code here to act upon Light change
if (light){
//digitalWrite(LED_BUILTIN, HIGH);
Serial.println("light");
} else {
//digitalWrite(LED_BUILTIN, LOW);
Serial.println("else");
}
}
If you check the bottom of the page under this topic, sometimes similar problems have been discussed. These 2 for example might be worthwhile reading through:
Click the following link to open the list of your Arduino Cloud Things in the web browser: https://app.arduino.cc/things
Click the name of the Thing. ⓘ For the purposes of this procedure, it will be best if you use the minimal new Thing you created during your previous efforts rather than a real Thing project that might introduce irrelevant complexity into the equation.
The "Setup" page for the Thing will open.
Select the "Sketch" tab at the top of the page.
The "Sketch" page for the Thing will open.
Change this line in your sketch:
setDebugMessageLevel(2);
to this:
setDebugMessageLevel(4);
ⓘ This will cause the sketch to produce more detailed debug logs about the network connection processes, which will hopefully give us some clue about what is going wrong.
Wait for the USB symbol icon to appear on the Cloud Editor toolbar, indicating the serial port of your board is recognized.
Click the upload button on the Cloud Editor toolbar.
The upload process will start.
Wait for the upload to finish successfully.
Click on "Serial Monitor" in the Cloud Editor toolbar.
A Serial Monitor window will open.
You should now see information about the progress of the Thing initialization printed in the window. Wait until the information stops printing, or until it gets into a state where it is persistently only printing the same information repeatedly.
Press the Ctrl+A keyboard shortcut (Command+A for macOS users).
This will select all the text in the Serial Monitor window.
Press the Ctrl+C keyboard shortcut (Command+C for macOS users).
This will copy the selected text to the clipboard.
Open a forum reply here by clicking the "Reply" button.
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.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the copied text into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Click the "Reply" button to post the output.
Please let me know if you have any questions or problems while following those instructions.