home assistant - deptno/deptno.github.io GitHub Wiki

home-assistant

μ„€μΉ˜ 기둝

  • kubernetes resource 생성
    • pv
    • pvc
    • dp
    • svc
    • ingressroute
  • configuration.yaml μ„€μ •
    • http - reverse proxy
    • homeassistant - external_url(webhook url ν‘œμ‹œλ•Œλ¬Έ)
  • μ„€μ • -> κΈ°κΈ°μ„€μ • -> κΈ°κΈ°μΆ”κ°€(smartthings) -> 외뢀링크: 토큰 λ°œκΈ‰
  • μ„€μ • -> κΈ°κΈ°μ„€μ • -> smartthings -> μ›Ήν›… url 확인 -> λ°œκΈ‰λ°›μ€ 토큰 μž…λ ₯
  • google-assistant μ—°κ²°
    • μ΅œμ’…μ μœΌλ‘œ μž¬μ‹œμž‘ κΉŒμ§€ 후에 google home μ•±μ—μ„œ 기기연결을 톡해 ha 와 연동
    • 슀마트 μ‹±μŠ€λŠ” ha 밑에 λΆ™μ–΄μžˆμœΌλ―€λ‘œ google home 에 μ—°λ™λœ 경우 ν•΄μ œν•΄μ€€λ‹€.
    • μŒμ„±μΈμ‹ ν…ŒμŠ€νŠΈ
  • homekit bridge μ—°κ²°
    • ν•΄λ³΄λ‹ˆκ°€ λ§ˆμ§€λ§‰μ— iOS μ—μ„œ μ—°κ²°ν• λ•Œ μ—λŸ¬
      • 섀정에 ν¬νŠΈκ°€ μžˆλŠ”κ±° λ³΄λ‹ˆ 포트 λ…ΈμΆœμ΄ μ•ˆλ˜μ„œ κ·ΈλŸ°κ²ƒμœΌλ‘œ λ³΄μ΄λŠ”λ° svc 생성 ν…ŒμŠ€νŠΈ ν•„μš”

configuration

reverse proxy

μ™ΈλΆ€ μ ‘κ·Ό ν—ˆμš©μ„ μœ„ν•΄μ„œλŠ” λ¦¬λ²„μŠ€ ν”„λ‘μ‹œ 섀정이 ν•„μš”ν•˜λ‹€.

- (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 10.244.182.150, but your HTTP integration is not set-up for reverse proxies

configuration.yaml νŒŒμΌμ„ μˆ˜μ •ν•œλ‹€

http:
  use_x_forwarded_for: true
  trusted_proxies:
  - 10.244.182.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 5

external_url

버그인지 diary/2023-07-11 ν˜„μ§€ κΈ°μ€€μœΌλ‘œ μ„€μ • -> μ‹œμŠ€ν…œ -> λ„€νŠΈμ›Œν¬ μ„€μ •μœΌλ‘œ μ΄λ™ν•˜λ©΄ 화면에 아무것도 λ…ΈμΆœλ˜μ§€ μ•Šμ•˜λ‹€. 또 λ‹€μ‹œ ssh 둜 μ ‘μ†ν•΄μ„œ configuration.yaml 을 μ—΄κ³  μ•„λž˜ λ‚΄μš©μ„ μΆ”κ°€ν•œλ‹€

homeassistant:
  external_url: "https://www.example.com"`

error

403 forbidden

λ‘œκ·ΈμΈν™”λ©΄μžμ²΄κ°€ μ•ˆλœ¨κ³  403 text κ°€ λœ¨λŠ” 경우

2023-10-01 11:55:51.173 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/
v1/devices:requestSync failed: 500
2023-10-01 11:56:45.968 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/
v1/devices:reportStateAndNotification failed: 404
192.168.0.xxx:
  banned_at: '2023-09-30T04:33:49.311517+00:00'

ip_bans.yaml ν•΄λ‹Ή λ‚΄μš©μ„ μ‚­μ œν•˜λ˜μ§€ ν•΄λ‹Ή νŒŒμΌμ„ μ‚­μ œν•˜λ©΄ λœλ‹€.

  • @todo ha κ°€ μ»¨ν…Œμ΄λ„ˆλ‘œ λ– μžˆλŠ” 호슀트의 ipκ°€ λ°΄μ΄λ˜μ„œ 내뢀접근이 λͺ¨λ‘ λ°΄ 된 κ²ƒμœΌλ‘œ 보인닀

Username already exists

μ‚­μ œλœ μœ μ €λ₯Ό 재 μƒμ„±ν•˜λ €κ³  ν•˜λ €κ³  ν•˜λ©΄ μ—λŸ¬κ°€ λ‚œλ‹€

  • pv 둜 μ ‘κ·Όν•΄μ„œ 데이터λ₯Ό λͺ¨λ‘ μ‚­μ œν•œλ‹€
cat person # user_id 확인
rm frontend.user_data_[user_id] # user 제거
vi auth_provider.homeassistant # ν•΄λ‹Ή user 정보 제거
grep -r [user_id] . # λ¦¬μŠ€νŒ…λœ νŒŒμΌμ—μ„œ ν•΄λ‹Ή 정보가 ν¬ν•¨λœ 데이터 제거
  • μž¬λΆ€νŒ…(μ»¨ν…Œμ΄λ„ˆ μž¬μ‹€ν–‰) ν›„ μƒμ„±ν•œλ‹€

links