|
本帖最后由 sdhuaren 于 2020-2-28 19:58 编辑
已自行解决,原因是
db_url: mysql://hass:password@core-mariadb/homeassistant?charset=utf8
中莫名少了后面几个字符,导致数据库无效
------------------------------------------------------------------------------------------
日志为空
历史记录也无数据
以下为系统log,怀疑与数据库有关,使用的是MariaDB,很多error看不懂;
另外有几个超时的warning(……taking over 10 seconds),每次启动HA都会出现。不知道是否正常,请大神指点
2020-02-20 22:05:29 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=57 from 2020-02-19 12:53:38)
2020-02-20 22:05:51 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2020-02-20 22:05:55 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for braviatv_psk which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2020-02-20 22:05:56 ERROR (SyncWorker_18) [yahooweather] No woid is received!
2020-02-20 22:05:56 WARNING (SyncWorker_18) [homeassistant.components.yweather.weather] Can't retrieve WOEID from Yahoo!
2020-02-20 22:06:10 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform yr is taking over 10 seconds.
2020-02-20 22:06:10 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 19 minutes:
2020-02-20 22:06:10 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform wake_on_lan is taking over 10 seconds.
2020-02-20 22:06:17 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback async_setup_entity_restore.<locals>._write_unavailable_states(<Event homeassistant_start[L]>) at /usr/src/homeassistant/homeassistant/helpers/entity_registry.py:502
Traceback (most recent call last):
File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 526, in _write_unavailable_states
states.async_set(entry.entity_id, STATE_UNAVAILABLE, attrs)
File "/usr/src/homeassistant/homeassistant/core.py", line 977, in async_set
state = State(entity_id, new_state, attributes, last_changed, None, context)
File "/usr/src/homeassistant/homeassistant/core.py", line 715, in __init__
f"Invalid entity id encountered: {entity_id}. "
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: sensor._iphone_battery_state. Format should be <domain>.<object_id>
2020-02-20 22:06:17 ERROR (MainThread) [homeassistant.components.template.cover] could not convert string to float: 'unknown'
2020-02-20 22:06:17 ERROR (MainThread) [homeassistant.components.template.cover] could not convert string to float: 'unknown'
2020-02-20 22:06:17 ERROR (MainThread) [homeassistant.components.template.light] Received invalid light is_on state: unavailable. Expected: on, off, true, false
2020-02-20 22:06:51 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: 'charmap' codec can't encode characters in position 0-3: character maps to <undefined>
2020-02-20 22:06:53 WARNING (MainThread) [homeassistant.components.device_tracker] The 'hide_if_away' option (with value 'False') is deprecated, please remove it from your configuration. This option will become invalid in version 0.107.0
2020-02-20 22:18:36 ERROR (MainThread) [frontend.js.latest.202001302] blob:http://192.168.0.33:8123/8f5d286 ... a43d55873fd:1:19166 Uncaught RangeError: Source is too large
2020-02-20 22:25:21 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 18 minutes:
2020-02-20 22:43:32 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 17 minutes:
2020-02-20 23:00:43 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 18 minutes:
2020-02-20 23:05:57 ERROR (MainThread) [homeassistant.components.updater] Could not contact Home Assistant Update to check for updates
2020-02-21 00:18:58 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 17 minutes:
2020-02-21 00:36:09 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 16 minutes:
2020-02-21 11:53:24 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 15 minutes:
2020-02-21 12:08:35 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 16 minutes:
2020-02-21 13:24:53 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 16 minutes:
2020-02-21 13:41:04 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 19 minutes:
2020-02-21 15:54:58 ERROR (MainThread) [frontend.js.latest.202001302] http://sdhuaren.vicp.cc/frontend ... b4fa3b.js:2038:1142 Uncaught SyntaxError: Unexpected token {
2020-02-21 15:55:11 ERROR (SyncWorker_4) [homeassistant.components.logbook] Error executing query: (MySQLdb._exceptions.OperationalError) (2006, 'MySQL server has gone away')
[SQL: SELECT DISTINCT states.entity_id AS states_entity_id
FROM states]
(Background on this error at: http://sqlalche.me/e/e3q8)
2020-02-21 15:55:12 ERROR (SyncWorker_4) [homeassistant.components.logbook] Error executing query: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back
[SQL: SELECT DISTINCT states.entity_id AS states_entity_id
FROM states]
[parameters: [immutabledict({})]]
2020-02-21 15:55:12 ERROR (SyncWorker_4) [homeassistant.components.logbook] Error executing query: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back
[SQL: SELECT DISTINCT states.entity_id AS states_entity_id
FROM states]
[parameters: [immutabledict({})]]
2020-02-21 15:55:12 ERROR (SyncWorker_4) [homeassistant.components.recorder.util] Error executing query: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back
[SQL: SELECT DISTINCT states.entity_id AS states_entity_id
FROM states]
[parameters: [immutabledict({})]]
2020-02-21 15:55:12 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1171, in _execute_context
conn = self._revalidate_connection()
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 457, in _revalidate_connection
"Can't reconnect until invalid "
sqlalchemy.exc.InvalidRequestError: Can't reconnect until invalid transaction is rolled back
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/logbook/__init__.py", line 190, in get
return await hass.async_add_job(json_events)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/logbook/__init__.py", line 187, in json_events
_get_events(hass, self.config, start_day, end_day, entity_id)
File "/usr/src/homeassistant/homeassistant/components/logbook/__init__.py", line 443, in _get_events
entity_ids = _get_related_entity_ids(session, entities_filter)
File "/usr/src/homeassistant/homeassistant/components/logbook/__init__.py", line 389, in _get_related_entity_ids
result = [row.entity_id for row in query if entity_filter(row.entity_id)]
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3389, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3414, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 982, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 293, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1101, in _execute_clauseelement
distilled_params,
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1176, in _execute_context
e, util.text_type(statement), parameters, None, None
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1171, in _execute_context
conn = self._revalidate_connection()
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 457, in _revalidate_connection
"Can't reconnect until invalid "
sqlalchemy.exc.StatementError: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back
[SQL: SELECT DISTINCT states.entity_id AS states_entity_id
FROM states]
[parameters: [immutabledict({})]]
2020-02-21 16:19:34 ERROR (MainThread) [frontend.js.latest.202001302] http://sdhuaren.vicp.cc/frontend ... b4fa3b.js:2038:1142 Uncaught SyntaxError: Unexpected token {
2020-02-21 16:20:34 ERROR (MainThread) [frontend.js.latest.202001302] http://sdhuaren.vicp.cc/frontend ... b4fa3b.js:2038:1142 Uncaught SyntaxError: Unexpected token {
|
|