Dashboard not showing values from sensors

Hello!
I am currently making a weather station with a DHT, a RTC and a LDR sensor. The code that I made is uploading and the values are showing up on serial but in the dashboard no. Here is the code:

#include <WiFi.h>
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
#include "DHT.h"
#include "RTClib.h"
#include "thingProperties.h"

RTC_DS3231 rtc;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

#define DHTPIN 4
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

const char ssid[] = "ssid";
const char pass[] = "password";

void setup() {
  Serial.begin(9600);
  dht.begin();
  rtc.begin();

  setDebugMessageLevel(4);

  // Connect to WiFi
  Serial.print("Connecting to WiFi...");
  WiFi.begin(ssid, pass);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.print(".");
  }
  Serial.println(" Connected!");

  // Initialize Arduino Cloud
  initProperties(); // Initialize cloud properties
}

void loop() {
  // Read sensor values
  float localTemp = dht.readTemperature();
  float localHumi = dht.readHumidity();
  int localBright = analogRead(A0);
  DateTime now = rtc.now();
  String localDateTime = String(now.year()) + "-" + String(now.month()) + "-" + String(now.day()) + " "
                         + String(now.hour()) + ":" + String(now.minute()) + ":" + String(now.second());

  // Debug prints
  Serial.print("Temperature: "); Serial.println(localTemp);
  Serial.print("Humidity: "); Serial.println(localHumi);
  Serial.print("Brightness: "); Serial.println(localBright);
  Serial.print("DateTime: "); Serial.println(localDateTime);

  // Update cloud variables
  cloudTemperature = localTemp;
  cloudHumidity = localHumi;
  cloudBrightness = localBright;
  cloudDateTime = localDateTime;

  // Update Arduino Cloud
  ArduinoCloud.update();

  // Delay for a second (adjust as necessary)
  delay(1000);
}

And this is the thingProperties.h:

// Code generated by Arduino IoT Cloud, DO NOT EDIT.

#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>

const char DEVICE_LOGIN_NAME[]  = "device_id";

const char SSID[]               = SECRET_SSID;    // Network SSID (name)
const char PASS[]               = SECRET_OPTIONAL_PASS;    // Network password (use for WPA, or use as key for WEP)
const char DEVICE_KEY[]  = SECRET_DEVICE_KEY;    // Secret device password

void onCloudBrightnessChange();
void onCloudHumidityChange();
void onCloudTemperatureChange();

float cloudTemperature;  
float cloudHumidity;     
int cloudBrightness;  
String cloudDateTime;     

void initProperties() {
  ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
  ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
  ArduinoCloud.addProperty(cloudTemperature, READWRITE, ON_CHANGE, NULL);
  ArduinoCloud.addProperty(cloudHumidity, READWRITE, ON_CHANGE, NULL);
  ArduinoCloud.addProperty(cloudBrightness, READWRITE, ON_CHANGE, NULL);
  ArduinoCloud.addProperty(cloudDateTime, READWRITE, ON_CHANGE, NULL);
}

WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);

Please help me as soon as possible!

Hi @manolisg11. I'm going to ask you to provide some additional information that might help us to identify the problem.


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


Please do this:

  1. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login
  2. Click the following link to open the list of your Arduino Cloud Things in the web browser:
    https://app.arduino.cc/things
  3. Click the name of the Thing.
    The "Setup" page for the Thing will open.
  4. Look under the "Associated Device" section of the page, there you will see a "Status" field.

Please add a reply here on this forum thread to tell us whether the "Status" field said "Online" or "Offline".