arduino-libraries / ArduinoIoTCloud

https://app.arduino.cc
Other
111 stars 78 forks source link

Example `utility/ArduinoIoTCloud_Travis_CI` has high frequency updates defined for LoRa. #496

Open zfields opened 3 months ago

zfields commented 3 months ago

The following Cloud variables, have a frequency that is too fast for LoRa:

  ArduinoCloud.addProperty(bool_property_1,  READWRITE, 1 * SECONDS);
...
  ArduinoCloud.addProperty(bool_property_2,  Permission::ReadWrite).publishEvery(1 * SECONDS);
...
  ArduinoCloud.addProperty(str_property_3, READWRITE, 1 * SECONDS, 0 /* onStringPropertyChange */, 0.0 /* 'minDelta' */, MOST_RECENT_WINS);
  ArduinoCloud.addProperty(str_property_4, READWRITE, 1 * SECONDS, 0 /* onStringPropertyChange */, 0.0 /* 'minDelta' */, CLOUD_WINS);
  ArduinoCloud.addProperty(str_property_5, READWRITE, 1 * SECONDS, 0 /* onStringPropertyChange */, 0.0 /* 'minDelta' */, DEVICE_WINS);

  ArduinoCloud.addProperty(str_property_6, Permission::ReadWrite).publishEvery(1 * SECONDS).onSync(MOST_RECENT_WINS);
  ArduinoCloud.addProperty(str_property_7, Permission::ReadWrite).publishEvery(1 * SECONDS).onSync(CLOUD_WINS);
  ArduinoCloud.addProperty(str_property_8, Permission::ReadWrite).publishEvery(1 * SECONDS).onSync(DEVICE_WINS);

These variables are already redeclared for LoRa, so perhaps a slower cadence - that is more compatible with LoRa - can be introduced.

pennam commented 3 months ago

This example is ment to be used only for github CI testing, probably would be a good idea to create a new folder extras/test/example and move it there

zfields commented 3 months ago

Is this a "compile only" test? As in it "passes" so long as it compiles to ensure the integrity of your API?

pennam commented 3 months ago

Yes it is "compile only", no runtime test. This is the workflow used https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/.github/workflows/compile-examples.yml