Go Down

Topic: Arduino IoT Cloud - Update (Read 1 time) previous topic - next topic

We just released a new version of Arduino IoT Cloud backend. Since there have been some changes and you're one of our beta users, we want to inform you about them. We especially value users like you and want to keep you in the loop.


Callback Name Format
The format for callback names will be different. Instead of [propertyName]callback, use on[propertyName]Change.
This will affect a few items when you update your code using the EDIT CODE button:
- The cloudProperties.h file will be replaced with the new content based on the callback name change.
- New callback templates will be added to your ino file.

Please note that existing callbacks will not be deleted.

An initPropertiesValues() Method Added
Every time you generate or update a sketch, a method called initPropertiesValues() will be updated accordingly with your property configuration. The properties values will be initialized to the configured minimum value, or with the default value. For example, if the type is boolean, it will be initialized to false.

ArduinoCloud.poll() Renamed to ArduinoCloud.update()
Any sketch that has already been generated will not be modified. So the ArduinoCloud.poll() method will still work. However, since it is now deprecated, we recommend that you update your sketches for future use.

Sketch Names now like Arduino IDE
Sketch names will now use the same naming format as Arduino IDE. If your thing is named something like "mything", the related sketch will be named "mything_[date][incremental_letter]" (e.g., mything_oct16a). This will prevent conflicts in case a thing is created, deleted and recreated the same day.

Links to Related Things
Generated sketches will now contain a link to the related thing.

Those are all of the recent changes. We hope you find improvements useful. They come from the excellent feedback we've received from our beta users like you. So, please keep the feedback coming. For now, thanks for being a beta user.

ballscrewbob

#1
Oct 16, 2018, 04:45 pm Last Edit: Oct 16, 2018, 04:46 pm by ballscrewbob
Awesome list of improvements.




Now to go on a killing spree (OK there are only two) so I can play with the new stuff.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

johnwargo

the method should actually be called `initPropertyValues` that's better English. both words (properties and values) don't need to be plural.

#3
Dec 06, 2018, 04:51 pm Last Edit: Dec 06, 2018, 04:52 pm by eclipse1985
Today, we're happy to release a new version of the backend powering Arduino IoT Cloud. Since our last e-mail there have been some changes and we wanted to inform you about them as you're enrolled into our beta program. We value feedback from customers like you and would love to hear your thoughts on our recent developments!

initProperties()  must now set thingId

The initProperties() method, in the cloudProperties.h file, MUST now call

Code: [Select]
ArduinoCloud.setThingId(THING_ID);

on top of other code lines.

The THING_ID can be found at the end of the URL in the comment at the top of your .ino file:

Code: [Select]
/*

 Sketch generated by the Arduino IoT Cloud Thing "thing2"

 https://create.arduino.cc/cloud/things/bad92d23-e9b2-40b8-8b1c-f624636e0414



*/


In this case the THING_ID is bad92d23-e9b2-40b8-8b1c-f624636e0414
In your .ino file we will automatically add something like:

Code: [Select]
#define THING_ID "bad92d23-e9b2-40b8-8b1c-f624636e0414"

But for your old sketches you have to do that manually so you can use THING_ID from now on in your .ino file.

For example, in cloudProperties.h:

Code: [Select]
void initProperties(){
 ArduinoCloud.setThingId(THING_ID);
 ArduinoCloud.addProperty(property1, READ, ON_CHANGE, NULL);
 ArduinoCloud.addProperty(property2, READWRITE, ON_CHANGE, onProperty2Change);
}


This change only applies to previously created sketches and doesn't impact the new ones.

initProperties() and initConnection() calls must be inverted

setup() method of your .ino file, must call initProperties() at first, then initConnection(). For example:

Code: [Select]

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 cloudProperties.h
 initProperties();
 // Defined in ArduinoCloudSettings.h
 initConnection();

 // set last network check to now, since it is connected
 lastNetworkCheck = millis();

}


These changes affect sketches created before December 6th, 2018. and don't impact new ones.

Check it out at https://create.arduino.cc/cloud

surfnm

Hi All,

Any plans to add the Arduino Yun Rev2 board to the IoT Cloud Beta?

albertian

#5
Feb 15, 2019, 03:15 pm Last Edit: Feb 20, 2019, 05:24 pm by endorama
There is still no ETA for Arduino Yun support. In the near future we are planning to support MKR GSM 1400, MKR Vidor 4000 and Arduino Uno WiFi.
https://www.arduino.cc/en/Create/FAQ

adriens

Hi,

I have a mkr1000 and I'm struggling with IOT connection, I'm stuck on ArduinoCloud.begin(ArduinoIoTPreferredConnection)


I see that the issue already has occurred to to other people (https://forum.arduino.cc/index.php?topic=410358.0)
MKR1000 stuck on "Connecting to mqtt broker..."

Arduino IoT seems to perfectly match my needs, the tutorial all seem straight forward but no way to get a connection.

For now it just says "Connecting to mqtt broker..."

Any help or detailed Wiki on making it run on the mkr1000 would be greatly appreciated.

Thank you in advance for any help you could bring me.

Kind Regards,
Adrien

Go Up