How do I trigger Time Input widget on Raspberry (Linux)?

Hi!

I think there might be a bug in the time input settings, it is not triggering on my Raspberry Pi

Kind Regards.

How are you using Time Input with Linux?
Paste your sample sketch / script.

Nothing fancy:

BLYNK_WRITE(V0){
    printf("here");
}

In the Android App i set the time and wait it to pass, nothing happens.

Regards

@Cejfi you require more than 1 line of code to use the Time Input widget.

Study the sketch that goes with the widget and then add more code.

Examples exist on this site for the full code you require.

Moving thread to appropriate category.

Did you try to do it your self (on linux/raspberry using wiringPi)?

Regards

@Cejfi no but I have used it extensively with “Arduino” C++ and I know the widget requires Blynkers to code up the events i.e. with clock settings check if trigger time (start / stop) has just occurred.

It was created, in part, as a true scheduling widget but you need to check the schedule at intervals.

The code I published on this site basically checked every 30s if clock time was say + / - 15s of the trigger variables obtained from the widget.

How did I miss that part, in the examples its not so very complicated as you describe it.

https://examples.blynk.cc/?board=Raspberry%20Pi&shield=System%20default&example=Widgets%2FTimeInput%2FSimpleTimeInput

Regards

@Cejfi it’s clearer from the Advanced Time Input sketch at https://github.com/blynkkk/blynk-library/blob/master/examples/Widgets/TimeInput/AdvancedTimeInput/AdvancedTimeInput.ino

I have never used the basic example, will test and advise further.

If I am right and if this is a bug, even if you use the advanced time input sketch example, it will fail as BLYNK_WRITE(V1) {...} never gets triggered.

From AdvancedTimeInput.ino example:

*************************************************************
  App project setup:
    Time Input widget on V1.
 *************************************************************/

It should trigger when you set the start, and only start, time from the widget in project play / run mode.

I tried both options, but maybe I missed something…i’ll try again and report back.

Regards

@Cejfi I added the basic example to one of my ESP’s and when you use the widget in play / run mode by setting a start time of 23:00 it prints 82800 immediately to Serial Monitor.

This is the seconds since midnight which you are then expected to code up in your sketch as a “scheduler”.

Let us know if this doesn’t work for Linux and details of your tests.

Yep it works. Seems its not a bug but rather the way it works. Didn’t think it just triggers when you set the time, but this is even better for me. Sorry for the inconvenience, and thanks for trying it out.

Kind Regards

You got it now :+1:

I will post this here as well for you and others… just part of a larger Timer Input discussion.

1 Like

Thanks!

This is off-topic but I don’t feel like opening a new topic for this. It would be nice, if we could center text in the time input field :joy:

Regards

center text?

You are referring to this? I seem to recall that it was centered at one time… @Dmitriy? this is a deal breaker… please fix it or I might have to go on strike… :stuck_out_tongue_winking_eye:

It hurts my eyes :smiley:

:joy: @Pavel FYI

Also the Menu Settings widget :joy: