Jump to content

Recommended Posts

8 часов назад, panama сказал:

С устройствами xiaomi  лучше получается работать без облака, с токеном. У вас интеграция не может войти в облако xiaomi без ssl.

Благодарю вас за ответ! Облако мне нужно, чтобы выцепить устройство, подключенное через BLE хаб, увы, без него тут не обойтись.

А как может быть, чтобы у меня не было SSL? Точнее даже так: где у меня нет SSL? Я же настроил интеграцию, то есть в момент настройки он входит в аккаунт, видит устройства, дает добавить карточку, но после перестает ее обновлять. У Python нет SSL или у чего?

Заранее спасибо за ответ!

Link to comment
Share on other sites

Пишут, что может быть эта проблема при использовании сторонних DNS типа SkyDNS, AdGuard и т.п. с профилем, где много запрещено. Проверьте у Вас в кинетике.

Edited by panama
Link to comment
Share on other sites

bump to 2022.7.3 (прим. см.  ниже )

screen_2022-07-13_11:42:38-ha.png

1. "pip" можно не откатывать - вбит "костыль"

2. отключить "zram" - `no system zram` (в морде или CLI) и использовать "swap"

---

"Кто не спрятался, я не виноват!"

  • Thanks 2
  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

Добрый день , решил обновится до последней версии , при установке началась ругань , подскажите пожалуйста как решить .

Цитата

/ # opkg install homeassistant
Installing homeassistant (2022.7.5-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/test/HA/homeassistant_2022.7.5-1_mipsel-3.4.ipk
Installing python3-atomicwrites-homeassistant (1.4.1-1) to root...
Downloading http://bin.entware.net/mipselsf-k3.4/test/HA/python3-atomicwrites-homeassistant_1.4.1-1_mipsel-3.4.ipk
Collected errors:
 * check_data_file_clashes: Package python3-atomicwrites-homeassistant wants to install file /opt/lib/python3.10/site-packages/atomicwrites/__init__.pyc
        But that file is already provided by package  * python3-atomicwrites
 * opkg_install_cmd: Cannot install package homeassistant.
/ #

Цитата

 

 

 

Link to comment
Share on other sites

2 часа назад, Yuriy сказал:

But that file is already provided by package  * python3-atomicwrites

https://www.opennet.ru/opennews/art.shtml?num=57481

https://github.com/home-assistant/core/issues/74751

и т.д.

`opkg remove python3-atomicwrites --force-depends`  `opkg install python3-atomicwrites-homeassistant`

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
В 17.07.2022 в 10:21, TheBB сказал:

bump to 2022.7.5 (прим. - отключить "zram")

screen_2022-07-17_10:14:08-ha.png

 

Спасибо! На Giga сам HA встал отлично (правда пришлось даунгрейдить pip до 21.1.2, без этого не запускался) Столкнулся с проблемой установки Xiaomi Miio.

В логах нашел:

Exception: Version mismatch: this is the 'cffi' package version 1.15.1, located in '/opt/lib/python3.10/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.15.0, located in '/opt/lib/python3.10/site-packages/_cffi_backend.cpython-310.so'.  The two versions should be equal; check your installation.

Что можно сделать?

Попробовал pip install cffi==1.15.0 после чего HA тупил долго, потом завелся, при добавлении miio завис. Попробую opkg remove/install homeassistant..

Пришлось еще удалить в \site-packages все что начиналось на тильду ~, а то ругалось на старую библиотеку.

При попытке установить Xiaomi Miio запустилась настройка, ввожу данные для входа - Unknown Error. В логах нашел что ругается на tzdata (Invalid TZif file: magic not found при вызове tzlocal, которой кажется нет в наличии). Пришлось ставить вручную pip install tzdata. Но проблему это не решила, все еще 

tz = pds.wrap_zone(ZoneInfo.from_file(tzfile, key="local"))

приводит к

ValueError: Invalid TZif file: magic not found

по логам

Доставить и tzdata, и tzlocal. Но ошибка не ушла... 

Есть идеи?

Edited by isheep
Link to comment
Share on other sites

В общем, кажется единственный способ побороть это - прописать для окружения python, в котором выполняется HA тайм зону. 

os.environ['TZ'] = 'Europe/Moscow'

Но ума не приложу, как это сделать в системе - в какой файл добавлять эту строку?

Иначе tzlocal ломится в /etc/localtime, на верхнем уровне ОС роутера. А в нем далеко не Tzif, а просто строчка "MSK+3" (точнее, ссылка на /var/TZ на роутере, в котором уже эта строка. Естественно, все это read only file system)

Edited by isheep
Link to comment
Share on other sites

4 часа назад, isheep сказал:

Но ума не приложу, как это сделать в системе - в какой файл добавлять эту строку?

Найти файл  (`/opt/lib/python3.10/site-packages/tzlocal/unix.py` или `/opt/var/lib/homeassitant/deps/lib/python3.10/site-packages/tzlocal/unix.py`) и подправить (см. примерно как)

  • Upvote 1
Link to comment
Share on other sites

10 часов назад, TheBB сказал:

Найти файл  (`/opt/lib/python3.10/site-packages/tzlocal/unix.py` или `/opt/var/lib/homeassitant/deps/lib/python3.10/site-packages/tzlocal/unix.py`) и подправить (см. примерно как)

Спасибо! Поправил одну строчку 168 в unix.py

        for filename in ("etc/localtime", "usr/local/etc/localtime"):

в

        for filename in ("opt/etc/localtime", "etc/localtime", "usr/local/etc/localtime"):

И наконец-то вошел в облако

  • Thanks 1
  • Upvote 1
Link to comment
Share on other sites

В 10.01.2021 в 19:06, TheBB сказал:
echo "src/gz ha http://bin.entware.net/mipselsf-k3.4/test/HA" >> /opt/etc/opkg.conf
opkg update
opkg install homeassistant
/opt/etc/init.d/S99hass start

Приветствую. У меня черный keenetic giga 2 прошивка 2.16. Установил по сценарию выше, но подключения к веб морде не наблюдаю

Link to comment
Share on other sites

3 часа назад, isheep сказал:

Спасибо! Поправил одну строчку 168 в unix.py

        for filename in ("etc/localtime", "usr/local/etc/localtime"):

в

        for filename in ("opt/etc/localtime", "etc/localtime", "usr/local/etc/localtime"):

И наконец-то вошел в облако

А у меня вечная ошибка такая... почти забил уже на этот вход в облако :) Может у Вас есть идеи как это победить?

