LINE is Thailand’s most widely used app with 52 million users (We Are Social 2024), spanning both younger generations and the elderly who are already familiar with it in daily life. Integrating LINE with Home Assistant is therefore the key to enabling elderly residents and family members to operate a smart home without learning any new application.
Three main approaches exist for connecting LINE with Home Assistant: LINE Notify for one-way messaging at no cost, suitable for alerts only; LIFF (LINE Front-end Framework) for building mini-apps within LINE requiring custom development; and LINE OA with the Messaging API Webhook for bidirectional communication at 0-350 THB/month — the recommended approach for HappySmart.
The integration architecture flows as: Home Assistant → Node-RED → LINE Messaging API → LINE OA → User. Node-RED acts as middleware translating HA events into LINE messages and converting incoming LINE messages back into HA service calls. Example commands: typing a light request turns on lights in HA; typing a temperature query returns sensor readings; typing a lock command activates the Smart Lock; typing a camera request sends a snapshot image from the IP camera.
For Thai voice control, three options exist: Google Assistant in Thai via Google Nest Mini (1,500-2,000 THB) integrates well with HA through the Google Home integration; Siri in Thai on iPhone works via HA’s HomeKit bridge; and AIS AIRI offers the best Thai language understanding but is limited to AIS smart home devices only.
For security: LINE OA webhooks should verify every command using the sender’s LINE User ID; the HA Long-Lived Token should be stored in Node-RED environment variables rather than exposed in LINE messages; a whitelist of family member LINE User IDs should be enforced; and a 4-digit PIN should be required for critical commands such as door locking.
