Compare commits
3 Commits
3add72c116
...
6963ea78df
Author | SHA1 | Date |
---|---|---|
Siwat Sirichai | 6963ea78df | |
Siwat Sirichai | 2079c77a7a | |
Siwat Sirichai | 2a51b51e35 |
|
@ -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()
|
||||||
|
|
|
@ -296,4 +296,8 @@ void pwm_update_lcd() {
|
||||||
void mqtt_connected_user_callback() {
|
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();
|
||||||
}
|
}
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue