Coder Social home page Coder Social logo

Не удается добавить интеграцию tion breezer в supervised вариант установки Home Assistant about ha-tion HOT 19 CLOSED

tionapi avatar tionapi commented on September 27, 2024
Не удается добавить интеграцию tion breezer в supervised вариант установки Home Assistant

from ha-tion.

Comments (19)

IATkachenko avatar IATkachenko commented on September 27, 2024 2

А вот теперь в самый раз.

Компонент обновил.
Если проблема актуальна для версии 1.5.1 -- переоткройте, пожалуйста. Будем дальше ковырять.

from ha-tion.

Flaxing avatar Flaxing commented on September 27, 2024 1

Помогло это:

docker exec -it homeassistant bash
mv /config/deps/lib/python3.8/site-packages/bluepy /config/deps/lib/python3.8/site-packages/bluepy_4del
ln -s /usr/local/lib/python3.8/site-packages/bluepy /config/deps/lib/python3.8/site-packages/

Получена нужная архитектура:

bash-5.0# file /config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper
/config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, with debug_info, not stripped

Разбираться что произошло и почему не компетентен, вероятно разные пути установки разных версий bluepy.
Интеграция 1.7.1 установилась и Tion 3S управляем из Home Assistant 2021.4.6 Supervised Docker на Debian 10(Buster).

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

А если ему в контейнере bluepy сказать поставить?
Вообще странно это все: blupy в зависимостях tion-blte прописан и он должен его по цепочке зависимостей тянуть.

from ha-tion.

tiggaTIG avatar tiggaTIG commented on September 27, 2024
bash-5.0# /usr/local/bin/python3 -m pip install bluepy
Collecting bluepy
  Using cached bluepy-1.3.0.tar.gz (217 kB)
Building wheels for collected packages: bluepy
  Building wheel for bluepy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-v9tws8t8
       cwd: /tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/
  Complete output (6 lines):
  running bdist_wheel
  running build
  running build_py
  Working dir is /tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc
  execute make -C ./bluepy clean
  error: [Errno 2] No such file or directory: 'make'
  ----------------------------------------
  ERROR: Failed building wheel for bluepy
  Running setup.py clean for bluepy
Failed to build bluepy
Installing collected packages: bluepy
    Running setup.py install for bluepy ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hwmffc41/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/bluepy
         cwd: /tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/
    Complete output (6 lines):
    running install
    running build
    running build_py
    Working dir is /tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc
    execute make -C ./bluepy clean
    error: [Errno 2] No such file or directory: 'make'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9hwffvgs/bluepy_11d33d45ae8f4a77a50f88b863e79acc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-hwmffc41/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/bluepy Check the logs for full command output.

тут я немного теряюсь уже, как глубока кроличья нора?:) ставить пакет make ?

from ha-tion.

tiggaTIG avatar tiggaTIG commented on September 27, 2024

