Hello
I have a central heating system witch the controller send the user info (switch on /off set times etc.) over http. I can read this and interrater it using a c++ program but:
Is there a way to set the scheduler from the c++?
Is there a way to read the scheduler using the c++?
Please can anyone help with programmatically controlling the scheduler?
IanR
Hi, @IanR.
What do you want to achieve? According to documentationScheduler.IsScheduling(“15 19 * * 1-7”) will check if this very moment is 19:15 of any day of week.
Hello @Bounz.
I am trying to communicate with a central heating system it has its own web interface but I can use HG to communicate, in the same way as you communicate with a widget using http (eg like an arduino).
But I need to Read, Modify and Set the scheduler from this (from the c# program), so I can set, adjust and view the central heating times both on the contrail unit and on the schedule page. My understanding of “Scheduler.IsScheduling(“15 19 * * 1-7”)” may not be correct but,
I don’t believe it sets the time in the schedule so it would not be visible on the schedule page.
As did not think it set the time to schedule (on the schedule page) if the power was lost eg pc off then the schedule would be as well as it would be a dynamic variable.
so I am looking for some code to:
add the schedule item,
activate the schedule item,
de-activate the schedule item
update/modify the schedule item.
Well, it seems that there is no API for that
You can create scheduler item, but there is no way to bind modules to it.
The best you can do is to create scheduler item by hand, assign modules to it and script and then dynamically change its cron expression using SetSchedule() method (docs).
It will look like this
Thank you for the help.
I have changed my code to match yours but I still don’t get the bar in the events display after the program has run. But like you It dose change the events Edit as you display. May be it is an error in HG.
IanR
Hello
Tried updating to latest version v1.3stable.5 (on pi) but the same happens after programmatically changing the schedule times the schedule will not display as a bar.
IanR
Hello
I see there is a .get() in the helper (docs)
Could this be used to get the current corn job values out of a current scheduler.
eg
Variable = Scheduler.WithName(“scheduleItemName”).Get();
Any help would be appreciated as I am not understanding the docs well. without examples.
Thank you
IanR
Hello @roberto1979
I spoke too soon.
1)The output seams to be a JSON file is this correct?
2) I am having problems opening it, how do you open it I am trying to get the name and Corn info out.
I can display it in a browser ok but not in code.
Thank you
IanR