MKR1010 and auto create Widgets

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

What do you get in the serial monitor? We have seen many user reporting issue with MKR devices.

Hello shramik_salgaonkar, thank you for your help. Interestingly, the terminal remains empty, white. :frowning:
In the dashboard online I see that there is a connection.
It looks to me as if the MKR gets stuck. could it be liwgwn at the “CayenneMQTTMKR1010.h”?

there are some points listed here https://github.com/myDevicesIoT/Cayenne-MQTT-Arduino/issues/29
can you try them out.

So it is definitely the problem with Cayenne.begin (username, password, clientID);

I set the WRITE_CHUNK_SIZE 80 in the CayenneMQTTMKR1010.h.

No improvement. The MKR1010 simply gets stuck when the Cayenne is started.

I used the “new” libraries from your link.

Here is my CAYENNEMQTTMKR1010.h
/ *
The MIT License (MIT)
Cayenne Arduino Client Library
Copyright © 2016 myDevices
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the “Software”), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the software,
and to permit persons to whom the software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  • /

#ifndef _CAYENNEMQTTMKR1010_h
#define _CAYENNEMQTTMKR1010_h
#define WRITE_CHUNK_SIZE 80 // The chunk size to use when sending data to prevent sending too much data at once which is an issue with WiFi Shield R3.

#define INFO_CONNECTION “MKR1010”

#include “CayenneMQTTWiFiNINA.h”

#endif

it looks there is some issue with the cayenne library for mkr1010. will look into it.

If you can fix that I’ll sing the Swiss nation hymn for you. :upside_down_face:

will let you know once it is fixed.