Logger: aiohttp.server
Source: deps/lib/python3.10/site-packages/tzlocal/unix.py:156
First occurred: 14:13:20 (1 occurrences)
Last logged: 14:13:20

Error handling request

Traceback (most recent call last):
  File "/opt/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
  File "/opt/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
  File "/opt/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/ban.py", line 79, in ban_middleware
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/auth.py", line 236, in auth_middleware
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/view.py", line 136, in handle
  File "/opt/lib/python3.10/site-packages/homeassistant/components/config/config_entries.py", line 177, in post
  File "/opt/lib/python3.10/site-packages/homeassistant/components/http/data_validator.py", line 62, in wrapper
  File "/opt/lib/python3.10/site-packages/homeassistant/helpers/data_entry_flow.py", line 109, in post
  File "/opt/lib/python3.10/site-packages/homeassistant/data_entry_flow.py", line 277, in async_configure
  File "/opt/lib/python3.10/site-packages/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
  File "/opt/lib/python3.10/site-packages/homeassistant/components/xiaomi_miio/config_flow.py", line 247, in async_step_cloud
  File "/opt/var/lib/homeassistant/deps/lib/python3.10/site-packages/micloud/micloud.py", line 38, in __init__
    timezone = datetime.datetime.now(tzlocal.get_localzone()).strftime('%z')
  File "/opt/var/lib/homeassistant/deps/lib/python3.10/site-packages/tzlocal/unix.py", line 165, in get_localzone
    if _cache_tz is None:
  File "/opt/var/lib/homeassistant/deps/lib/python3.10/site-packages/tzlocal/unix.py", line 156, in _get_localzone
    with open(tzpath, 'rb') as tzfile:
  File "/opt/lib/python3.10/site-packages/pytz/tzfile.py", line 28, in build_tzinfo
struct.error: unpack requires a buffer of 44 bytes
Link to comment
Share on other sites

42 минуты назад, al12s сказал:

А у меня вечная ошибка такая... почти забил уже на этот вход в облако :) Может у Вас есть идеи как это победить?

Дык, тож самое - найти и подправить путь к localtime (см. выше)

  • Upvote 1
Link to comment
Share on other sites

1 час назад, dvg2882 сказал:

