@@ -65,14 +65,14 @@ namespace ratgdo {
65
65
void Secplus1::wall_panel_emulation (size_t index)
66
66
{
67
67
if (this ->wall_panel_emulation_state_ == WallPanelEmulationState::WAITING) {
68
- ESP_LOG1 (TAG, " Looking for security+ 1.0 wall panel..." );
68
+ ESP_LOGD (TAG, " Looking for security+ 1.0 wall panel..." );
69
69
70
70
if (this ->door_state != DoorState::UNKNOWN || this ->light_state != LightState::UNKNOWN) {
71
71
ESP_LOG1 (TAG, " Wall panel detected" );
72
72
return ;
73
73
}
74
74
if (millis () - this ->wall_panel_emulation_start_ > 35000 && !this ->wall_panel_starting_ ) {
75
- ESP_LOG1 (TAG, " No wall panel detected. Switching to emulation mode." );
75
+ ESP_LOGD (TAG, " No wall panel detected. Switching to emulation mode." );
76
76
this ->wall_panel_emulation_state_ = WallPanelEmulationState::RUNNING;
77
77
}
78
78
this ->scheduler_ ->set_timeout (this ->ratgdo_ , " wall_panel_emulation" , 2000 , [=] {
@@ -293,7 +293,10 @@ namespace ratgdo {
293
293
294
294
void Secplus1::handle_command (const RxCommand& cmd)
295
295
{
296
- if (cmd.req == CommandType::QUERY_DOOR_STATUS) {
296
+ if (cmd.req == CommandType::TOGGLE_DOOR_RELEASE || cmd.resp == 0x31 ) {
297
+ ESP_LOGD (TAG, " wall panel is starting" );
298
+ this ->wall_panel_starting_ = true ;
299
+ } else if (cmd.req == CommandType::QUERY_DOOR_STATUS) {
297
300
298
301
DoorState door_state;
299
302
auto val = cmd.resp & 0x7 ;
@@ -365,10 +368,6 @@ namespace ratgdo {
365
368
} else if (cmd.req == CommandType::OBSTRUCTION) {
366
369
ObstructionState obstruction_state = cmd.resp == 0 ? ObstructionState::CLEAR : ObstructionState::OBSTRUCTED;
367
370
this ->ratgdo_ ->received (obstruction_state);
368
- } else if (cmd.req == CommandType::TOGGLE_DOOR_RELEASE) {
369
- if (cmd.resp == 0x31 ) {
370
- this ->wall_panel_starting_ = true ;
371
- }
372
371
} else if (cmd.req == CommandType::TOGGLE_LIGHT_PRESS) {
373
372
// motion was detected, or the light toggle button was pressed
374
373
// either way it's ok to trigger motion detection
0 commit comments