Compare commits

..

3 Commits

Author SHA1 Message Date
Siwat Sirichai 6963ea78df update state callback 2023-10-03 02:34:40 +07:00
Siwat Sirichai 2079c77a7a Merge branch 'main' into cud 2023-10-03 02:24:56 +07:00
Siwat Sirichai 2a51b51e35 add user state request callback 2023-10-03 02:24:30 +07:00
3 changed files with 6 additions and 0 deletions

View File

@ -600,6 +600,7 @@ void state_request_callback(String topic, String message)
publish_input_states(); publish_input_states();
publish_pwm_states(); publish_pwm_states();
publish_ac_state(); publish_ac_state();
user_state_request_callback();
} }
void ir_loop() void ir_loop()

View File

@ -297,3 +297,7 @@ void mqtt_connected_user_callback() {
mqtt.subscribe(AC_LOCK_TOPIC, ac_lock_callback); mqtt.subscribe(AC_LOCK_TOPIC, ac_lock_callback);
ac_lock_report(); ac_lock_report();
} }
void user_state_request_callback() {
ac_lock_report();
}

View File

@ -72,6 +72,7 @@ void ac_update_lcd();
void pwm_update_lcd(); void pwm_update_lcd();
void mqtt_connected_user_callback(); void mqtt_connected_user_callback();
void ac_lock_report(); void ac_lock_report();
void user_state_request_callback();
// ESPMega IoT Core Build-in Functions // ESPMega IoT Core Build-in Functions
extern void pwm_set_state(int id, int state); extern void pwm_set_state(int id, int state);