Hi
I have a situation where I need to start/stop pumps based on calendars with varying start/stop and cool down periods depending on the day of the week, and (public holidays).
The Time Range node is great at first glance, but is limited to timerange for set days. In addition to I would need many to deal with different timeranges for different days.
I have addressed this with a Data Table that has Day of Week, start, stop, cool down times for each,plus specific calendar days with the same info. I am not lucky , this first project is in NSW so do have to deal with DST.
This makes it easy for mere mortals to see and manage the calendar. The Time Range widget isn;t a date management tool, and would need investigation of many nodes and versioning/pushing new agent workflow.
First thing I noticed is Edgeworkflow is returning everything in UTC.
But the Data Tables are in Local time (meaningful for the end user).
There is no out of the box functionality for Localtime in a workflow. (Easy to fix but messy) without being able to call other workflows means no DRY.
Second the Data Tables are not local, so I need to store them as a JSON object somewhere (workflow storage) locally. Then if they don’t exist perform a HTTP get on a WebHook to retrieve and store.
I can trigger the edge workflow to update the tables based on a command.
But on startup I need to check for existence and fetch. Which is all do-able.
But a few things this highlights.
Complex edge workflows at the moment require a lot of moving parts, so it’s difficult to encapsulate functionality due to missing ability to call workflows and create functions in workflows.
Edge workflows make sense understanding local time (ie where they are, not where the device is viewed from). Day light savings need to be dealt with too.
I will finish on, Edge workflows are great Saves my writing lots of new python agents, that other staff don’t understand (not programmers) and they can publish to the device, without giving people openvpn access. A big win.
Cheers and thanks for the great work.