헤드리스 Pi 콘솔/journalctl에서 한글이 깨져 보이는 문제로, Pi 번들(02/03/04)에 들어가는 모든 소스의 사람-대상 텍스트를 영어로 전환. 코드·식별자·설정키·경로·숫자·hex·서명 스킴·f-string 플레이스홀더는 불변. - raspberry_pi4/, raspberry_pi4_sht30/: 로그·주석·문서·센서명·위치 영어화 - tools/make_deploy_bundles.py: 생성 템플릿(config_local.py/setup.sh/SETUP.md/PI_META 위치) 영어화 - tools/harden_pi.sh, tools/set_network.sh: echo/주석 영어화 - WIRING.html: 영어화 + SHT30 전압 경고 정정 반영 - 서버 번들(01, php/)은 한글 유지(브라우저 대시보드, Pi에서 안 깨짐) - 전 파이썬/셸 문법검사 통과, JSON 본문 서명 무영향
31 lines
2.2 KiB
Python
31 lines
2.2 KiB
Python
# =============================================================================
|
|
# config_local.example.py - Operational / secret-value template (Pi 4 temp-humidity SHT30 module / module #2)
|
|
#
|
|
# Usage: cp config_local.example.py config_local.py
|
|
# -> Fill in the real values and save. Never commit config_local.py
|
|
# (it is excluded via .gitignore).
|
|
#
|
|
# WARNING: Server compatibility
|
|
# This module (#2) reports SHT30 temperature/humidity readings to the cafe24
|
|
# server php/api/sensor_data.php. The server requires a raw-body signature:
|
|
# X-Signature = lowercase_hex(HMAC-SHA256(key=API_KEY, msg=request body bytes))
|
|
# -> API_KEY must be "exactly identical" to API_KEY in the server config.local.php.
|
|
# Threshold decisions (high/low temp, high/low humidity), SMS, and the dashboard are all done by the server.
|
|
# =============================================================================
|
|
|
|
# ─────────────────────────────────────────────
|
|
# Server API endpoint (SHT30 receiving server = cafe24 php/)
|
|
# Web root per INSTALL_PI_SERVER.md: public_html/raspi_leck_detecter/
|
|
# ─────────────────────────────────────────────
|
|
API_URL = "https://YOUR_SERVER/raspi_leck_detecter/api/sensor_data.php"
|
|
|
|
# ─────────────────────────────────────────────
|
|
# Shared secret key — must be exactly identical to API_KEY in the server config.local.php. Never commit.
|
|
# ─────────────────────────────────────────────
|
|
API_KEY = "CHANGE_ME"
|
|
|
|
# ─────────────────────────────────────────────
|
|
# Device identification (to distinguish multiple units). sensor_id/sensor_name use the config.py defaults (2).
|
|
# ─────────────────────────────────────────────
|
|
DEVICE_ID = "rpi4-sht30-01"
|
|
DEVICE_LOCATION = "Server Room"
|