Having trouble with Twilio automation

Ok, so I am using Home Assistant to automatically send myself a message at certain times of the day using the Twilio API.

It is all done in the configuration.yaml file, so here is what mine looks like:

notify:

  • name: Cody Wirth
    platform: twilio_sms
    account_sid: AC8a4f2f40331bdad5c95265f2cefe26a2
    auth_token: 33a693e18dcad513d4791c51f1071227
    from_number: “+16142896777”

automation:

  • alias: Send message at a given time
    trigger:
    platform: time
    hours: 24
    minutes: 47
    seconds: 15
    action:
    service: notify.twilio_sms
    data:
    message: ‘The sun has set’
    target:
    - “+16147059227”

Is there anything wrong with my syntax? Is there something I need to configure on Twilio’s end to make the messages come through to my phone? Nothing at all is happening when I automate the messages to send.

Ok, so this is the error that it returns:

“17-01-12 08:17:44 WARNING (MainThread) [homeassistant.core] Unable to find service notify/twilio_sms”

Posted this on stackoverflow as well: (Which is where the correct spacing and syntax is shown)

1 Like

StackOverflow is not the proper place to get Home Assistant help. Gitter or the forums are.

This is possibly related?

1 Like

Looks like it is:

Should be calling:

service: notify.Cody Wirth

Not: service: notify.twilio_sms

1 Like

I just got my Twilio working, if you still need help…

1st: You have to create a new number with Twilio, this will be the from_number (when I setup my YAML I did not use the " marks before the + and after the last digit.

2nd: You have to confirm inside Twilio the number that you’ll be having the system send texts to

3rd: Make sure you’re using the token info shown on the Home Console Dashboard

1 Like

Hi

How do you confirm inside Twilio the number that I want the Twilio system to send texts to? i.e. this is my own mobile number that I want Twilio to send texts to? And is it possible to receive calls as well or do I have to pay?

Thanks.

Yes there is a way inside Twilio to confirm your number so that their system can send texts, this is to prevent you from setting up Spam to someone I assume. You have to request confirmation number inside Twilio. I believe you can get calls but I only use it for texting certain things in my system (i.e. if my garage door has been open for too long). If you need more help let me know, I can try to login to my Twilio account to see how to do the confirmation if you haven’t found it yet.

1 Like

Hi

I tried to set it up but it doesnt send texts to my phone. Can you please help? do I have to input my mobile number in my Twilio account?

And do I have to provide any link to the text service in my account?

1 Like

You have to sign up for a new number with Twilio, then use their confirmation process inside Twilio to be able to send texts to your personal number, this prevents you from being able to Spam people with your Twilio account. Inside HA is where you tell the Notify service to send a text to your personal number. It’s been 4 months or more since I set mine up and I’ll be happy to try to help but need to know if you’ve got a Twilio number first or not and if you found how to do the confirmation inside Twilio settings to be able to send texts to your personal number.

1 Like

Right. Do I have to pay for the Twilio number? or get one for free?
are there any instructions that I could follow to get Twilio to sends texts to my personal number?

There’s a fee, it’s small but it costs a little for each text sent. I loaded $30 on a little over 90 days ago and I still have $26 balance.

1 Like

oh right. any idea on how much it costs to send a text?

Something like 7.5 cents per 10 texts if I remember correctly

Right I see
I thought it was free to send texts but anyway wouldn’t want to pay for it as I am only turning my lights on and thought it would be cool to get text notifications.
Do you know any services that provide free texts?

I don’t know of any. For my heavier usage notifications I’m using Pushover so I don’t have to pay for every single thing I want to notify me about. I use the texts for special items like leaving my garage door open for too long.

1 Like