Приветствую. У меня черный keenetic giga 2 прошивка 2.16. Установил по сценарию выше, но подключения к веб морде не наблюдаю

после первого запуска НА, дождаться установки "морды" (frontend) и перезапустить НА (наблюдать за процессом можно в "htop" и пр. или запустив НА из ком. строки (не скриптом))

Link to comment
Share on other sites

18 часов назад, TheBB сказал:

после первого запуска НА, дождаться установки "морды" (frontend) и перезапустить НА (наблюдать за процессом можно в "htop" и пр. или запустив НА из ком. строки (не скриптом))

Приветствую. Спасибо за помощь. Есть еще вопросы)))

1.  Не скриптом это просто команду hass? У меня в этом случае начинает ошибки сыпать что не может pillow найти.

2. Как в htop понять что морда встала? Инструкцию читал, но ничего не понял.

3. Для установки требуется откатить pip как я понял. Но после установки, система жалуется на какой то конфликт с пользователем root. И отправляет в какие то виртуальные пространства. Это нормально?

4. Ставлю все это ради ESP Home. Народ несколько раз задавал вопрос, но никто не ответил. Стоит вообще игра свеч? Можно будет эту интеграцию запустить?

Link to comment
Share on other sites

Добрый день, кто использует интеграцию HomeKit? раньше у меня все работало, в какой-то момент перестал, решил удалить все полностью и создать заново, но Home не может создать мост... Может кто-то сталкивался с такой проблемой?

Link to comment
Share on other sites

38 минут назад, dvg2882 сказал:

Есть еще вопросы

1. `hass -c /opt/var/lib/homeassistant --debug --verbose`

