[SOLVED] Time Input not trigger

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();

}

App:
`

Hello. Try to remove and add widget again.

Thanks by feedback Dmitriy.

I already made this test and the problem persist. I created a local server and nothing happened too.

Is V4 is TimeInput pin? Could you please post time input settings?

@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?

Actually my V4 TimeInput pin has this config:

Sorry by flood, i’m new user. I can only send 1 pic by answer.

Have you expanded your sketch now to include everything needed for TimeInput as your OP appears well short?

Due the problem i removed the all code and left only the input time test (V4 pin).

I made some little changes in my code. I added an button(V1) to do the same test. The button works like a charm but the input time nothing.

Follow the app print:

@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.

Oops… We just updated app build in google play with fix. Sorry for inconveniences.

Thanks in advance. I will test again today.

@Dmitriy Time Input is now working again but unusable without a fix for the RTC.

@Costas could you please tell us how do you use timezone (want to use)?

@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.

1 Like

@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?

@Dmitriy I don’t think code will help.

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.

I understand this. So I ask your advice in order to understand what would be the best way to fix this.

@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
}