Установка make тоже не помогла, к сожалению((

bash-5.0# /usr/local/bin/python3 -m pip install bluepy
Collecting bluepy
 Using cached bluepy-1.3.0.tar.gz (217 kB)
Building wheels for collected packages: bluepy
 Building wheel for bluepy (setup.py) ... error
 ERROR: Command errored out with exit status 1:
  command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-kyu2t0da
      cwd: /tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/
 Complete output (11 lines):
 running bdist_wheel
 running build
 running build_py
 Working dir is /tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691
 execute make -C ./bluepy clean
 execute make -C bluepy -j1
 Failed to compile bluepy-helper. Exiting install.
 Command was 'make -C bluepy -j1' in /tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691
 Return code was 2
 Output was:
 b"make: Entering directory '/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/bluepy'\ntar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c\nmake: pkg-config: No such file or directory\nmake: pkg-config: No such file or directory\ncc -L. -g -Wall  -Os -DHAVE_CONFIG_H -I./bluez-5.47/attrib -I./bluez-5.47 -I./bluez-5.47/lib -I./bluez-5.47/src -I./bluez-5.47/gdbus -I./bluez-5.47/btio -I./bluez-5.47/sys  -o bluepy-helper bluepy-helper.c ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c \nmake: cc: No such file or directory\nmake: *** [Makefile:30: bluepy-helper] Error 127\nmake: Leaving directory '/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/bluepy'\n"
 ----------------------------------------
 ERROR: Failed building wheel for bluepy
 Running setup.py clean for bluepy
Failed to build bluepy
Installing collected packages: bluepy
   Running setup.py install for bluepy ... error
   ERROR: Command errored out with exit status 1:
    command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-yhottht1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/bluepy
        cwd: /tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/
   Complete output (11 lines):
   running install
   running build
   running build_py
   Working dir is /tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691
   execute make -C ./bluepy clean
   execute make -C bluepy -j1
   Failed to compile bluepy-helper. Exiting install.
   Command was 'make -C bluepy -j1' in /tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691
   Return code was 2
   Output was:
   b"make: Entering directory '/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/bluepy'\ntar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c\nmake: pkg-config: No such file or directory\nmake: pkg-config: No such file or directory\ncc -L. -g -Wall  -Os -DHAVE_CONFIG_H -I./bluez-5.47/attrib -I./bluez-5.47 -I./bluez-5.47/lib -I./bluez-5.47/src -I./bluez-5.47/gdbus -I./bluez-5.47/btio -I./bluez-5.47/sys  -o bluepy-helper bluepy-helper.c ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c \nmake: cc: No such file or directory\nmake: *** [Makefile:30: bluepy-helper] Error 127\nmake: Leaving directory '/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/bluepy'\n"
   ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oef3ynw8/bluepy_10b81b64e2af494097fcea318bc58691/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-yhottht1/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/bluepy Check the logs for full command output.

from ha-tion.

crazymerg avatar crazymerg commented on September 27, 2024

А если ему в контейнере bluepy сказать поставить?
Вообще странно это все: blupy в зависимостях tion-blte прописан и он должен его по цепочке зависимостей тянуть.

До установки зависимости не доходит, падает из-за этого импорта - https://github.com/TionAPI/tion_python/blob/master/setup.py#L4

from ha-tion.

tiggaTIG avatar tiggaTIG commented on September 27, 2024

Похоже supervised версия homeassistant так просто не позволит добавить интеграцию, либо я что-то не так сделал. Буду дальше копать

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

@crazymerg, спасибо. Сразу не обратил внимание на это.
Сейчас сделаем workaroud для tion_btle.const... Ну и будет выглядеть это все чуть более правильно.

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

Нет, электронный мозг, закрывать еще рано.

from ha-tion.

Flaxing avatar Flaxing commented on September 27, 2024

image
Актуально на 1.5.1 и 1.7.1

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

Exec format error означает что bluepy-helper не удается запустить на вашей системе (собран, например, под другую архитектуру/процессор).
Данная ошибка непосредственно с интеграцией или python-модулем не связана.
Попробуйте в вашей системе запустить какой-нибудь bluepy пример. Например scanner из его репозитория .

from ha-tion.

Flaxing avatar Flaxing commented on September 27, 2024

Exec format error означает что bluepy-helper не удается запустить на вашей системе (собран, например, под другую архитектуру/процессор).
Данная ошибка непосредственно с интеграцией или python-модулем не связана.
Попробуйте в вашей системе запустить какой-нибудь bluepy пример. Например scanner из его репозитория .

image

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

Будем думать что все это происходит в /config/deps/lib/python3.8, те там же где и лежит bluepy из сообщения об ошибке, и здесь все точно.
И при этом всеравно exec format error при добавлении интеграции?

ps. Прикладывайте, пожалуйста, текст в виде текста, заключенного в ```, а не картиной.

from ha-tion.

Flaxing avatar Flaxing commented on September 27, 2024

Будем думать что все это происходит в /config/deps/lib/python3.8, те там же где и лежит bluepy из сообщения об ошибке, и здесь все точно.
И при этом всеравно exec format error при добавлении интеграции?

ps. Прикладывайте, пожалуйста, текст в виде текста, заключенного в ```, а не картиной.

Да, это /config/deps/lib/python3.8
Всеравно exec format error при добавлении интеграции

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

А что при этом говорит file /config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper?
Чудес не бывает: или helper можно запустить, или нет. Одновременно и того и другого не бывает.

from ha-tion.

Flaxing avatar Flaxing commented on September 27, 2024

А что при этом говорит file /config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper?
Чудес не бывает: или helper можно запустить, или нет. Одновременно и того и другого не бывает.

#file /config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper
/config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper: ELF 32-bit LSB pie executable, ARM, EABIS version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, with debug_info, not stripped
Понимаю, что чудес не бывает, есть мысль, что может это всё в другом контейнере надо делать, типа supervisor, вместо homeassistant, нет?

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

Нет, supervisor используется чтобы была возможность использовать сторонние контейнеризированные приложения (вроде node-red или visual studio code) и больше ни для чего. Все итеграции попрежнему живут в контейнере HA.
Более того, я у себя, на малине с расбианом это все запускал, чтобы посмотреть что вообще мне может дать supervisor.

Еще уточню: interpreter /lib/ld-musl-armhf.so.1. У вас хост -- ARM и архитектура armhf? uname -a в том же терминале это подтверждает?

from ha-tion.

Flaxing avatar Flaxing commented on September 27, 2024

консольно в docker exec -it homeassistant bash (всё хорошо)

Система amd64, устанавливает x86_64, устанавливается x86_64

bash-5.0# pip install bluepy
Processing /root/.cache/pip/wheels/ae/52/54/2b125a9bf67f82c81b99fa31f198d14a67b78304522c0a9ece/bluepy-1.3.0-cp38-cp38-linux_x86_64.whl
Installing collected packages: bluepy
Successfully installed bluepy-1.3.0
WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
bash-5.0# file /usr/local/lib/python3.8/site-packages/bluepy/bluepy-helper
/usr/local/lib/python3.8/site-packages/bluepy/bluepy-helper: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, with debug_info, not stripped
bash-5.0# uname -a
Linux homeassistant 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 Linux

Через HA в WebTerminal

Система amd64, устанавливает x86_64, устанавливается armhf
image
PS: нет возможности скопировать листинг, там HTML5 Canvas

from ha-tion.

IATkachenko avatar IATkachenko commented on September 27, 2024

Вот и докапались где архитектуры не соответствуют.
Я пока затрудняюсь объяснить почему HA собирает bluepy под armhf архитектуру, но проблема явно в этом.

from ha-tion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.