Скрытый текст
2022-08-11 10:52:24 INFO (SyncWorker_2) [homeassistant.util.package] Attempting install of home-assistant-frontend==20220707.1
2022-08-11 10:53:05 WARNING (MainThread) [asyncio] Executing <Handle _SelectorDatagramTransport._read_ready() created at /opt/lib/python3.10/asyncio/selector_events.py:254> took 2.766 seconds
2022-08-11 10:53:21 INFO (SyncWorker_3) [homeassistant.loader] Loaded hassio from homeassistant.components.hassio
2022-08-11 10:53:21 INFO (SyncWorker_1) [homeassistant.loader] Loaded device_tracker from homeassistant.components.device_tracker
2022-08-11 10:53:21 INFO (SyncWorker_2) [homeassistant.loader] Loaded panel_custom from homeassistant.components.panel_custom
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up frontend
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'mobile_app', 'braviatv', 'sun', 'application_credentials', 'upnp', 'system_health', 'sensor', 'script', 'default_config', 'trace', 'input_boolean', 'scene', 'uptime', 'input_number', 'timer', 'hacs', 'homekit', 'speedtestdotnet', 'homekit_controller', 'blueprint', 'zone', 'history', 'ffmpeg', 'tts', 'persistent_notification', 'local_ip', 'keenetic_ndms2', 'moon', 'logbook', 'version', 'dnsip', 'energy', 'media_source', 'input_text', 'input_select', 'tag', 'input_button', 'group', 'automation', 'counter', 'dlna_dmr', 'dlna_dms', 'input_datetime', 'my', 'met', 'yandex_station', 'map'}
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up sun
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.0 seconds
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up application_credentials
2022-08-11 10:53:21 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-549' coro=<_async_setup_component() running at /opt/lib/python3.10/site-packages/homeassistant/setup.py:235> wait_for=<Task pending name='Task-594' coro=<Store._async_load() running at /opt/lib/python3.10/site-packages/homeassistant/helpers/storage.py:116> cb=[Task.task_wakeup()] created at /opt/lib/python3.10/site-packages/homeassistant/core.py:484> cb=[Task.task_wakeup()] created at /opt/lib/python3.10/site-packages/homeassistant/core.py:484> took 0.144 seconds
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up system_health
2022-08-11 10:53:21 INFO (SyncWorker_1) [homeassistant.loader] Loaded systemmonitor from homeassistant.components.systemmonitor
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up trace
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setup of domain trace took 0.0 seconds
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up input_boolean
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.setup] Setting up scene
2022-08-11 10:53:21 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up uptime
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setup of domain uptime took 0.0 seconds
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up input_number
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up timer
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up blueprint
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setup of domain blueprint took 0.0 seconds
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up zone
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up history
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up local_ip
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setup of domain local_ip took 0.0 seconds
2022-08-11 10:53:22 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-570' coro=<_async_setup_component() running at /opt/lib/python3.10/site-packages/homeassistant/setup.py:265> cb=[Task.task_wakeup()] created at /opt/lib/python3.10/site-packages/homeassistant/core.py:484> took 0.681 seconds
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up moon
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setup of domain moon took 0.0 seconds
2022-08-11 10:53:22 INFO (MainThread) [homeassistant.setup] Setting up logbook
2022-08-11 10:53:23 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-573' coro=<_async_setup_component() running at /opt/lib/python3.10/site-packages/homeassistant/setup.py:235> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()] created at /opt/lib/python3.10/asyncio/tasks.py:665> cb=[Task.task_wakeup()] created at /opt/lib/python3.10/site-packages/homeassistant/core.py:484> took 0.164 seconds
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up media_source
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up input_text
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up input_select
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up tag
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up input_button
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up group
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up counter
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up input_datetime
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up my
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setup of domain my took 0.0 seconds
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up yandex_station
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setup of domain yandex_station took 0.0 seconds
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setting up map
2022-08-11 10:53:23 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds
2022-08-11 10:53:23 WARNING (MainThread) [asyncio] Executing <Handle _chain_future.<locals>._set_state(<Future finis...events.py:429>, <Future at 0x...returned dict>) at /opt/lib/python3.10/asyncio/futures.py:378 created at /opt/lib/python3.10/asyncio/futures.py:398> took 0.372 seconds
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setting up braviatv
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain braviatv took 0.0 seconds
2022-08-11 10:53:24 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-746' coro=<ConfigEntry.async_setup() running at /opt/lib/python3.10/site-packages/homeassistant/config_entries.py:353> wait_for=<Future pending cb=[shield.<locals>._outer_done_callback() at /opt/lib/python3.10/asyncio/tasks.py:857, Task.task_wakeup()] created at /opt/lib/python3.10/asyncio/base_events.py:429> cb=[gather.<locals>._done_callback() at /opt/lib/python3.10/asyncio/tasks.py:720] created at /opt/lib/python3.10/asyncio/tasks.py:636> took 0.131 seconds
2022-08-11 10:53:24 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: http, sun, application_credentials, system_health, input_boolean, scene, scene.homeassistant, uptime, input_number, timer, zone, local_ip, moon, logbook, media_source, input_text, input_select, tag, input_button, group, counter, input_datetime, yandex_station, braviatv
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain system_health took 2.5 seconds
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain scene took 2.4 seconds
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 1.4 seconds
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setting up energy
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain energy took 0.0 seconds
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain media_source took 1.4 seconds
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setting up automation
2022-08-11 10:53:24 INFO (MainThread) [asyncio] <Server sockets=(<asyncio.TransportSocket fd=27, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('0.0.0.0', 8123)>, <asyncio.TransportSocket fd=28, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('::', 8123, 0, 0)>)> is serving
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
2022-08-11 10:53:24 INFO (MainThread) [homeassistant.setup] Setup of domain application_credentials took 2.8 seconds

что-то вроде этого

2. `htop` +F5 (дерево) + F4 (фильтр) + python

Скрытый текст
 5604 root        20   0  943M  103M 14916 S  0.0 21.2  0:00.00    `- /opt/bin/python3.10|/opt/bin/python3 /opt/bin/hass -c /opt/var/lib/homeassistant
 5605 root        20   0  943M  103M 14916 S  0.0 21.2  0:00.00    `- /opt/bin/python3.10|/opt/bin/python3 /opt/bin/hass -c /opt/var/lib/homeassistant
 5606 root        20   0  943M  103M 14916 S  0.0 21.2  0:00.00    `- /opt/bin/python3.10|/opt/bin/python3 /opt/bin/hass -c /opt/var/lib/homeassistant
 5607 root        20   0  943M  103M 14916 S  0.0 21.2  0:00.00    `- /opt/bin/python3.10|/opt/bin/python3 /opt/bin/hass -c /opt/var/lib/homeassistant
 5608 root        20   0  943M  103M 14916 S  0.0 21.2  0:00.00    `- /opt/bin/python3.10|/opt/bin/python3 /opt/bin/hass -c /opt/var/lib/homeassistant
 5629 root        20   0 71152 61244 10840 D  0.0 12.2  0:14.61    `- /opt/bin/python3.10|/opt/bin/python3 -m pip install --quiet home-assistant-frontend==20220707.1 --timeout 60 --upgrade --

