My issue is that in IoT Remote Cloudschedule time is not matching with what the Android app (V 1.1.3(83)) is sending to cloud. My timezone is Europe/Helsinki in the app. Board is Arduino Nano 33 IoT.
Here is log from Download historic data:
2022-12-17T10:40:13.35Z,{"frm": 1671318000, "to": 0, "len": 3600, "msk": 0}
From here I can see that log is showing times in UTC (2022-12-17T10:40). But the start time in log 1671318000=GMT : Saturday, 17th December 2022, 23.00 is not what it should be. I mean there is now "correct time", but wrong time zone.
See below snip how it looks in app.

Edit: So to be more precise: Set Job Starting at: is 23:00 Europe/Helsinki. But command log of what is sent to cloud is GMT 23:00!!!!
And what is really worst is that this time difference seems to be random. Mostly it is 2 hours, but then suddenly it changes to 1 hour and then another day back to 2 hours. So this is driving me crazy since the purpose of this is to start and stop house heating to get it done during low cost hours for electricity.
// Servo - Version: Latest
#include <Servo.h>
/*
Sketch generated by the Arduino IoT Cloud Thing "MLP"
https://create.arduino.cc/cloud/things/eea042b0-1aad-4253-8e68-ad9f475ceb86
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
int mLPmanualLevel;
CloudSchedule mLPcontrolTime;
bool mLPonOff;
bool mLPonTimer;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
int servoPin = 9;
int servoMin = 0;
int servoMax = 179;
int servoStatus = 0;
Servo MLPservo;
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);
MLPservo.attach(servoPin);
MLPservo.write(servoMin);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pinMode(LED_BUILTIN, OUTPUT);
mLPmanualLevel = 0;
mLPonOff = 0;
mLPonTimer = 0;
}
void loop() {
ArduinoCloud.update();
// Your code here
Serial.print(mLPonTimer);
Serial.print("----");
Serial.println(mLPcontrolTime.isActive());
delay(1000);
if (mLPonTimer) {
if (mLPcontrolTime.isActive()) {
// whenever the job is "active", turn on the LED and servo to max
digitalWrite(LED_BUILTIN, HIGH);
servoStatus = servoMax;
MLPservo.write(servoStatus);
mLPmanualLevel = servoMax;
} else {
// whenever the job is "not active", turn off the LED and servo to min
digitalWrite(LED_BUILTIN, LOW);
servoStatus=servoMin;
MLPservo.write(servoStatus);
mLPmanualLevel = servoMin;
}
}
}
/*
Since MLPcontrolManual is READ_WRITE variable, onMLPcontrolManualChange() is
executed every time a new value is received from IoT Cloud.
*/
void onMLPcontrolManualChange() {
// Add your code here to act upon MLPcontrolManual change
}
/*
Since LEDonoff is READ_WRITE variable, onLEDonoffChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLEDonoffChange() {
// Add your code here to act upon LEDonoff change
digitalWrite(LED_BUILTIN, HIGH);
delay(5000);
digitalWrite(LED_BUILTIN, LOW);
}
/*
Since MLPcontrolTime is READ_WRITE variable, onMLPcontrolTimeChange() is
executed every time a new value is received from IoT Cloud.
*/
void onMLPcontrolTimeChange() {
// Add your code here to act upon MLPcontrolTime change
mLPonTimer = 1;
digitalWrite(LED_BUILTIN, HIGH);
delay(5000);
digitalWrite(LED_BUILTIN, LOW);
Serial.print(mLPonTimer);
Serial.println("---onMLPcontrolTimeChange triggered");
}
/*
Since MLPonOfff is READ_WRITE variable, onMLPonOffChange() is
executed every time a new value is received from IoT Cloud.
*/
void onMLPonOffChange() {
// Add your code here to act upon MLPonOfff change
if (mLPonOff) {
MLPservo.write(mLPmanualLevel);
mLPonTimer = 0;
Serial.print(mLPonTimer);
Serial.println("---onMLPonOffChange triggered on");
} else {
mLPonTimer = 0;
MLPservo.write(servoMin);
mLPmanualLevel = 0;
Serial.print(mLPonTimer);
Serial.println("---onMLPonOffChange triggered off and servo to zero");
}
}
/*
Since MLPonTimer is READ_WRITE variable, onMLPonTimerChange() is
executed every time a new value is received from IoT Cloud.
*/
void onMLPonTimerChange() {
// Add your code here to act upon MLPonTimer change
if (mLPonTimer) {
MLPservo.write(servoMin);
mLPmanualLevel = servoMin;
mLPonOff = 0;
}
Serial.print(mLPonTimer);
Serial.println("---onMLPonTimerChange triggered");
}
/*
Since MLPmanualLevel is READ_WRITE variable, onMLPmanualLevelChange() is
executed every time a new value is received from IoT Cloud.
*/
void onMLPmanualLevelChange() {
// Add your code here to act upon MLPmanualLevel change
if (mLPonOff) {
MLPservo.write(mLPmanualLevel);
mLPonTimer = 0;
Serial.print("onMLPmanualLevelChange triggered to a value ");
Serial.println(mLPmanualLevel);
}
}