Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug in HomeKit library was not not setting the characteristic #204

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html

[env]
upload_speed = 921600
; upload_speed = 921600
monitor_speed = 115200 ; must remain at 115200 for improv
;monitor_speed = 74880 ; hardware default
board_build.filesystem = littlefs
Expand All @@ -35,7 +35,7 @@ build_flags =
; -D DEBUG_UPDATER=Serial
monitor_filters = esp8266_exception_decoder
lib_deps =
https://github.com/dkerr64/Arduino-HomeKit-ESP8266.git#8aa1307481d0b69f50b1709130e33620bbe85d9a
https://github.com/dkerr64/Arduino-HomeKit-ESP8266.git#2e49ed2dcec521d2b6f9969974abbaa0bdd42e58
https://github.com/jgstroud/EspSaveCrash.git#cf2803abfa51a83c93548f2591d4564a47845a72
esphome/Improv@^1.2.3
https://github.com/ratgdo/espsoftwareserial.git#autobaud
Expand Down
18 changes: 8 additions & 10 deletions src/comms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,14 @@ void comms_loop() {

RINFO("tgt %d curr %d", target_state, current_state);

//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 ((target_state != garage_door.target_state) ||
(current_state != garage_door.current_state)) {
garage_door.target_state = target_state;
garage_door.current_state = current_state;

notify_homekit_current_door_state_change();
notify_homekit_target_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