типа так, когда процесс исчезнет, значит встало (или выпало с ошибкой)

3. нет, можно не нужно (исправили: https://github.com/home-assistant/core/releases/tag/2022.7.4)

Цитата

Remove pip --prefix workaround (@henryptung - #74922)

~ # opkg list | grep python3-pip
python3-pip - 22.0.4-1 - Python 3.10 pip module
~ # 
~ # pip -V
pip 22.0.4 from /opt/lib/python3.10/site-packages/pip (python 3.10)
~ #

4. не помню деталей, кажись, надо toolchain для mips`ов...

Link to comment
Share on other sites

1 час назад, al12s сказал:

Добрый день, кто использует интеграцию HomeKit? раньше у меня все работало, в какой-то момент перестал, решил удалить все полностью и создать заново, но Home не может создать мост... Может кто-то сталкивался с такой проблемой?

возможно связано с переходом с json (python (core)) на orjson (https://github.com/home-assistant/core/pull/74377)

Link to comment
Share on other sites

Здравствуйте.

Памагити

Keenetic DSL, 2.16.D.12.0-8

  1. echo "src/gz ha http://bin.entware.net/mipssf-k3.4/test/HA" >> /opt/etc/opkg.conf
  2. opkg update
  3. opkg install gcc ldd make gawk sed patch diffutils coreutils-install libffi
  4. opkg install homeassistan
  5. hass -c /opt/var/lib/homeassistant --debug --verbose
  6. ...
  7. Profit Segmentation fault :(

Результат команды "hass -c /opt/var/lib/homeassistant --debug --verbose"

Скрытый текст

~ # hass -c /opt/var/lib/homeassistant --debug --verbose
2022-08-13 14:27:27 INFO (MainThread) [homeassistant.bootstrap] Config directory: /opt/var/lib/homeassistant
2022-08-13 14:27:27 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-1' coro=<setup_and_run_hass() running at /opt/lib/python3.10/site-packages/homeassistant/runner.py:101> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /opt/lib/python3.10/asyncio/futures.py:384, Task.task_wakeup()] created at /opt/lib/python3.10/asyncio/base_events.py:429> cb=[_run_until_complete_cb() at /opt/lib/python3.10/asyncio/base_events.py:184] created at /opt/lib/python3.10/asyncio/tasks.py:636> took 0.171 seconds
2022-08-13 14:27:27 INFO (MainThread) [asyncio] execute program '/opt/bin/python3': <_UnixSubprocessTransport pid=32311 running stdin=<_UnixWritePipeTransport fd=10 idle bufsize=0> stdout=<_UnixReadPipeTransport fd=11 polling>>
2022-08-13 14:27:28 INFO (MainThread) [asyncio] <_UnixWritePipeTransport fd=10 idle bufsize=0> was closed by peer
2022-08-13 14:27:28 INFO (MainThread) [asyncio] <_UnixReadPipeTransport fd=11 polling> was closed by peer
2022-08-13 14:27:28 INFO (MainThread) [asyncio] <_UnixSubprocessTransport pid=32311 running stdin=<_UnixWritePipeTransport closed fd=10 closed> stdout=<_UnixReadPipeTransport closed fd=11 closed>> exited with return code 0
2022-08-13 14:27:28 INFO (SyncWorker_1) [homeassistant.loader] Loaded persistent_notification from homeassistant.components.persistent_notification
2022-08-13 14:27:28 INFO (SyncWorker_0) [homeassistant.loader] Loaded homeassistant from homeassistant.components.homeassistant
2022-08-13 14:27:28 INFO (MainThread) [homeassistant.setup] Setting up persistent_notification
2022-08-13 14:27:28 INFO (MainThread) [homeassistant.setup] Setup of domain persistent_notification took 0.0 seconds
2022-08-13 14:27:28 INFO (MainThread) [homeassistant.setup] Setting up homeassistant
2022-08-13 14:27:28 INFO (MainThread) [homeassistant.setup] Setup of domain homeassistant took 0.0 seconds
2022-08-13 14:27:28 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-9' coro=<_async_setup_component() running at /opt/lib/python3.10/site-packages/homeassistant/setup.py:265> cb=[Task.task_wakeup()] created at /opt/lib/python3.10/site-packages/homeassistant/core.py:484> took 0.118 seconds
2022-08-13 14:27:29 INFO (SyncWorker_1) [homeassistant.loader] Loaded scene from homeassistant.components.scene
2022-08-13 14:27:29 INFO (SyncWorker_0) [homeassistant.loader] Loaded tts from homeassistant.components.tts
2022-08-13 14:27:29 INFO (SyncWorker_2) [homeassistant.loader] Loaded default_config from homeassistant.components.default_config
2022-08-13 14:27:29 INFO (SyncWorker_1) [homeassistant.loader] Loaded script from homeassistant.components.script
2022-08-13 14:27:29 INFO (SyncWorker_3) [homeassistant.loader] Loaded automation from homeassistant.components.automation
2022-08-13 14:27:29 INFO (SyncWorker_0) [homeassistant.loader] Loaded http from homeassistant.components.http
2022-08-13 14:27:29 INFO (SyncWorker_2) [homeassistant.loader] Loaded application_credentials from homeassistant.components.application_credentials
2022-08-13 14:27:29 INFO (SyncWorker_1) [homeassistant.loader] Loaded blueprint from homeassistant.components.blueprint
2022-08-13 14:27:29 INFO (SyncWorker_1) [homeassistant.loader] Loaded auth from homeassistant.components.auth
2022-08-13 14:27:29 INFO (SyncWorker_0) [homeassistant.loader] Loaded trace from homeassistant.components.trace
2022-08-13 14:27:29 INFO (SyncWorker_0) [homeassistant.loader] Loaded websocket_api from homeassistant.components.websocket_api
2022-08-13 14:27:29 INFO (SyncWorker_2) [homeassistant.loader] Loaded cloud from homeassistant.components.cloud
2022-08-13 14:27:29 INFO (SyncWorker_3) [homeassistant.loader] Loaded webhook from homeassistant.components.webhook
2022-08-13 14:27:29 INFO (SyncWorker_1) [homeassistant.loader] Loaded counter from homeassistant.components.counter
2022-08-13 14:27:29 INFO (SyncWorker_0) [homeassistant.loader] Loaded dhcp from homeassistant.components.dhcp
2022-08-13 14:27:29 INFO (SyncWorker_2) [homeassistant.loader] Loaded energy from homeassistant.components.energy
2022-08-13 14:27:29 INFO (SyncWorker_3) [homeassistant.loader] Loaded history from homeassistant.components.history
2022-08-13 14:27:29 INFO (SyncWorker_1) [homeassistant.loader] Loaded recorder from homeassistant.components.recorder
2022-08-13 14:27:29 INFO (SyncWorker_0) [homeassistant.loader] Loaded frontend from homeassistant.components.frontend
2022-08-13 14:27:29 INFO (SyncWorker_2) [homeassistant.loader] Loaded api from homeassistant.components.api
Segmentation fault

Подумал, проблема в флешках, но установка на HDD дает результат выше.

"pip3 install --upgrade pip setuptools" не делал, иначе, ругается на конфликт версий.

Link to comment
Share on other sites

20 часов назад, TheBB сказал:

bump to 2022.8.4 (прим. - отключить "zram")

screen_2022-08-14_23:53:55-ha.png

 

Установка с нуля.

  1. echo "src/gz ha http://bin.entware.net/mipssf-k3.4/test/HA" >> /opt/etc/opkg.conf
  2. opkg update
  3. opkg install gcc ldd make gawk sed patch diffutils coreutils-install libffi
  4. opkg install homeassistan
  5. pip3 install --upgrade pip setuptools (теперь норм)
    Скрытый текст

    ~ # pip install --upgrade pip setuptools
    Requirement already satisfied: pip in /opt/lib/python3.10/site-packages (22.0.4)
    Collecting pip
      Downloading pip-22.2.2-py3-none-any.whl (2.0 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 1.1 MB/s eta 0:00:00
    Requirement already satisfied: setuptools in /opt/lib/python3.10/site-packages (                                                                                        58.1.0)
    Collecting setuptools
      Downloading setuptools-65.0.0-py3-none-any.whl (1.2 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 1.1 MB/s eta 0:00:00
    Installing collected packages: setuptools, pip
      Attempting uninstall: setuptools
        Found existing installation: setuptools 58.1.0
        Uninstalling setuptools-58.1.0:
          Successfully uninstalled setuptools-58.1.0
      Attempting uninstall: pip
        Found existing installation: pip 22.0.4
        Uninstalling pip-22.0.4:
          Successfully uninstalled pip-22.0.4
    Successfully installed pip-22.2.2 setuptools-65.0.0
    WARNING: Running pip as the 'root' user can result in broken permissions and con                                                                                        flicting behaviour with the system package manager. It is recommended to use a v                                                                                        irtual environment instead: https://pip.pypa.io/warnings/venv

  6. /opt/etc/init.d/S99hass start

В 'top' процесс исчезает секунд через 40.

Запускаю через 'hass -c /opt/var/lib/homeassistant --debug --verbose', та же ошибка "Segmentation fault"

Скрытый текст

~ # hass -c /opt/var/lib/homeassistant --debug --verbose
2022-08-15 20:04:24.938 INFO (MainThread) [homeassistant.bootstrap] Config directory: /opt/var/lib/homeassistant
2022-08-15 20:04:24.962 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-1' coro=<setup_and_run_hass() running at /opt/lib/python3.10/site-packages/homeassistant/runner.py:101> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /opt/lib/python3.10/asyncio/futures.py:384, Task.task_wakeup()] created at /opt/lib/python3.10/asyncio/base_events.py:429> cb=[_run_until_complete_cb() at /opt/lib/python3.10/asyncio/base_events.py:184] created at /opt/lib/python3.10/asyncio/tasks.py:636> took 0.143 seconds
2022-08-15 20:04:25.112 INFO (MainThread) [asyncio] execute program '/opt/bin/python3': <_UnixSubprocessTransport pid=22901 running stdin=<_UnixWritePipeTransport fd=10 idle bufsize=0> stdout=<_UnixReadPipeTransport fd=11 polling>>
2022-08-15 20:04:25.867 INFO (MainThread) [asyncio] <_UnixWritePipeTransport fd=10 idle bufsize=0> was closed by peer
2022-08-15 20:04:25.891 INFO (MainThread) [asyncio] <_UnixReadPipeTransport fd=11 polling> was closed by peer
2022-08-15 20:04:25.906 INFO (MainThread) [asyncio] <_UnixSubprocessTransport pid=22901 running stdin=<_UnixWritePipeTransport closed fd=10 closed> stdout=<_UnixReadPipeTransport closing fd=11 idle>> exited with return code 0
2022-08-15 20:04:26.054 INFO (SyncWorker_0) [homeassistant.loader] Loaded homeassistant from homeassistant.components.homeassistant
2022-08-15 20:04:26.088 INFO (SyncWorker_0) [homeassistant.loader] Loaded persistent_notification from homeassistant.components.persistent_notification
2022-08-15 20:04:26.146 INFO (MainThread) [homeassistant.setup] Setting up homeassistant
2022-08-15 20:04:26.180 INFO (MainThread) [homeassistant.setup] Setup of domain homeassistant took 0.0 seconds
2022-08-15 20:04:26.189 WARNING (MainThread) [asyncio] Executing <Task pending name='Task-9' coro=<_async_setup_component() running at /opt/lib/python3.10/site-packages/homeassistant/setup.py:265> cb=[Task.task_wakeup()] created at /opt/lib/python3.10/site-packages/homeassistant/core.py:484> took 0.106 seconds
2022-08-15 20:04:26.215 INFO (MainThread) [homeassistant.setup] Setting up persistent_notification
2022-08-15 20:04:26.251 INFO (MainThread) [homeassistant.setup] Setup of domain persistent_notification took 0.0 seconds
2022-08-15 20:04:26.534 INFO (SyncWorker_0) [homeassistant.loader] Loaded automation from homeassistant.components.automation
2022-08-15 20:04:26.542 INFO (SyncWorker_0) [homeassistant.loader] Loaded default_config from homeassistant.components.default_config
2022-08-15 20:04:26.559 INFO (SyncWorker_0) [homeassistant.loader] Loaded script from homeassistant.components.script
2022-08-15 20:04:26.567 INFO (SyncWorker_0) [homeassistant.loader] Loaded tts from homeassistant.components.tts
2022-08-15 20:04:26.577 INFO (SyncWorker_0) [homeassistant.loader] Loaded scene from homeassistant.components.scene
2022-08-15 20:04:26.657 INFO (SyncWorker_0) [homeassistant.loader] Loaded blueprint from homeassistant.components.blueprint
Segmentation fault

Этих компонентов достаточно для правильной работы OPKG и HASS?

Скрытый текст

image.png.cd3544a2187c55332263429281d336d5.png  

 

Edited by vpivci
Дополнение
Link to comment
Share on other sites

Добрый день. Подскажите по опыту, стоит ли ставить HA на keenetic peak?  Сильно сервер будет нагружать роутер (уже поднят vpn,торрент)? 

p.s. строго не судить , только начинаю разбираться.

Link to comment
Share on other sites

16 часов назад, vpivci сказал:

Запускаю через 'hass -c /opt/var/lib/homeassistant --debug --verbose', та же ошибка "Segmentation fault"

сломано оно для mips`ов (ВЕ - DSL, DUO, etc.), в работе...

Link to comment
Share on other sites

В 16.08.2022 в 12:55, TheBB сказал:

сломано оно для mips`ов (ВЕ - DSL, DUO, etc.), в работе...

"вести с полей" )))

если очень (не)повезёт, сразу "выпадает в осадок":

help> modules

Please wait a moment while I gather a list of all available modules...

Segmentation fault
~ #

если (не)повезёт, может отвалиться так:

help> modules

Please wait a moment while I gather a list of all available modules...

memory allocation of 1936292453 bytes failed
Aborted
~ #

собсна, откатил на 2022.6.7 (only DSL, DUO, GigaSE, etc.)

Link to comment
Share on other sites

3 часа назад, TheBB сказал:

собсна, откатил на 2022.6.7 (only DSL, DUO, GigaSE, etc.)

 

Не устанавливается, ругается на зависимости и несовместимость архитектуры (предыдущие шаги те же).

Скрытый текст

~ # opkg install homeassistant
Unknown package 'homeassistant'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency python3-atomicwrites for py                                                                                        thon3-hass-nabucasa
 * pkg_hash_fetch_best_installation_candidate: Packages for python3-hass-nabucas                                                                                        a found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency python3-atomicwrites for ho                                                                                        meassistant
 * pkg_hash_fetch_best_installation_candidate: Packages for homeassistant found,                                                                                         but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package homeassistant.

Если я правильно понял, в "bin.entware.net/mipssf-k3.4/test/HA/" отсутствует нужный файл. В "mipselsf" присутствует "python3-atomicwrites-homeassistant_1.4.1-1_mips-3.4.ipk".

Edited by vpivci
Link to comment
Share on other sites

10 часов назад, vpivci сказал:

Если я правильно понял, в "bin.entware.net/mipssf-k3.4/test/HA/" отсутствует нужный файл. В "mipselsf" присутствует "python3-atomicwrites-homeassistant_1.4.1-1_mips-3.4.ipk".

mea culpa (((

Да, потерялся пакет. Загружен...

~ # opkg install homeassistant
Installing homeassistant (2022.6.7-1) to root...
...
Configuring homeassistant.

	*** Prepare your device to use the Home Assistant ***
...
~ # /opt/etc/init.d/S99hass start
 Starting hass...              done. 
~ #
~ # uname -a
Linux Keenetic_DSL 3.4.113 #1 SMP Tue Apr 26 08:03:16 MSK 2022 mips GNU/Linux
~ # 

 

Link to comment
Share on other sites

"под капотом" orjson (mips(BE))...

собсна, сама бибка собирается от кросс до нативки, руками или очередным (не)нужным - maturin (в к-ром с рождения нет поддержки mips(BE)), даже тесты (некоторые) проходит...

~/orjson # cargo build --release
    Updating crates.io index
  Downloaded autocfg v1.1.0
...
   Compiling pyo3-ffi v0.16.5
   Compiling orjson v3.7.12 (/opt/root/orjson)
    Finished release [optimized] target(s) in 117m 41s
~/orjson # 
~/orjson # ldd target/release/liborjson.so 
	libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x779d4000)
	librt.so.1 => /opt/lib/librt.so.1 (0x779bc000)
	libpthread.so.0 => /opt/lib/libpthread.so.0 (0x7798e000)
	libc.so.6 => /opt/lib/libc.so.6 (0x777fa000)
	/opt/lib/ld.so.1 (0x77ab0000)
~/orjson # 
~/orjson # file target/release/liborjson.so 
target/release/liborjson.so: ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, not stripped
~/orjson #
~/orjson # python
Python 3.10.5 (main, Aug  8 2022, 06:21:00) [GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import orjson
>>> orjson.dumps([])
b'[]'
>>> orjson.dumps([], option=orjson.OPT_APPEND_NEWLINE)
b'[]\n'
>>>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...