Just after some advice as am totally stuck. Am wanting to implement a user input that sets a time window (like in the time input widget), that will then simply check to see if it’s within that window and write to a variable (on/off). This allows something to run during that time.
Have taken a look at the time input widget but am completely stuck as can only find old examples and nothing I try works. Have looked into automations but is also confusing me as I’ve no idea how I’d do the user input side.
Ideally I’d love an example of any type of code that uses the new Blynk IOT app and achieves a similar thing. Or even someone’s working code using the time input widget and new app.
This thread looked promising but uses RTC widget instead
If you’re using the Time Inputbwidget then you need the RTC widget too.
Time input tells you the start and stop time in elapsed seconds since midnight.
The RTC widget will give you the time, so you know the elapsed seconds since midnight and can do the comparison.
RTC works slightly differently in Blynk IoT, but it’s explained in the documentation.
Automations are inputted in the app, but you need to have datastreams configured as being available to automations, and additional ones as being available for actions, before the options appear in the app (at the bottom of the screen).
Thanks Pete. This does clear things up a little as all examples used RTC widget but I cannot find it anywhere. I can get the time from the server using Blynk.sendInternal("utc", "iso");
I assume this is no longer required? #include <WidgetRTC.h>
I then take the sting I can get from the server and compare it to the time input widget?
As for Automations, I’m lost as to how you’d get a user input and write to a variable based on their input. Could you give a brief overview of steps one would generally use for such a thing?
[EDIT] Re-reading the Automations docs I see it is for end users. Perhaps I’m thinking of this the wrong way and should instead be thinking about exposing the right info to the end user so they can achieve such a task? This would mean making datastreams available with clear descritions of what they are/do. Then an Automation could be created. Am I barking up the right tree?
Yeah, probably lost myself too . I’m approaching it in an over complicated way. Checked out Automations again and I see it seems very simple to achieve what I want. One question however. What happens with loss of connection to the internet?