Two-way SMS integration for Home Assistant using Mobile Message API. Receive SMS via real-time webhooks and send SMS using the API.
- 📱 Receive SMS - Real-time webhooks via Home Assistant Cloud
- 📤 Send SMS -
smartsms.send_smsservice with phone number validation - 🔧 Entities - Last message, sender, count, and new message sensors
- 🎯 Filtering - Whitelist/blacklist senders, keyword matching
- 🚀 Events - Fire automations on message received or keyword matched
- Home Assistant 2024.1+
- Mobile Message account with API credentials
- Home Assistant Cloud (Nabu Casa) for webhooks
- HACS: Add custom repository
https://github.com/ClermontDigital/smartsms - Manual: Download and extract to
/config/custom_components/smartsms/ - Restart Home Assistant
- Add integration via Settings → Devices & Services
-
Get Mobile Message Credentials:
- API Username/Password: Found in account settings
- Sender ID: Login to Mobile Message → Settings → Sender IDs → Use one of your approved numbers (e.g.,
61480807776)
-
Add SmartSMS Integration:
- Enter API credentials and sender ID
- Copy webhook URL to Mobile Message dashboard
-
Test SMS Sending:
- Use Developer Tools → Actions →
smartsms.send_sms
- Use Developer Tools → Actions →
sensor.smartsms_last_message- Latest SMS contentsensor.smartsms_last_sender- Last sender phone numbersensor.smartsms_message_count- Total messages receivedbinary_sensor.smartsms_new_message- ON for 5 seconds when SMS arrives
service: smartsms.send_sms
data:
to: "+61412345678"
message: "Hello from Home Assistant!"
sender: "MyCompany" # OptionalDeveloper Tools - Actions:
- Go to Developer Tools → Actions
- Choose
smartsms.send_sms - Fill in the form:
- To:
+61412345678 - Message:
Test message from Home Assistant - Sender:
MyHome(optional)
- To:
In Automations:
# Simple notification
- service: smartsms.send_sms
data:
to: "+61412345678"
message: "Door unlocked at {{ now().strftime('%H:%M') }}"
# With dynamic content
- service: smartsms.send_sms
data:
to: "{{ states('input_text.emergency_contact') }}"
message: >
Alert: {{ trigger.to_state.attributes.friendly_name }}
changed to {{ trigger.to_state.state }}
custom_ref: "alert_{{ now().timestamp() }}"
# Multiple recipients (use repeat action)
- repeat:
for_each:
- "+61412345678"
- "+61498765432"
sequence:
- service: smartsms.send_sms
data:
to: "{{ repeat.item }}"
message: "Family alert: Everyone home safe!"Notify on new SMS:
automation:
- alias: "SMS Received"
trigger:
- platform: state
entity_id: binary_sensor.smartsms_new_message
to: "on"
action:
- service: notify.mobile_app_phone
data:
message: "SMS from {{ states('sensor.smartsms_last_sender') }}: {{ states('sensor.smartsms_last_message') }}"Send alarm notification:
automation:
- alias: "Alarm Alert"
trigger:
- platform: state
entity_id: alarm_control_panel.home
to: "triggered"
action:
- service: smartsms.send_sms
data:
to: "+61412345678"
message: "🚨 Home alarm triggered!"- No messages arriving: Check webhook URL in Mobile Message settings matches Home Assistant Cloud webhook URL
- Can't send SMS: Verify Mobile Message account has credits and sender ID is registered
- Integration not loading: Restart Home Assistant after installation
Enable debug logging:
logger:
logs:
custom_components.smartsms: debugBug reports and feature requests welcome via GitHub Issues.
MIT License - see LICENSE file for details.