17 unsigned char run_command;
24 dt = gmtime(&unix_time);
29 if (dt->tm_mon < 2 || dt->tm_mon > 9) {
32 else if (dt->tm_mon > 2 && dt->tm_mon < 9) {
39 previous_sunday = dt->tm_mday - dt->tm_wday;
40 if (dt->tm_mon == 2) {
42 if (previous_sunday >= 25) {
44 if (dt->tm_wday == 0) {
46 s = (dt->tm_hour * 3600) + (dt->tm_min * 60) + dt->tm_sec;
55 else if (dt->tm_mon == 9) {
57 if (previous_sunday >= 25) {
59 if (dt->tm_wday == 0) {
61 s = (dt->tm_hour * 3600) + (dt->tm_min * 60) + dt->tm_sec;
76 unix_time += (1 * 60 * 60);
78 dt = gmtime(&unix_time);
92 os_printf(
"%02d:%02d:%02d %d.%d.%d\r\n", dt->tm_hour, dt->tm_min, dt->tm_sec, dt->tm_mday, dt->tm_mon + 1, dt->tm_year + 1900);
96 if (dt->tm_sec == 0) {
189 if (run_command == 5) {
230 char *context_query_string, *context_key_value;
235 str = strtok_r(query,
"&", &context_query_string);
236 while (str !=
NULL) {
238 key = strtok_r(key_value,
"=", &context_key_value);
239 value = strtok_r(
NULL,
"=", &context_key_value);
263 str = strtok_r(
NULL,
"&", &context_query_string);
ICACHE_FLASH_ATTR void ac_thermo_close()
ICACHE_FLASH_ATTR uint32_t get_unix_time(void)
ICACHE_FLASH_ATTR static void minute_timer_func(void *arg)
ICACHE_FLASH_ATTR void clear_cron_jobs()
ICACHE_FLASH_ATTR unsigned int add_cron_job_from_query(char *query)
#define ICACHE_FLASH_ATTR
ICACHE_FLASH_ATTR void ac_thermo_open()
ICACHE_FLASH_ATTR void ac_off()
void ICACHE_FLASH_ATTR cfg_save_defered()
cron_job_list_t cron_job_list
#define os_timer_arm(a, b, c)
ICACHE_FLASH_ATTR void cron_init()
static os_timer_t minute_timer
ICACHE_FLASH_ATTR void ac_test()