I see their API here. I suspect HA is currently using one of these.
Thanks! Will look into that.
I asked ClickSend and they support webhook and IFTTT so maybe this could give me an opening to get SMS data to HA… …possibly
In my limited experience with IFTTT, you are lucky to get your output in less than an hour or 2.
allright… good to know. That wont work with a car heater
Webhooks could work maybe.
I am no programmer, so I need to learn more.
Zapier support with HA would be great. That would help us “noobs” haha
Do you have a GSM modem?
I found some tutorials explaining it using it:
- Receive SMS on a Raspberry Pi
- SMS verschicken und empfangen mit dem Raspberry Pi
-
Send and Receive SMS Text Messages with Raspberry Pi and SIM800 GSM Board
all use
https://wammu.eu/smsd/
There is a tutorial using Python exemplarisch - RPi Tutorial
As SMS are stored as plain text combining them with Folder Watcher could do the job.
I’ve had the same module in my car for a few days now.
From the beginning I wanted to integrate the module into HA.
Sending an SMS is not the problem, I use the HTTP API of AnySMS, it costs per SMS but for the beginning it is OK. Should be possible with any SMS provider that offers an HTTP API.
In the long run it would be nice to be able to receive and send SMS in HA. On the one hand to save money for the SMS provider (SIM card with SMS flatrate) and on the other hand you could receive SMS. SMS receipt is also possible with most providers, but either only on a shared number and keyword (which won’t work with this module) or with too high costs for a fixed number (>30€ per month)
I’ve already tried to get my Huawei LTE stick to run on Linux, which would work in principle, but I run it all on a Synology and Docker and somehow I don’t get the device in the Docker container. Might be a project for the holidays, or I have to go the way of an additional computer (raspberry pi).
In HA the whole thing is called as REST command.
rest_command:
car_heater_on:
url: !secret rest_car_heater_on_url
method: GET
car_heater_off:
url: !secret rest_car_heater_off_url
method: GET
car_heater_info:
url: !secret rest_car_heater_info_url
method: GET
car_heater_temperature:
url: !secret rest_car_heater_temperature_url
method: GET
secrets.yaml
rest_car_heater_on_url: http://gateway.any-sms.biz/send_sms.php?id=123456&pass=APIPASSWORD&gateway=28&absender=NUMBERFROM&nummer=NUMBERTO&text=ON&test=0
rest_car_heater_off_url: http://gateway.any-sms.biz/send_sms.php?id=123456&pass=APIPASSWORD&gateway=28&absender=NUMBERFROM&nummer=NUMBERTO&text=OFF&test=0
rest_car_heater_info_url: http://gateway.any-sms.biz/send_sms.php?id=123456&pass=APIPASSWORD&gateway=28&absender=NUMBERFROM&nummer=NUMBERTO&text=INFO&test=0
rest_car_heater_temperature_url: http://gateway.any-sms.biz/send_sms.php?id=123456&pass=APIPASSWORD&gateway=28&absender=NUMBERFROM&nummer=NUMBERTO&text=TEMP&test=0
What I can’t do at the moment is to use Alexa/Siri to control the whole thing.
But I think a momentary switch should work, but I didn’t have time to test it yet.
For now I’ve made an iOS shortcut with menu, which calls the service for the REST command in the background via the HA Api. Better than nothing.
Thank you MarH for the info and your setup. I put the whole thing on ice for a while but now I got interest again. Will try and figure it out using Google Home. I use this with the Volvo integration and it’s great.
Thanks! This could be the solution👍
Hi all, I am also looking for a service to receive SMS by HA. The reason is, that I have here and then problems connecting remotely to HA. And it appears that this problem always happens when non-admins of my family want to get into the house but for whatever reason have not been able to switch of HA’s alarm system. I am looking for a solution bypassing LTE/WAN/LAN/WLAN and send a SMS to HA to turn on/off the alarm. If there is any other idea in handling that, feel free to give me a hint. Thx, gl
I’ve been looking at this also. I use Twilio for SMS notification from HA (e.g door open too long, etc.), so I’d like to be able to Ack the alert by responding to the txt.
Twillio allows configuration of a web hook to receive the replies. This would mean exposing an end-point from the HA system on the internet. Something I don’t want to do, given lack of HA being pen tested.
So my current idea would be to set up something in AWS to expose the webhook and use a lambda to place it in an SMS queue. Then in HA use the AWS SMS API to pull messages back. Haven’t priced out the AWS stuff but it should be very cheap since it’s billed based on usage.
Interested in other ideas.
I use pushover (one time charge for my android phone) and notify to sends SMS to my phone
https://pushover.net/login?back_to=/apps/clone/home_assistant
Chas
I just tried using the Android App SMS to URL forwarder .
For the moment that is not conclusive yet. Nothing is received on the webhook - it seems to be an issue with the Android app (I checked the Android logs).
I suppose it can work for others, and it will likely be solve.
It seems that the app will try to forward the SMS several times if the host is unreachable.
This is the webhook I set up (i.e., in an automation).
alias: Receive SMS from SMS to URL forwarder
description: See https://github.com/bogkonstantin/android_income_sms_gateway_webhook
trigger:
- platform: webhook
webhook_id: example_name
alias: When SMS received at https://PUBLIC_HA_DOMAIN/api/webhook/example_name
condition: []
action:
- service: system_log.write
data:
message: "{{ trigger }}"
mode: single
Guess a easy and reliable way would be a sim800l and a esp of choice running esphome
Integrates perfectly via native api into home assistant and the hardware costs only around $10.
No dependencies on clouds (other peoples computers) or a active internet uplink needed to have this working
I see that most users have gone the GSM modem route, but the GSM network will be discontinued in the future. Has anyone worked with receiving message from gateways like ClickSend? I would not mind working on the API to receive, I do not know where the current code is stored for the send function and would not know how to begin to implement it in the HA code.
Any ideas?
Thanks
Receiving from an SMS Service can be as simple as setting up an endpoint on your home assistance instance which you could do with a webhook.
Still, this has the disadvantage that if your internet connexion is down, then you do not have access to the service.
I mentioned the Android App SMS to URL forwarder a few posts up. It can in fact also work when there is an absence of the internet.
The Android phone can be connected to the local network and therefore still deliver the payload using WiFi. It might be an easier and also economical method because you do not have to setup the modem in HA, and you can use an old phone you have on the shelve. To send an SMS, the Android App does not propose an interface for that. Maybe another application that could run without the internet exists or the Android App could be extended to propose an interface for that (http socket).
No personal experience, but could this be an option?
Thanks for the reply but I actually kill all internet access to the HA servers except for connecting to the SMS gateway, and then occasionally when I want to do updates. So wouldn’t adding the Android to the mix actually be another entry point into the network? Or does that solution actually give me access to SMS only? GSM is all but gone in our area as 4G and now 5G has replaced it all.
The bottom line is I want to get status updates on demand without exposing the servers to the inet more than necessary.
I do have a hidden MQTT server on the internet and might set up a listener on one of the internal servers that could then trigger script and send the requested information, but there again, now I am opening up another hole. Yes, I am a security freak. I worked in IT and network security for 40 years.
Thanks for any ideas you or anyone else can provide.
Walt
If your phone can only connect to WiFi and you block your phone from the internet (through the WiFi network), your phone would not have access to the internet. You can just disable the data option on your phone as a first step, to go further you can set the data limit to 0, and change and force the APN to something that does not exist (if the APN is wrong, the phone can’t connect to the internet).
I hear you about security (risk of intrusion) - have almost 1000 different logins and passwords and firewall for instance.
Are you sure? Where are you located? Some countries just decided that GSM (“2G”) will be around for another decade (UK it was?)
As to my knowledge nether 3G, 4G or 5G (often only 4G+ relabeled) is capable of native calls and messages - that’s only possible with 2G/GSM. That’s often phones are actually connected to GSM and LTE in parallel for example. Also I read ones many (automated) emergency calls in cars rely only on 2G which probably is reason enough for many countries to just don’t phase it just out rapidly.
Maybe you mend 3G is phased out in favor of 4G/4G+? That sounds more realistic and is actually the case already in some countries.
You forgot the snake oil!
I do not get it unless you think that there is something fraudulent in what I wrote ( as in : Snake oil - Idioms by The Free Dictionary ).
In my area of NW Arkansas, T-Mobile was the only carrier still using GSM. That system has been turned off and now they offer 5G. Unfortunately I do not have adequate service to utilize T-Mobile. Plus, I don’t need another $20-$40 monthly bill. I bought a cellular based dog tracking collar but that test failed miserably. It only worked when we were in town.