Yet another SMS notification driver. This one supports Telnyx.
I use both Twilio & Telnyx at home and at work. Both are international carriers with global support. If you haven't aren't familiar with one, you probably know the other. They have similar base prices for a DID (phone number) but Telynx SMS rates (as of this writing) are about half of Twilio's ($0.0025 USD per SMS message). I use Telnyx for my primary VoIP transport with Twilio as a backup route.
The basis for this driver came from @ritchierich's Twilio driver set. As such, it also has a parent driver that creates child notification devices. You only need to configure the parent once no matter how many SMS recipients you may have.
Alphanumeric Senders are supported. This negates the need for an outbound phone number and allows you to have your messages come from "Hubitat" or "The House" instead of a number. Unfortunately, alphanumeric senders are not supported in the US or Canada.
To use this driver set:
Create a Telnyx account if you don't already have one. That link contains my referral code which will give you a $20.00 credit. That should cover a phone number and about a 100 SMS messages a month 18 months. You don't have to use that link but that's a lot of free trial time!
FULL DISCLOSURE:I get a referral credit as well.
Purchase a local phone number and/or create a messaging profile if you don't already have one:
Copy your API Key:
Add both the [SMS container and SMS Device drivers] manually (Hubitat/Drivers/Telnyx at main · MHedish/Hubitat · GitHub) to your HE hub or via the Hubitat Package Manager (recommended).
Create a new virtual device, selecting
Telnyx SMS Containeras the type and then save the device:
Select the newly created device from your device list and then paste your Telnyx API Key from your Telnyx account. If you intend to use an Alpha Sender, move the slider. Click on
Save Preferences. Once you do this, the driver will validate your API Key and retrieve each of the phone numbers associated with your account and/or the Messaging Profile IDs if you chose to use an Alpha Sender:
Select the phone number or profile you wish to use and click
Enter a child
Device Labeland destination phone number and click on
Create Device. The destination phone number must be entered in E.164 format (e.g. US and Canada: +18005550101, Cyprus: +35790863899). You can change the destination number directly in the child device without deleting and recreating the device if you ever need to change that number. No need to redo your rules or pistons.
You can create multiple child notification devices from the same page. Each will use the same Telnyx API Key and sender information.
Once the child devices are created, you can add them as notification devices in Rule Machine, webCoRE, HSM, etc.
I haven't added text-to-speech capability to the driver yet. It's not something I would use and, unlike Twilio, Telnyx doesn't have their own server to support the necessary XML. It could be set up with other free services (e.g. Uguu or Heroku) but that's would end up with a more complicated configuration. If there's enough demand, I'll take another look at adding TTS capability.