I am having trouble getting the ESP8266 to go on line with the cloud.
Gone through the new device and new Thing, plus added in a couple of cloud variables.
all the rest of the code has been generated by the create tool.
After the download I can see the ESP8266 module appear on my local network, however it does. not connect to the cloud.
See the serial monitor text, below
�$l�V�$H��4h$�***** Arduino IoT Cloud - configuration info *****
Device ID: aee23758-5047-4a71-a99c-eae68afb6211
MQTT Broker: iot.arduino.cc:8884
WiFi.status(): 3
Connected to "MY NETWORK"
TimeServiceClass::sync Drift: -1723457061 RTC value: 1723457066
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8884 Error: 5
TimeServiceClass::sync Drift: -1 RTC value: 1723457071
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8884 Error: 5
TimeServiceClass::sync Drift: 0 RTC value: 1723457078
I have repeated the creation process a number of times, all with the same result.
I have another ESP32 set up for the IoT and connects with the same network and is reliably on line with no problems.
A little research produced a suggestion that there could be some port blocking, however the Router appears to be free of any Port blocking and specifically none on port 8884
Does anybody have any ideas?
Main program code
______________________
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/48963417-fc87-4404-acbb-5e65d9ab961a
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thingk
float suino_3266_Humidity;
float suino_3266_Pressure;
float suino_3288_Temperature;
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(4);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
}
____________________________
ThingProperties.h
// Code generated by Arduino IoT Cloud, DO NOT EDIT.
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
const char DEVICE_LOGIN_NAME[] = "aee23758-5047-4a71-a99c-eae68afb6211";
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
float suino_3266_Humidity;
float suino_3266_Pressure;
float suino_3288_Temperature;
void initProperties(){
ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
ArduinoCloud.addProperty(suino_3266_Humidity, READ, 10 * SECONDS, NULL);
ArduinoCloud.addProperty(suino_3266_Pressure, READ, 10 * SECONDS, NULL);
ArduinoCloud.addProperty(suino_3288_Temperature, READ, 10 * SECONDS, NULL);
}
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
type or paste code here