diff --git a/components/esp-homekit b/components/esp-homekit index b869862..4ec49ad 160000 --- a/components/esp-homekit +++ b/components/esp-homekit @@ -1 +1 @@ -Subproject commit b869862d2c89ff84fb46c641c8afd83cabb12f48 +Subproject commit 4ec49adf3d0a44e6c01105144790973ff30a9420 diff --git a/components/esp-homekit-common-functions b/components/esp-homekit-common-functions index be6dac2..69705bd 160000 --- a/components/esp-homekit-common-functions +++ b/components/esp-homekit-common-functions @@ -1 +1 @@ -Subproject commit be6dac2115eae8c69d3e407e00027788bae179ae +Subproject commit 69705bdc07007bb3467ac0d1c4667f5b66bafc2d diff --git a/src/Makefile b/src/Makefile index 9381384..e5f2b93 100644 --- a/src/Makefile +++ b/src/Makefile @@ -35,8 +35,8 @@ EXTRA_CFLAGS += -DHOMEKIT_OVERCLOCK_PAIR_VERIFY EXTRA_CFLAGS += -DHOMEKIT_OVERCLOCK_PAIR_SETUP EXTRA_CFLAGS += -DUDPLOG_PRINTF_TO_UDP EXTRA_CFLAGS += -DUDPLOG_PRINTF_ALSO_SERIAL -EXTRA_CFLAGS += -DconfigUSE_TRACE_FACILITY -EXTRA_CFLAGS += -DqDebugLog +#EXTRA_CFLAGS += -DconfigUSE_TRACE_FACILITY +#EXTRA_CFLAGS += -DqDebugLog LIBS ?= m diff --git a/src/main.c b/src/main.c index 2818538..f0e2c91 100644 --- a/src/main.c +++ b/src/main.c @@ -85,7 +85,7 @@ rgb_color_t current_color = { { 0, 0, 0, 0 } }; rgb_color_t target_color = { { 0, 0, 0, 0 } }; homekit_characteristic_t wifi_reset = HOMEKIT_CHARACTERISTIC_(CUSTOM_WIFI_RESET, false, .setter=wifi_reset_set); -homekit_characteristic_t wifi_check_interval = HOMEKIT_CHARACTERISTIC_(CUSTOM_WIFI_CHECK_INTERVAL, 10, .setter=wifi_check_interval_set); +homekit_characteristic_t wifi_check_interval = HOMEKIT_CHARACTERISTIC_(CUSTOM_WIFI_CHECK_INTERVAL, 200, .setter=wifi_check_interval_set); /* checks the wifi is connected and flashes status led to indicated connected */ homekit_characteristic_t task_stats = HOMEKIT_CHARACTERISTIC_(CUSTOM_TASK_STATS, false , .setter=task_stats_set); @@ -151,7 +151,9 @@ void ir_dump_task(void *arg) { } printf("\n"); + /* printf ("\n%s: buffer[2]=%d, mh_on[2]=%d, mh_off[2]=%d, buffer[3]=%d, mh_on[3]=%d, mh_off[3]=%d\n", __func__, buffer[2], mh_on[2], mh_off[2], buffer[3], mh_on[3], mh_off[3]); + */ int cmd = buffer[2]; int effect = off_effect; @@ -323,7 +325,7 @@ homekit_accessory_t *accessories[] = { homekit_server_config_t config = { .accessories = accessories, .password = "111-11-111" , - .setupId = "1234", + .setupId = "1342", .on_event = on_homekit_event }; @@ -341,7 +343,8 @@ void accessory_init (void ){ /* initalise anything you don't want started until wifi and pairing is confirmed */ get_sysparam_info(); printf ("%s: GPIOS are set as follows : W=%d, R=%d, G=%d, B=%d\n",__func__, white_gpio.value.int_value,red_gpio.value.int_value, green_gpio.value.int_value, blue_gpio.value.int_value ); - + led_strip_init (); + /* sent out values loded from flash, if nothing was loaded from flash then this will be default values */ homekit_characteristic_notify(&hue,hue.value); homekit_characteristic_notify(&saturation,saturation.value ); @@ -352,7 +355,6 @@ void user_init(void) { standard_init (&name, &manufacturer, &model, &serial, &revision); - led_strip_init (); wifi_config_init(DEVICE_NAME, NULL, on_wifi_ready); diff --git a/src/main.h b/src/main.h index bc47b20..a740e57 100644 --- a/src/main.h +++ b/src/main.h @@ -29,7 +29,7 @@ static ir_generic_config_t nec_protocol_config = { enum {strobe_button=0, aubergene_button=4, up_button=9, cream_button=10,smooth_button=12, on_button=13, purple_button=14, pink_button=15, blue_button=17, light_green_button=18,green5_button=20, white_button=21, light_blue_button=22, dark_orange_button=23, red_button=25, fade_button=26, green_button=27, yellow_button=28, down_button=29, green4_button=30, off_button=31, orange_button=64, sky_blue_button=76, flash_buton=77} rest_buttons; -int8_t mh_strobe[]={0 , -1, 0, -1 }; +/*int8_t mh_strobe[]={0 , -1, 0, -1 }; int8_t mh_aubergene[]={0 , -1, 4, -5 }; int8_t mh_up[]={0 , -1, 9, -10}; int8_t mh_cream[]={0 , -1, 10, -11}; @@ -53,5 +53,5 @@ int8_t mh_off[]={0 , -1, 31, -32}; int8_t mh_orange[]={0, -1, 64, -65}; int8_t mh_sky_blue[]={0 , -1, 76, -77 }; int8_t mh_flash[]={0 , -1, 77, -78 }; - +*/ #endif /* main_h */