Web Editor won't connect to Opta

The Web Editor won't connect to an Opta, but at the same time it's shown as "online" under Devices and it also will read & write values with a dashboard. The Opta is only connected via Ethernet, not USB.

I tried connecting to USB, but even though the Arduino Cloud Agent is running, the web editor still won't connect.

Also, a few weeks ago I was able to click on the device name at the top of the Web Editor and re-select the same device from the popup, which then usually made it connect. But now clicking on the device name does not even produce a selection pop-up, let alone reset the connection.

Using Firefox v129.

Edit: I tried restarting the Arduino Agent, rebooting Windows 10, deleting the device and creating/associating it as a new device, but nothing so far has worked. The local IDE can upload via USB no problem. (Maybe related: It took 3 tries to add a new device. The first two tries took over 10 minutes then returned to the initial "add device" dialog, with no device added or error message.)

Edit2: I also tried another Opta and successfully created a new cloud device for it, but this one doesn't show up online at all, unlike the other one.

Edit3: I opened the Arduino Cloud Agent Debug Console and noticed that when switching to, or reloading, the Web Editor, I instantly get 4 identical sets of map updates. The serial port IsOpen flag is false, but the local IDE is closed so nothing else is using that port.

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

downloadtool windows-drivers latest arduino keep

downloadtool bossac 1.7.0 arduino keep

downloadtool arduino-fwuploader latest arduino keep

downloadtool rp2040tools latest arduino keep

list

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\bossac\\1.7.0"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\windows-drivers\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\rp2040tools\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\arduino-fwuploader\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

downloadtool windows-drivers latest arduino keep

downloadtool bossac 1.7.0 arduino keep

downloadtool fwupdater latest arduino keep

downloadtool rp2040tools latest arduino keep

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\fwupdater\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\bossac\\1.7.0"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\windows-drivers\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\rp2040tools\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

list

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

downloadtool windows-drivers latest arduino keep

downloadtool bossac 1.7.0 arduino keep

downloadtool arduino-fwuploader latest arduino keep

downloadtool rp2040tools latest arduino keep

list

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\windows-drivers\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\rp2040tools\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\arduino-fwuploader\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\bossac\\1.7.0"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

close COM17

{
  "Error": "We could not find the serial port COM17 that you were trying to close."
}

list

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

downloadtool windows-drivers latest arduino keep

downloadtool bossac 1.7.0 arduino keep

downloadtool arduino-fwuploader latest arduino keep

downloadtool rp2040tools latest arduino keep

list

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\windows-drivers\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\bossac\\1.7.0"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\rp2040tools\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Ensure that the files are executable"
}

{
  "DownloadStatus": "Pending",
  "Msg": "Updating map with location C:\\Users\\Conpewter\\.arduino-create\\arduino\\arduino-fwuploader\\latest"
}

{
  "DownloadStatus": "Success",
  "Msg": "Map Updated"
}

list

Serial Ports:
[
  {
    "Name": "COM17",
    "SerialNumber": "0027001F3532511339353732",
    "IsOpen": false,
    "VendorID": "0x2341",
    "ProductID": "0x0164"
  }
]

And here's the code I uploaded with the local IDE. I inlined the two header files for completion and easier reading. This works fine with a little dashboard, but again the device is not seen as online by the Web Editor.

//#include "arduino_secrets.h"
#define SECRET_OPTIONAL_DNS ""
#define SECRET_OPTIONAL_GATEWAY ""
#define SECRET_OPTIONAL_IP ""
#define SECRET_OPTIONAL_NETMASK ""

//#include "thingProperties.h"
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>

const char IP[]      = SECRET_OPTIONAL_IP;
const char DNS[]     = SECRET_OPTIONAL_DNS;
const char GATEWAY[] = SECRET_OPTIONAL_GATEWAY;
const char NETMASK[] = SECRET_OPTIONAL_NETMASK;

void onLightChange();

bool button;
bool light;

void initProperties(){

  ArduinoCloud.addProperty(button, READ, ON_CHANGE, NULL);
  ArduinoCloud.addProperty(light, READWRITE, ON_CHANGE, onLightChange);

}

EthernetConnectionHandler ArduinoIoTPreferredConnection(IP, DNS, GATEWAY, NETMASK);

void setup() {
  Serial.begin(115200);
  delay(1500); 

  initProperties();

  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  // 0=only errors, 4=max verbosity.
  setDebugMessageLevel(4);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();

  button = !digitalRead(BTN_USER);
}

void onLightChange()  {
  if ( light ) {
    digitalWrite(LED_D3, HIGH);
  } else {
    digitalWrite(LED_D3, LOW);
  }
}

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