Home Assistant TextNow Beta (Send SMS From Home Assistant For Free)

Home Assistant TextNow Integration

A Home Assistant integration for sending and receiving SMS/MMS messages through TextNow. Control your smart home via text messages with interactive menus, auto-replies, and phrase-based triggers!

Features:

  • Send SMS, MMS (images), and voice messages
  • Receive messages with automatic polling
  • Send interactive numbered menus with response handling
  • Auto-reply to whoever triggered the automation
  • Phrase-based triggers for initiating automations
  • Contact management via UI

Quick Install

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.


Setup

Getting TextNow Credentials

You need 2 values from TextNow:

  1. Username (from Settings page - NOT your email)
  2. TextNow Cookie cookie value

How to get cookies:

  1. Sign into textnow.com
  2. Press F12 → Network tab → Refresh page
  3. Click any request → Request Headers → Cookie
  4. Copy the value entire cookie.

Services

textnow.send - Send Messages

Send SMS, MMS (images), or voice messages.

Fields:

  • Contact - Leave unchecked to auto-reply to trigger sender, or check to select specific contact
  • Message - Text content
  • Image - File path for MMS (e.g., /config/www/photo.jpg)
  • Audio file - File path for voice message (e.g., /config/www/audio.mp3)
textnow.send_menu - Interactive Menus

Send a numbered menu and wait for user’s response. Perfect for interactive control!

Fields:

  • Contact - Leave unchecked for auto-reply, check to select contact
  • Menu Options - One option per line
  • Include Header - Show header (default: on)
  • Header Text - Custom header (default: “Please select an option:”)
  • Include Footer - Show footer (default: on)
  • Footer Text - Custom footer (default: “Reply with the number of your choice”)
  • Timeout - Seconds to wait (default: 30)

How it works:

  1. Sends numbered menu via SMS
  2. Waits for user to reply with number
  3. Returns response as variable
  4. Continue automation based on choice

Response variables:

  • choice.option - Selected number (1, 2, 3…)
  • choice.value - Text of selected option
  • choice.timed_out - True if timeout

Triggers

SMS Message Received

Fires when any contact sends a message.

Setup:

  1. Add Trigger → Device → TextNow → SMS message received

Variables:

  • {{ trigger.contact_name }} - Sender’s name
  • {{ trigger.contact_id }} - Contact ID
  • {{ trigger.message }} - Message text
  • {{ trigger.phone }} - Phone number
Phrase Received in SMS

Fires when message contains specific phrase (case-insensitive, matches anywhere in message).

Setup:

  1. Add Trigger → Device → TextNow → Phrase received in SMS
  2. Enter phrase to match

Variables:

  • Same as SMS Message Received, plus:
  • {{ trigger.matched_phrase }} - The matched phrase

Requirements: Home Assistant 2023.7.0+, TextNow account

Links: GitHub | Issues

1 Like

Heres a sample automation i have to send me text message of my current electric bill usage

1 Like

I thought this would be more wanted :sweat_smile:

1 Like

I was looking in the textNow site to see what I need to do. Seems we need to get a phone number from them and an actual sim card? I want to add a second number to my existing phone and do not want to lost my main number and only have this textnow number as secondary for text.

What kind of subscription do you have with them and are you paying a monthly fee to get this working???

No text now is free doesn’t require a sim card, just sign up and obtain a free number.

Once you do that ill guide you through the next steps in obtaining the needed information for the integration.

Also you dont need the textnow simcard if this is a secondary phone number, (the sim card is meant for people using textnow as their primary number) you simply use the textnow app for the second number.

Regardless, if you have your textnow account setup your 50% done, you just need to copy over some values from text now to the integration and your done :slight_smile:

I have tried a dozen times, and double checked I was doing it correctly, to configure the link and it will not work. I’m getting the error “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” when trying to access the settings/cog wheel.

i have to update the integration gonna be a while my apologies (im facing the same thing)

