Medication Problems in Thai Elderly
According to Thailand Department of Medical Services data, elderly patients on multiple medications (polypharmacy) have a 35-50% rate of incorrect or missed doses. Primary causes:
- Forgetting — multiple times per day (morning, noon, evening, bedtime)
- Double-dosing — unable to remember whether already taken
- No caregiver present all day when adult children are at work
Consequences of inconsistent medication:
- Poor control of chronic conditions (diabetes, hypertension, heart disease)
- Increased emergency hospitalizations
System Architecture: Weight Sensor + Home Assistant
Simplest and lowest-cost approach:
Place a pill box on a digital scale that supports ESPHome or Bluetooth. When the elderly person takes pills, the weight changes. Home Assistant detects the reduction and confirms medication was taken.
Hardware options:
- Xiaomi Smart Scale 2: 600-900 THB — BLE passive scan in HA
- HX711 + Load Cell DIY: 150-300 THB — ESPHome self-assembly
- Smart Pill Dispenser: 2,000-5,000 THB — complete solution but higher cost
Medication Reminder Automation
yaml
alias: "Morning Medication Reminder"
trigger:
- platform: time
at: "08:00:00"
condition:
- condition: state
entity_id: binary_sensor.elderly_home
state: "home"
action:
- service: tts.speak
target:
entity_id: media_player.elderly_room_speaker
data:
message: "ถึงเวลาทานยาเช้าแล้วครับ/ค่ะ กรุณาหยิบยาจากกล่องสีแดง"
language: th
- service: notify.mobile_app_elderly
data:
title: "💊 Morning Medication Time"
message: "Please take morning pills — 3 tablets"
Confirming Medication Was Taken: Weight Sensor
yaml
alias: "Medication Taken Confirmation"
trigger:
- platform: numeric_state
entity_id: sensor.pill_box_weight
below: 150
for:
minutes: 2
condition:
- condition: time
after: "07:30:00"
before: "09:00:00"
action:
- service: counter.increment
target:
entity_id: counter.medication_morning_taken
- service: input_boolean.turn_on
target:
entity_id: input_boolean.medication_morning_done
- service: notify.line_family_group
data:
message: "✅ Grandmother took morning medication at {{ now().strftime('%H:%M') }}"
Alert When Medication Is Missed
yaml
alias: "Medication Missed Alert"
trigger:
- platform: time
at: "09:30:00"
condition:
- condition: state
entity_id: input_boolean.medication_morning_done
state: "off"
- condition: state
entity_id: binary_sensor.elderly_home
state: "home"
action:
- service: tts.speak
target:
entity_id: media_player.elderly_room_speaker
data:
message: "ยังไม่ได้ทานยาเช้า กรุณาทานยาด้วยนะครับ/ค่ะ"
language: th
- service: notify.line_family_group
data:
title: "⚠️ Morning medication not yet taken"
message: "09:30 reached — no medication detection. Please call to check."
Weekly Medication Report
yaml
alias: "Weekly Medication Adherence Report"
trigger:
- platform: time
at: "20:00:00"
condition:
- condition: time
weekday:
- sun
action:
- service: notify.line_family_group
data:
title: "📊 Weekly Medication Report"
message: >-
Medication adherence past 7 days:
🌅 Morning: {{ states('counter.medication_morning_taken') }}/7 days
🌇 Evening: {{ states('counter.medication_evening_taken') }}/7 days
🌙 Bedtime: {{ states('counter.medication_night_taken') }}/7 days
Setup Considerations
- The elderly person must consent to and understand how the system works
- Start with the most critical medications first — no need to track all at once
- Test with the elderly resident for 1-2 weeks before full deployment
- Have a backup plan if the system goes offline: family members notified to call and check
