Comments (19)
А вот теперь в самый раз.
Компонент обновил.
Если проблема актуальна для версии 1.5.1 -- переоткройте, пожалуйста. Будем дальше ковырять.
from ha-tion.
Помогло это:
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.
А если ему в контейнере bluepy сказать поставить?
Вообще странно это все: blupy в зависимостях tion-blte прописан и он должен его по цепочке зависимостей тянуть.
from ha-tion.
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.
Установка 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.
А если ему в контейнере bluepy сказать поставить?
Вообще странно это все: blupy в зависимостях tion-blte прописан и он должен его по цепочке зависимостей тянуть.
До установки зависимости не доходит, падает из-за этого импорта - https://github.com/TionAPI/tion_python/blob/master/setup.py#L4
from ha-tion.
Похоже supervised версия homeassistant так просто не позволит добавить интеграцию, либо я что-то не так сделал. Буду дальше копать
from ha-tion.
@crazymerg, спасибо. Сразу не обратил внимание на это.
Сейчас сделаем workaroud для tion_btle.const... Ну и будет выглядеть это все чуть более правильно.
from ha-tion.
Нет, электронный мозг, закрывать еще рано.
from ha-tion.
from ha-tion.
Exec format error означает что bluepy-helper не удается запустить на вашей системе (собран, например, под другую архитектуру/процессор).
Данная ошибка непосредственно с интеграцией или python-модулем не связана.
Попробуйте в вашей системе запустить какой-нибудь bluepy пример. Например scanner из его репозитория .
from ha-tion.
Exec format error означает что bluepy-helper не удается запустить на вашей системе (собран, например, под другую архитектуру/процессор).
Данная ошибка непосредственно с интеграцией или python-модулем не связана.
Попробуйте в вашей системе запустить какой-нибудь bluepy пример. Например scanner из его репозитория .
from ha-tion.
Будем думать что все это происходит в /config/deps/lib/python3.8, те там же где и лежит bluepy из сообщения об ошибке, и здесь все точно.
И при этом всеравно exec format error
при добавлении интеграции?
ps. Прикладывайте, пожалуйста, текст в виде текста, заключенного в ```, а не картиной.
from ha-tion.
Будем думать что все это происходит в /config/deps/lib/python3.8, те там же где и лежит bluepy из сообщения об ошибке, и здесь все точно.
И при этом всеравноexec format error
при добавлении интеграции?ps. Прикладывайте, пожалуйста, текст в виде текста, заключенного в ```, а не картиной.
Да, это /config/deps/lib/python3.8
Всеравно exec format error
при добавлении интеграции
from ha-tion.
А что при этом говорит file /config/deps/lib/python3.8/site-packages/bluepy/bluepy-helper
?
Чудес не бывает: или helper можно запустить, или нет. Одновременно и того и другого не бывает.
from ha-tion.
А что при этом говорит
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.
Нет, supervisor используется чтобы была возможность использовать сторонние контейнеризированные приложения (вроде node-red или visual studio code) и больше ни для чего. Все итеграции попрежнему живут в контейнере HA.
Более того, я у себя, на малине с расбианом это все запускал, чтобы посмотреть что вообще мне может дать supervisor.
Еще уточню: interpreter /lib/ld-musl-armhf.so.1
. У вас хост -- ARM и архитектура armhf? uname -a
в том же терминале это подтверждает?
from ha-tion.
консольно в 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
PS: нет возможности скопировать листинг, там HTML5 Canvas
from ha-tion.
Вот и докапались где архитектуры не соответствуют.
Я пока затрудняюсь объяснить почему HA собирает bluepy под armhf архитектуру, но проблема явно в этом.
from ha-tion.
Related Issues (20)
- MaxTriesExceededError в HA 2022.8 HOT 36
- Доступ к объектам для управления бризером HOT 1
- Error setting up entry Tion Breezer Lite for tion HOT 5
- Конфликт с облачной интеграцией HOT 2
- Connection Rejected Due To Security Reasons [HA 2022.8.5, интеграция v4.0.0] HOT 3
- bluetooth: 'NoneType' object has no attribute 'lower' in HA 2022.8 HOT 5
- Response is {} [HA 2022.8.6, интеграция v4.0.1] HOT 8
- Нестабильная связь с бризером [HA 2022.8.0 и выше, интеграция v4.0.1] HOT 16
- Ошибки подключения к бризерам на 2022.8.7 HOT 20
- Странное поведение интеграции HOT 1
- HA 2022.9.6 не добавляются бризеры. Detected integration that attempted to call BleakClient with an address instead of a BLEDevice HOT 2
- `Software caused connection abort` [НА 2022.8+, интеграция 4.1.1] HOT 11
- Интеграция 4.1.1 не добавляются бризеры. No device found for address None HOT 39
- async_setup_platforms скоро перестанет работать HOT 1
- Добавить сброс счётчика ресурса фильтров "Filter Remains" HOT 4
- Не срабатывает подключение к 4S HOT 3
- Ошибка подключения Tion 4S: Could not get breezer state HOT 3
- Предупреждения в HA 2024.2.1 HOT 1
- Перестала работать служба fan.set_percentage HOT 2
- Невозможно создать пару с бризером Lite HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-tion.