티스토리 뷰

HA 업데이트 이후에 Invalid config 알림이 뜨며 logbook (로그북) 기능이 정상적으로 동작하지 않는 현상 발생

 

좌측 알림 패널에서 아래와 같이 오류 제시

세부 오류 내용은 아래와 같으며, 이는 HA 버전 업데이트 되면서 DB 스키마 구조가 바뀌게 되어 migration이 진행되어야 하나 정상적으로 수행되지 않는것에서 기인한것으로 보임. (HA업데이트 전 버전 2023.01.x to 2023.04.5로 3개월만에 업데이트를 수행하였음)

- 주의 : 보관된 로그 데이터가 모두 삭제됨

- 참고1 : https://community.home-assistant.io/t/history-and-logbook-no-longer-working/207877/20

 

History and logbook no longer working

Had the same issue. All is good now. Thanks

community.home-assistant.io

- 참고2 : https://github.com/home-assistant/core/issues/37298

 

Error upgrading mariadb db schema on upgrade to 0.112 · Issue #37298 · home-assistant/core

The problem After upgrading, the schema upgrade of recorder on MariaDB 10.3.17 fails. This leads to features notifications of errors, such as: The recorder could not start, please check the log Env...

github.com

Home Assistant Core

11:17:45 PM  (ERROR) components/system_log/__init__.py - message first occurred at 11:09:26 PM and shows up 4 times
11:16:58 PM  (ERROR) Stream - message first occurred at 11:10:03 PM and shows up 6 times
Dropping index `ix_states_entity_id_last_updated_ts` from table `states`. Note: this can take several minutes on large databases and slow computers. Please be patient!
11:14:15 PM  (WARNING) Recorder
Dropping index `ix_events_context_id` from table `events`. Note: this can take several minutes on large databases and slow computers. Please be patient!
11:13:56 PM  (WARNING) Recorder
Dropping index `ix_states_context_id` from table `states`. Note: this can take several minutes on large databases and slow computers. Please be patient!
11:13:54 PM  (WARNING) Recorder
Template variable warning: 'dict object' has no attribute 'Occupancy' when rendering '{{ value_json.ZbReceived.MS02.Occupancy }}'
11:13:09 PM  (WARNING) helpers/template.py - message first occurred at 11:09:43 PM and shows up 2 times
Dropping index `ix_statistics_start` from table `statistics`. Note: this can take several minutes on large databases and slow computers. Please be patient!
11:09:44 PM  (WARNING) Recorder - message first occurred at 11:09:44 PM and shows up 2 times

 

 

ssh나 file editor add-on에서 home-assistant_v2.db 파일을 제거 (-shm, -wal이 존재한다면 모두 삭제)

 

이후 home assistant 재기동

 

 

위의 방법이 안될경우

권한설정을 위해 custom_components에 값을 오버라이드하는 과정에서 발생한 문제일수도 있음.

따라서, docker 컨테이너 내부에

docker exec -it homeassistant /bin/bash 

명령어로 진입하여 /config/custom_components 의 default_config에서 호출하는 디렉터리를 강제 삭제

 

cd /config/custom_components
rm -rf map/
rm -rf history/
rm -rf logbook/
rm -rf energy/
rm -rf media_source/

 

 

재기동 후 정상표시 확인

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함