In New Blynk 2.0, the timer widget has been replaced by automations. However, these automations cannot be changed in the same interface as the widgets are in. Looking up for the right automation and changing the times takes great effort when you have many. Using a time input widget instead is possible, but requires a massive need of programming.
Wouldn’t it be an idea to make it possible that the automation can be controlled by the virtual pin output of the time input widget?
That could be done by making it possible to choose a boolean or integer type instead of the string for the virtual pin, which then should be high when the timer is active and low when it is inactive.
In this way times can easily be changed in the basic IOT interface whereas the automations can be used to define the actions that should be taken on these specific times.
I set up a time input with a string datastream (as integer and double datastreams are not suitable for time input, as I understood), and created with this a device state automation where two integer datastreams which are related to a switch widget and a led widget should be activated when the time input equals 1. However, this does not function, Nothing happens with the switch nor the led.
Should I choose another number than 1 in the expression “when time-input datastream is equal to 1” or is there something else I am doing wrong?
The problem is that the Time Input widget outputs an array of values including on time, off time (both in seconds since midnight), active on days of the week, sunrise/sunset active and timezone.
The MCU has to take this data and make some sense of it - working-out the current time and comparing it to the on/off time and checking if the device should use or ignore these values on the current day of the week - making timezone corrections as needed. If sunrise/sunset is chosen then these times have to be looked-up for the appropriate latitude and longitude and actioned as appropriate.
What you’re asking for is for the old Timer widget to be resurrected. This widget outputted one value at the On time and another at the Off time.
I do agree that Automations aren’t as useful for timed events as having a widget in the appropriate part of the mobile/web dashboard, in the same way as being forced to use the device tile approach as opposed to the project approach where widgets linked multiple devices could be added alongside each other.
But, that’s the current state of Blynk IoT and I guess we just have to live with it.
Yep, my fault, I’ve thought you already have some logic relying on time input start/stop that changes some int/double datastream.
We would not make automation controlled by time input for the simple reasons as we already have time-based triggers for automation. But we had in plan some automation improvements/section for device settings, maybe it will cover your problem
@FabrizioGiliberto if you have further questions about the time input widget versus automations in Blynk IoT then I’d suggest you start a new topic and provide as much detail about what it is that you are trying to achieve, and attempt to articulate your questions in a way that is easily understandable.
Thanks
I wanted to update you that today sonk managed to use the time Input widget on esp32.Using the appropriate code I was able to get the time and date through the blynk server, subsequently inserted in the time inpunt widget as a string value via a pin. Inside the code I have set an output pin to manage a load. by selecting the time and day, when the hour is clicked set the pin goes up, when the selected stop timer exceeds the set value the pin out goes down. then you can use the timer input to manage projects by selecting the time and dates from your blynk app
Just picking up on this thread as I have started transferring my legacy Blynk app to the new platform. It seems I should be able to use the Time Input widgets as I already do on Blynk legacy, but it is not clear to me how I specify a datastream for that virtual pin. My code retrieves params 0, 1 and 3, but the new Blynk only allows me to set the datastream type to a single Integer, double or String.