Since the last update version my time input not working correct. When i select the start time and click ok dont trigger the code on my sketch. Dont show nothing on serial.
I`m using Arduino uno with ESP8266
Code:
`
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266_Lib.h>
#include <Time.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = "xxxxxxxxx";
char ssid[] = "XXXXX";
char pass[] = "XXXXXXXXX";
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
void setup()
{
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
while (Blynk.connect() == false) {
// Wait until connected
}
}
BLYNK_WRITE(V4)
{
Serial.println("test");
}
void loop()
{
Blynk.run();
}
@brfull are you referring to the Timer widget or the ne TimeInput widget?
TimeInput widget is VERY different to the Timer widget and you don’t appear to have nearly enoughcode in your sketch for either widget. Have you looked at the Timer and TimeInput sample sketches?
@Dmitriy looks like the fix for Time Input has made things worse. Before the fix the widget worked, now pressing it, in advanced mode for me and basic mode for the OP, gives no response.
This is on Android with WeMos Mini. Removed RTC and TimeInput widgets, added them back, logged out and back in but still no response.
@Dmitriy before Timezone was changed to an enormous list of Strings we were using the timezone to trigger events at a specific time with TimeInput. So as the user changes their required trigger times with TimeInput we would check the the current time with timezone offset to see if the trigger time has passed or if it is in the future. When trigger time arrives some action is taken.
@Costas could you please post some code. Would it be better just to send startTime/endTime in local time? What about RTC is it fine that it comes in UTC?
What we need to know is where we obtain the time from now you have changed time to Strings like “Europe/Nicosia” plus 100 more like it. I can’t see how anyone can use the RTC now.
@Dmitriy to answer that I would need to know how / where you are doing the conversion from a place name String to a timezone offset in seconds (or hours)?
In fairness RTC is giving the correct time so we know what time it is now but the TImeInput triggers are set as UTC so we need to know what our offset is from UTC (which was previously available with time_input.getTZ). We can code around it quite easily by having our dropdown timezone offset menu but that defeats the object of having the widgets.
This is a sample of code that is now broken:
starthourwd = (t.hour() + (time_input.getTZ() / 3600)); // time zone adjustment
if(starthourwd > 23){
starthourwd = starthourwd - 24;
}
startsecondswd = (starthourwd * 3600) + (t.minute() * 60) + t.second();
nowseconds = (hour() * 3600) + (minute() * 60) + second();
if(nowseconds >= startsecondswd){
Serial.println("Weekdays Schedule Started");
terminal.println("Weekdays Schedule Started");
// do something
}
else{
Serial.println("Weekdays Schedule NOT Started");
terminal.println("Weekdays Schedule NOT Started");
// do something different
}