Hello, I have a MKR1010 and wanted to try out your beautiful myDevices.
Just why doesn’t it create “widgets” for me automatically?
I see the device online in the Dashboard only the widgets are not generated.
Your example claims this.
My Skech
#include <CayenneMQTTMKR1010.h> // Comment
#include <DHT.h> // Comment
#define CAYENNE_DEBUG // Comment
#define CAYENNE_PRINT Serial // Comment
// WiFi network info.
char ssid = “Geheim”;
char wifiPassword = “auch Geheim”;
// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “blablalba cryptisch”;
char password = “blablalba cryptisch”;
char clientID = “blablalba cryptisch”;
#define DHTPIN 2 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
#define TEMPERATURE_VIRTUAL_CHANNEL 1
#define HUMIDITY_VIRTUAL_CHANNEL 2
DHT dht(DHTPIN, DHTTYPE); // Initialize DHT sensor.
void setup() {
Serial.begin(9600);
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
dht.begin();
}
void loop() {
Cayenne.loop();
}
// This function is called at intervals to send temperature sensor data to Cayenne in Celsius.
CAYENNE_OUT(TEMPERATURE_VIRTUAL_CHANNEL)
{
Cayenne.virtualWrite(TEMPERATURE_VIRTUAL_CHANNEL, dht.readTemperature(), “temp”, “c”);
}
// This function is called at intervals to send humidity sensor data to Cayenne.
CAYENNE_OUT(HUMIDITY_VIRTUAL_CHANNEL)
{
Cayenne.virtualWrite(HUMIDITY_VIRTUAL_CHANNEL, dht.readHumidity(), “rel_hum”, “p”);
}
Thanks for your Help