Closed hitenlulla closed 2 years ago
Did you ever find a solution? I think I have the same problem when calling homekit_storage_reset();
22:02:57.009 -> --------------- CUT HERE FOR EXCEPTION DECODER --------------- 22:02:57.009 -> 22:02:57.009 -> Exception (9): 22:02:57.009 -> epc1=0x4000425c epc2=0x00000000 epc3=0x00000000 excvaddr=0x3ffe9c9b depc=0x00000000 22:02:57.009 -> 22:02:57.009 -> >>>stack>>>
Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address PC: 0x4000425c EXCVADDR: 0x3ffe9c9b
Decoding stack results 0x40205fc1: homekit_storage_set_magic at C:\Users\user\Documents\Arduino\libraries\Arduino-HomeKit-ESP8266\src\storage.c line 105 0x40206022: homekit_storage_init at C:\Users\user\Documents\Arduino\libraries\Arduino-HomeKit-ESP8266\src\storage.c line 124 0x4020603c: homekit_storage_init at C:\Users\user\Documents\Arduino\libraries\Arduino-HomeKit-ESP8266\src\storage.c line 126 0x40227ae3: homekit_server_init(homekit_server_config_t*) at C:\Users\user\Documents\Arduino\libraries\Arduino-HomeKit-ESP8266\src\arduino_homekit_server.cpp line 3304 0x4023693c: snprintf at /workdir/repo/newlib/newlib/libc/stdio/snprintf.c line 90
@boboxx yes I did, the issue was how I was configuring the library. I can share my code if you want for reference. Just drop your mail ID. I'll send you the .ino file
@boboxx yes I did, the issue was how I was configuring the library. I can share my code if you want for reference. Just drop your mail ID. I'll send you the .ino file
Can u share the file please? thanks u so much. Djtekken2005@gmail.com
Hello, I'm trying to make a Television Remote using this library. I managed to create a toggle button to turn on and turn off the TV. But I want to use the remote accessory (You can find it in control center) to use the arrow keys and media buttons. I figured that I need to enable REMOTE_KEY characteristic in TELEVISION service. But doing that resets the ESP. Following is the code and Serial log.
TV.ino file `
include
include
include
define LOG_D(fmt, ...) printf_P(PSTR(fmt "\n") , ##__VA_ARGS__);
void setup() { Serial.begin(115200); WiFi.begin("SSID","PASS"); homekit_storage_reset(); // to remove the previous HomeKit pairing storage when you first run this new HomeKit example my_homekit_setup(); }
void loop() { my_homekit_loop(); }
// access your HomeKit characteristics defined in my_accessory.c extern "C" homekit_server_config_t config; extern "C" homekit_characteristic_t cha_active; extern "C" homekit_characteristic_t cha_remote_key;
void cha_remote_key_setter(const homekit_value_t value) { Serial.println("Remote Key"); Serial.println(value.float_value); }
void cha_active_setter(const homekit_value_t value) { Serial.println("Active"); Serial.println(value.bool_value); }
void my_homekit_setup() { cha_remote_key.setter = cha_remote_key_setter; cha_active.setter = cha_active_setter; arduino_homekit_setup(&config); }
void my_homekit_loop() { arduino_homekit_loop(); } `
my_accesory.c file: `
include <homekit/homekit.h>
include <homekit/characteristics.h>
void my_accessory_identify(homekit_value_t _value) { printf("accessory identify\n"); }
homekit_characteristic_t cha_active = HOMEKITCHARACTERISTIC(ACTIVE, 0); homekit_characteristic_t cha_active_identifier = HOMEKITCHARACTERISTIC(ACTIVE_IDENTIFIER, ""); homekit_characteristic_t cha_name = HOMEKITCHARACTERISTIC(NAME, "ESP_TV"); homekit_characteristic_t cha_sleep_discovery_mode = HOMEKITCHARACTERISTIC(SLEEP_DISCOVERY_MODE, 1); homekit_characteristic_t cha_remote_key = HOMEKITCHARACTERISTIC(REMOTE_KEY, 1);
homekit_accessory_t accessories[] = { HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_television, .services=(homekit_service_t[]) { HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t[]) { HOMEKIT_CHARACTERISTIC(NAME, "TV"), HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Arduino HomeKit"), HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "0123456"), HOMEKIT_CHARACTERISTIC(MODEL, "ESP8266/ESP32"), HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "1.0"), HOMEKIT_CHARACTERISTIC(IDENTIFY, my_accessory_identify), NULL }), HOMEKIT_SERVICE(TELEVISION, .primary=true, .characteristics=(homekit_characteristic_t[]){ &cha_active, &cha_active_identifier,
&cha_name, &cha_sleep_discovery_mode, &cha_remote_key, NULL }), NULL }), NULL };
homekit_server_config_t config = { .accessories = accessories, .password = "111-11-111" }; `
Serial Monitor Debug: `
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (28): epc1=0x40217475 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont sp: 3ffffca0 end: 3fffffc0 offset: 0190 3ffffe30: 3fff1241 00000001 3fff1bc4 4021746d
3ffffe40: 3fff1285 00000001 00000001 00000000
3ffffe50: 3ffe9307 3ffe860c 3fff1bc4 3ffe8604
3ffffe60: 3fff0c44 00000000 3fff1bc4 3ffe8604
3ffffe70: 3fff0c44 3ffe8634 3fff1bc4 3ffe8604
3ffffe80: 3fff0c44 3ffe8634 3fff1bc4 40219b3b
3ffffe90: 3ffe85e8 3ffe8910 3ffffef0 00000049
3ffffea0: 3fff1e54 00000020 3fff1e54 00010000
3ffffeb0: 3fff1e8a 3fff1044 3fff0c44 4021b441
3ffffec0: 3fff1e64 00000037 3fff107c 40204c04
3ffffed0: 3fff1e54 3ffef6a8 00000000 00000000
3ffffee0: 00000000 00000000 00000000 00000000
3ffffef0: 3fff1e8b 00000001 00000001 3fff1e87
3fffff00: 3fff1e54 00000030 00000000 3fff1e76
3fffff10: 00000000 3ffef700 3fff2138 3fff0c54
3fffff20: 3fffdad0 00000049 00000020 3ffef6e0
3fffff30: 3fff1e54 3fff1e54 3fff0c44 402182ed
3fffff40: 00000037 1a05a8c0 3fff2138 3ffef858
3fffff50: 00000037 000015b4 3ffe85c8 3ffef858
3fffff60: 3fffdad0 3ffef700 3ffef844 3ffef858
3fffff70: 3fffdad0 3fff0924 3fff1044 4021a191
3fffff80: 00000000 00000000 3ffef6dc 4021b4d6
3fffff90: 3fffdad0 00000000 3ffef844 40216c9c
3fffffa0: feefeffe feefeffe feefeffe 40223060
3fffffb0: feefeffe feefeffe 3ffe8b84 40100e81
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 3460, room 16 tail 4 chksum 0xcc load 0x3fff20b8, len 40, room 4 tail 4 chksum 0xc9 csum 0xc9 v000743e0 ~ld `
Output: