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

Enabling MI32 Homekit #337

Open
steini72 opened this issue Feb 21, 2023 · 10 comments
Open

Enabling MI32 Homekit #337

steini72 opened this issue Feb 21, 2023 · 10 comments

Comments

@steini72
Copy link

Can you please include MI32 Homkit ?

@benzino77
Copy link
Owner

As I understand correctly Tasmota driver, there has to be USE_BLE_ESP32 and USE_MI_ESP32 defined. Addtionally there has to be USE_MI_HOMEKIT and one of those CONFIG_IDF_TARGET_ESP32 or CONFIG_IDF_TARGET_ESP32C3 or CONFIG_IDF_TARGET_ESP32S3 defined (source)

First two are enabled in TasmoCompiler by selecting "Bluetooth" feature as described here

The last one USE_MI_HOMEKIT can be added in "Custom paramters" step by:

#ifdef USE_MI_HOMEKIT
#undef USE_MI_HOMEKIT
#endif
#define USE_MI_HOMEKIT

Those *IDF* defines should be included when you choose appropriate board (but do not quote me on that). Give it a try. If it doesn't work for you, ask Tasmota Dev team (preferably on Tasmota discord channel) to find out what needs to be #define to get what you need.

@steini72
Copy link
Author

I have
#ifdef USE_MI32_HOMEKIT
#undef USE_MI32_HOMEKIT
#endif
#define USE_MI32_HOMEKIT
written.
thank you

@benzino77
Copy link
Owner

Does it work for you?

@steini72
Copy link
Author

Compile yes
homekit does not work

@benzino77
Copy link
Owner

Have you read this part of documentation link?
Select "Bluetooth" from features list and add those line in "Custom parametrs" field:

#ifdef USE_MI_HOMEKIT
   #undef USE_MI_HOMEKIT
#endif
#define USE_MI_HOMEKIT  1

#ifdef USE_MI_EXT_GUI
   #undef USE_MI_EXT_GUI
#endif
#define USE_MI_EXT_GUI

@steini72
Copy link
Author

Compile yes
homekit does not work
No MI GUI

@steini72
Copy link
Author

Unselect "Bluetooth" from features list and add those line in "Custom parametrs" field:

#ifdef USE_MI_HOMEKIT
#undef USE_MI_HOMEKIT
#endif
#define USE_MI_HOMEKIT 1

#ifdef USE_MI_EXT_GUI
#undef USE_MI_EXT_GUI
#endif
#define USE_MI_EXT_GUI

#ifdef USE_MI_ESP32
#undef USE_MI_ESP32
#endif
#define USE_MI_ESP32

/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans10.ltrans.o:(.literal+0x5ac): undefined reference to mi_homekit_main' /root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans10.ltrans.o:(.literal+0x5b0): undefined reference to mi_homekit_stop'
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans10.ltrans.o: in function _Z13RulesMqttDatav$part$455': <artificial>:(.text+0x4574): undefined reference to mi_homekit_main'
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans10.ltrans.o: in function Xsns62(unsigned int)': <artificial>:(.text+0x4934): undefined reference to mi_homekit_update_value'
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: :(.text+0x4986): undefined reference to mi_homekit_update_value' /root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: <artificial>:(.text+0x49e5): undefined reference to mi_homekit_stop'
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans11.ltrans.o:(.literal+0x494): undefined reference to mi_homekit_update_value' /root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans11.ltrans.o: in function MI32AdvCallbacks::onResult(NimBLEAdvertisedDevice*)':
:(.text+0x479f): undefined reference to mi_homekit_update_value' /root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: <artificial>:(.text+0x4808): undefined reference to mi_homekit_update_value'
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: :(.text+0x4877): undefined reference to mi_homekit_update_value' /root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: <artificial>:(.text+0x48de): undefined reference to mi_homekit_update_value'
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/ccTwC5sJ.ltrans11.ltrans.o::(.text+0x49de): more undefined references to `mi_homekit_update_value' follow
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /root/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libsdmmc.a(sdmmc_mmc.c.obj): access beyond end of merged section (33554768)
/root/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /root/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libsdmmc.a(sdmmc_mmc.c.obj): access beyond end of merged section (136132)
collect2: error: ld returned 1 exit status
*** [.pio/build/tasmota32/firmware.elf] Error 1
========================= [FAILED] Took 788.71 seconds =========================

Environment Status Duration


tasmota32 FAILED 00:13:08.714
==================== 1 failed, 0 succeeded in 00:13:08.714 ====================
Finished. Exit code: 1.

@benzino77
Copy link
Owner

Unselect "Bluetooth" from features list and add those line in "Custom parametrs" field:

The "Bluetooth" feature needs to be SELECTED/CHECKED.

If it does not work for you please contact Tasmota Dev Team to assist you with your problem.

@Jason2866
Copy link
Contributor

This is a verified working env for MI Homekit

[env:tasmota32-mi32-homebridge]
extends                 = env:tasmota32_base
board_build.f_cpu       = 240000000L
build_flags             = ${env:tasmota32_base.build_flags}
                          -DFIRMWARE_BLUETOOTH
                          -DUSE_MI_EXT_GUI
                          -DUSE_MI_HOMEKIT=1    ; 1 to enable; 0 to disable
                          -DUSE_BERRY_ULP
lib_extra_dirs          = lib/libesp32, lib/libesp32_div, lib/lib_basic, lib/lib_i2c, lib/lib_div, lib/lib_ssl
lib_ignore              = ESP8266Audio
                          ESP8266SAM
                          TTGO TWatch Library
                          Micro-RTSP
                          epdiy

@Jason2866
Copy link
Contributor

Jason2866 commented Nov 9, 2023

Somehow related. Homekit support is now removed in Tasmota. Release v13.2 will be the last which does support Homekit. Homekit is not compatible to IDF5.1 which is the underlying SDK for Arduino 3.0.0. Arduino 3.0.0 is needed for supporting the newer espressif MCUS.
Matter is now the way ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants