Additional boards manager URLs

I failed to connect my board to dashboard. i have ensure that there is no error on all of the wire connection and the codes. is there any additional boards manager URLs to be added in the IDE?

which device are you using?
also can you ask all your queries here in place of creating new topics.

i am using ESP32 to create a power monitor using few sensors which are DHT22, ACS712 and MQ135.
also i am using relay module to control the light bulbs via this platform.

can you share the code you are using and if any error while uploading.

Sure. I haven’t include for the bulb remote control yet. this only for the sensors.

#include <ETH.h>
#include <WiFi.h>
#include <WiFiAP.h>
#include <WiFiClient.h>
#include <WiFiGeneric.h>
#include <WiFiMulti.h>
#include <WiFiScan.h>
#include <WiFiServer.h>
#include <WiFiSTA.h>
#include <WiFiType.h>
#include <WiFiUdp.h>

#include <CayenneMQTTESP32.h>
#include <WiFi.h>
#include <DHT.h>
#include <MQ135.h>
#include <ACS712.h>
#include <Adafruit_MCP23017.h>
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
//#define temp_pin V1
//#define humid_pin V2
//#define heat_pin V3
#define DHTPIN 15 // sensor pin
#define gasPIN 4
#define DHTTYPE DHT22
#define sensorPIN 13

char ssid = “Invenio PTL-5G”;
char pwd = “PM194526”;

char username = “b6ab1550-6f59-11eb-a2e4-b32ea624e442”;
char mqtt_password = “266412e6fd13e55a7aaffebb3f203bb9b5ca7d1f”;
char cliend_id = “370cc110-9cf7-11eb-8779-7d56e82df461”;

DHT dht(DHTPIN, DHTTYPE);
MQ135 gasSensor = MQ135(gasPIN);
ACS712 sensor(ACS712_05B, sensorPIN);

//int mVperAmp = 185; // use 185 for 5A, 100 for 20A Module and 66 for 30A Module

int relay = 2;
int relay2 = 25;
int relay3 = 26;
int relay4 = 33;
int input_pin = 34;
int val = 0;
double volts = 0;
float co2Limit = 240.0;

void setup() {

// Define GPA0 (physical pin 21) as output pin on both MCPs
pinMode(relay, OUTPUT); //6
pinMode(relay2, OUTPUT); //6
pinMode(relay3, OUTPUT); //6
pinMode(relay4, OUTPUT); //6

Serial.begin(9600);
//WiFi.begin(ssid, pwd);
// attempt to connect to Wifi network:
//while ( WiFi.status() != WL_CONNECTED) {
//Serial.print("Attempting to connect to WEP network, SSID: ");
//Serial.println(ssid);

// wait 10 seconds for connection:
//delay(3000);

//}

// once you are connected :
//Serial.print("You’re connected to the network. ");
//Serial.println("IP address: ");
//Serial.println(WiFi.localIP());
//Serial.println();

Serial.println(F(“DHT22 sensors reading”));
dht.begin();

//Cayenne.begin(username, mqtt_password, cliend_id, ssid, pwd);
//Serial.println(“Ready…”);
}
void loop() {
//val = analogRead(input_pin);
//Serial.println(val);
digitalWrite(relay3, HIGH);
digitalWrite(relay4, HIGH);
delay(1000);

digitalWrite(relay3, LOW);
digitalWrite(relay4, LOW);
delay(1000);

float t = dht.readTemperature(); // get the temperature value
float h = dht.readHumidity(); // get the humidity value

if(isnan(h) || isnan(t)) {
Serial.println(F(“Failed to read from DHT22 sensor”));
return;
}

// compute heat index in Celsius (isFarenheit = false)
float hic = dht.computeHeatIndex(t, h, false);

// print the results on the serial monitor and display on Cayenne
Serial.print(F("Temperature: "));
Serial.print(t);
Serial.print(“°C”);
Serial.println();
Serial.print(F(“Humidity: “));
Serial.print(h);
Serial.print(”%” );
Serial.println();
Serial.print(F("Heat index: "));
Serial.print(hic);
Serial.print(F(“°C”));
Serial.println();
// display all values on Cayenne
//Cayenne.virtualWrite(temp_pin, t);
//Cayenne.virtualWrite(humid_pin, h);
//Cayenne.virtualWrite(heat_pin, hic);

float rzero = gasSensor.getRZero();
Serial.print("rzero value: ");
Serial.print(rzero);
Serial.println();
float ppm = gasSensor.getPPM();
Serial.print("CO2 value: ");
Serial.print(ppm);
Serial.print(“ppm”);
Serial.println();

if (ppm > co2Limit) {
digitalWrite(relay, LOW);
digitalWrite(relay2, LOW);
delay(1000);
digitalWrite(relay, HIGH);
digitalWrite(relay2, HIGH);
}

float I = sensor.getCurrentDC();

// Send it to serial
Serial.println(String("Current = “) + I + " mA”);
Serial.println();

// Wait a second before the new measurement
delay(1000);
//Cayenne.loop();
}

can you run the below code and share the serial monitor output.

#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP32.h>

// WiFi network info.
char ssid[] = "ssid";
char wifiPassword[] = "wifiPassword";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "MQTT_USERNAME";
char password[] = "MQTT_PASSWORD";
char clientID[] = "CLIENT_ID";


void setup() {
	Serial.begin(9600);
	Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}

void loop() {
	Cayenne.loop();
}

// Default function for sending sensor data at intervals to Cayenne.
// You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.
CAYENNE_OUT_DEFAULT()
{
	// Write data to Cayenne here. This example just sends the current uptime in milliseconds on virtual channel 0.
	Cayenne.virtualWrite(0, millis());
	// Some examples of other functions you can use to send data.
	//Cayenne.celsiusWrite(1, 22.0);
	//Cayenne.luxWrite(2, 700);
	//Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
}

// Default function for processing actuator commands from the Cayenne Dashboard.
// You can also use functions for specific channels, e.g CAYENNE_IN(1) for channel 1 commands.
CAYENNE_IN_DEFAULT()
{
	CAYENNE_LOG("Channel %u, value %s", request.channel, getValue.asString());
	//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError("Error message");
}