Repo deleted ;( Interesting project, i wan’t this in my HA :smiley: Need some help with this?

@patryk0802 @JoeHen GitHub - zodyking/Home-Assistant-TextNow: Home Assistant custom integration for TextNow. i fixed it, its working again.

TextNow Intergration Is Back Online

With New Features!

  • MMS (Sending Images)
  • Voice Message (Sending Audio Files)

Also Easier To Setup
Instructions:
You need two pieces of information from your TextNow account:

Step 1: Get Your Username

  1. Go to textnow.com and sign in

  2. Go to Settings page

  3. Your username is displayed on the settings page (this is NOT your email address)

Step 2: Get Full Cookie String

  1. While logged into TextNow on the messages page (default page after login), press F12 to open browser DevTools

  2. Click the Network tab

  3. Refresh the page (F5)

  4. In the Network tab, find and click on a request with your username as the title (e.g., your_username or similar)

  5. In the Request Headers section, find the Cookie field

  6. Copy the entire cookie string (everything after Cookie: )

I sent a very passionate email to Textnow for them to consider working with home assistant. Im fighting hard for them to say yes but if they dont now worries theirs other sms providers and while textnow would be an easier one to work with because they have their api in a web messenger I can also reverse engineer free sms providers who strictly use apps but hopefully one of them says yes, if they all say no i still have other means to achieve the same thing so home assistant can get a cheap/free reliable sms integration. Textnow current concerns are people have been using their api for transactional sms for their personal web applications and pure spam So i advise if you do use this create a separate account as it may be flagged and deactivated, things to help prevent deactivation can be downloading their app and sending a few text everyday (i usually send it to myself and respond just a few times to not be flagged) Im hoping textnow approves this so i dont have to continue doing that nonsense but thats the main reason why development has been very slow on this integration and i did not post an icon for it .

Also if you update your integration you’ll see some new features:

2 new device triggers Texnow sms received & Textnow phrase received

1 new action Textnow send menu.

Summary you can now send menu’s and respond to them interact with to as run automation by sending a phrase “Lights” and a menu sends to the contact with various options (yes this automation flow allows for sub menus) Personally i use it to allow roomates to request ConEd account related things :slight_smile: there will be more updates to further increase the ease of automation

I made manny silent updates to this integration over the past week and i pushed the last silent update which adds an integration side panel

Very powerful integration hope it gains traction, in let me explain how i use/why i made this integration. I live with relative/roommates and we share a coned utility rather than manually sending them con ed information (bill pdf, account data, usage, ect) they can request this anytime by texting “Send Me The Bill” to the textnow phone numbers which responds with pdf link to the bill or they can text “ConEd Usage” to received breakdown of how much power we used and estimate cost ect from opower. Other ways i use it is to configure aspect of our smart home, for instance we have smart recessed lighting paired with esphome presence sensors, i already do have a multi button switch to toggle various modes of lighting but any roommate can send “lights” sms to receive a full light control menu to change light color, wether lights operate in switch mode or detection mode, ect.

Its very easy to use once setup if anyone needs help understanding how to automate with texnow.send menu action i can assist you, but its pretty much design to be used with a following choose block with textnow.phrase received triggers with matching trigger ID’s

Enjoy :blush:

-I hope to bring other providers onboard in this same way in near future

Was just thinking about SMS earlier today. I’d like a way to notify neighbors and they, of course, don’t have access to my system.

Haven’t had any luck signing up with TextNow to try this out.

Is that a screenshot of textnow, if so siqn up via pc not on phone. That part i cant help with too much but the intergration side i can (which is fully working)

Thank you @zodyking this helped me a lot with getting my notification automations in node-red where email notifications couldn’t send to sms reliably. Question, for node-red, is there a way to get events on messages received from anyone without creating a contact?

:slight_smile:

Also i havnt used this with node red, the unofficial api can get any inbound or outbound communications however for sake of how i intended to use the integration/security purposes i limited it to only the numbers registered as contacts because the integration allows you to create sms based triggers to run automation in your home.

The triggers run against all registered contacts, instead of just anyone who text the phrase to the text now number.

I’d like to hear if this solution would fit my needs. I currently only need to send SMS to neighbors when the house alarm is triggered, which is rare. I previously used cell-carrier’s smtp to sms gateways, but I just learned most carriers have discontinued their email-to-text services. I don’t know if Textnow is a solution for such rarely-used functionality, especially if the account sits unused for several months at a time. Thoughts?

it would, just 2 draw backs

  1. You will need to maintain the number not sure duration of time before number reassign (simple just send sms to you self at least once a month minimum i assume.
  2. I contacted textnow for official use of their api still no response yet so what currently happens is it works for 2 weeks then your account get banned as it detects strange activity (usage of platform without actual login session from app or web browser) so all i do is keep making new accounts.

Thanks @zodyking for your work on this. It appears their free tier is supported by pushing ads on their web and mobile clients. If that’s the case I might suggest our hopes of API access is marginal. Looking more and more like the only stable and reliable solutions will require a monthly fee :disappointed_relieved:

Does it give any details in the banning email on what the “strange activity” is? I am curious if you logged in to the browser occasionally, TextNow wouldn’t care as much that you are using your unofficial API