Skip to content

Commit

Permalink
Homekit was frequently missing the door closed update notification so
Browse files Browse the repository at this point in the history
update on all status messages
  • Loading branch information
jgstroud committed May 24, 2024
1 parent 3db3372 commit af8bd77
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,14 +563,17 @@ void comms_loop() {
}

RINFO("tgt %d curr %d", target_state, current_state);
if (target_state != garage_door.target_state) {
garage_door.target_state = target_state;
notify_homekit_target_door_state_change();
}
if (current_state != garage_door.current_state) {
garage_door.current_state = current_state;
notify_homekit_current_door_state_change();
}

//Homekit seems to miss the closed state change so revert this check for now
//if (target_state != garage_door.target_state) {
garage_door.target_state = target_state;
notify_homekit_target_door_state_change();
//}

//if (current_state != garage_door.current_state) {
garage_door.current_state = current_state;
notify_homekit_current_door_state_change();
//}

if (pkt.m_data.value.status.light != garage_door.light) {
RINFO("Light Status %s", pkt.m_data.value.status.light ? "On" : "Off");
Expand Down

0 comments on commit af8bd77

Please sign in to comment.