You need to create 2 automations, one, let’s say starts at 11:00 and sends 1, another starts at 12:00 and sends 0. So it would correspond to the timer widget setup with start/end times.
You don’t need the time management code on the device in case. If I understood you correctly.
Thanks, however I want to read the start/stop time to do a bunch of things in my software that can’t be managed just on the phone. I want to convert my project ( Time Scheduler and Power Energy Monitor) to 2.0 but this looks like it will not be possible
There is no link to be able to a virtual pin and I don’t want notifications. The setup does not look like your application notes
Not all of them. Some examples, like bridge, email, notify, Twitter, eventor, GPS stream, and timer, don’t work with the new Blynk.
Bridge and timer widgets have been replaced with automation. Blynk.email and Blynk.notify have been replaced with Blynk.logEvent, etc.
@PeteKnight .I’m gonna explain. My connection is working, because I’m using the Arduino example (Blynk example inside the Arduino).
In this way my doubt would be with other information.
See if you can help me.
I’m using Time Input Settings, to send data like (day of the week) + (seconds ON) + (seconds OFF), through the Datastream (V2). OK
My ESP32 board receives the data, to read the time.
I read seconds ON (long startTimeInSecs = param[0].asLong(); )
I read seconds OFF (long endTimeInSecs = param[1].asLong(); )
// Process weekdays (1. Mon, 2. Tue, 3. Wed, ...)
for (int i = 1; i <= 7; i++) {
if (t.isWeekdaySelected(i)) {
Serial.println(String("Day ") + i + " is selected");
}
BLYNK_WRITE(V2){
long startTimeInSecs = param[0].asLong(); // dados da hora inicio
Serial.println(startTimeInSecs);
long endTimeInSecs = param[1].asLong(); // dadod hora fim
Serial.println(endTimeInSecs);
for (int i = 1; i <= 7; i++) {
if (t.isWeekdaySelected(i)) {
Serial.println(String("Day ") + i + " is selected");
}
}
sorry @pete
I am seeing yes, I am analyzing the example but I am having difficulties in understanding
BLYNK_WRITE(V1) {
TimeInputParam t(param);
// Process start time
if (t.hasStartTime())
{
Serial.println(String("Start: ") +
t.getStartHour() + ":" +
t.getStartMinute() + ":" +
t.getStartSecond());
}
else if (t.isStartSunrise())
{
Serial.println("Start at sunrise");
}
else if (t.isStartSunset())
{
Serial.println("Start at sunset");
}
else
{
// Do nothing
}
// Process stop time
if (t.hasStopTime())
{
Serial.println(String("Stop: ") +
t.getStopHour() + ":" +
t.getStopMinute() + ":" +
t.getStopSecond());
}
else if (t.isStopSunrise())
{
Serial.println("Stop at sunrise");
}
else if (t.isStopSunset())
{
Serial.println("Stop at sunset");
}
else
{
// Do nothing: no stop time was set
}
// Process timezone
// Timezone is already added to start/stop time
Serial.println(String("Time zone: ") + t.getTZ());
// Get timezone offset (in seconds)
Serial.println(String("Time zone offset: ") + t.getTZ_Offset());
// Process weekdays (1. Mon, 2. Tue, 3. Wed, ...)
for (int i = 1; i <= 7; i++) {
if (t.isWeekdaySelected(i)) {
Serial.println(String("Day ") + i + " is selected");
}
}
Serial.println();
}
´´´