[No Longer Supported] Twilio Notifications Driver - Supports SMS and Voice Calls

thanks added both in prep of getting an account..

It looks like the parent c onfig automatically creates the children.

1 Like

I have been using Twilio Notification for some time on a very limited basis - and had thought I was using the community app version of this driver. I learned this AM I was using the hubitat provided version which has no exposed attribute for use in tiles - I wanted my dashboard tile to display the last sent message but selecting Attribute of the device in the dashboard tile exposes no choices.
I see some variations shown at the top of this post, are there any other variations not mentioned?

I don't really use dashboards but if you can guide me on your need, happy to update the driver to include what you want. Do you just need a "lastMsgSent" type attribute to be set every time a new message is sent? And for this to remain set until the next message? If yes that would be an easy thing to add.

woot! thats exactly the ask. Just want to be able to see what Twilio was sent, not by opening up my text messages, but by checking my phone dashboard (which I have on all the time ). Thanks for your attention!

Well to my surprise I had already defined a "lastMessage" attribute in the child driver but never used it in the code below. I just wired it up to create an event for that attribute and it will store the last message sent so you can show on your dashboard.

Code is available in my Git repo. Since you are using the stock driver, mine is a bit different in that I have a parent "container" that allows you to create child devices so they all leverage the same Twilio API credentials. You will have to recreate your notification devices after installing the code but then you can link your rules over to the new devices and then remove your old ones.

@jshimota I also added this driver to HPM in case you prefer to install it that way.

@kahn-hubitat hopefully your account finally got off the waitlist. I created a separate thread for the Plivo driver.

no i even emailed them again and no response.. guess i will give out and go back to twillio.. what a pain.

log in not working and when i try the resend activation email link which i never got.. i get the waitlist message again.. dont think i want to use them anyway if this is the kind of support we can expect. thanks anyway.

It's perfect. thanks
Hub dash
image

Thanks for adding this feature!

Wow that is terrible. Very sorry you are dealing with this.

@jshimota saw your pull request, thanks for that. Question, with your proposed HTML message attribute, will you still use the non-HTML one? I ask because it might be better to have a preference to add the HTML tags as an option to the lastMessage instead for those that will use it on a dashboard.

Interesting - I hadn't considered it being optional. The background on this comes from the Android Dashboard created by @jpage4500. It's now my singular app for display/control interface. His app has the ability to I.D. that a device tile is providing a content type of HTML. This in turn is 'cleaning' up tile problems for me all over the place!

I can imagine that some tile tools won't deal with it well while others will benefit immediately. Having both allows for both cases out of the box without user intervention. a good example is Moon Phase device driver by @thebearmay , which has a switch in the device preferences. When I toss the switch, my Android Dashboard is great but my HE dashboard gets squirrelly (a technical term!!). Ultimately tho, @jpage4500 coded full support for MoonPhase which is just insane on his part, but thats seems to be just how cool he is!

My 2 cents is run both, but I bow to your judgement of course. it's not heavy, codewise and stays out of the way for the most part. I will add that I took it further with my Meteorological Seasons app. I added the ability to colorize the text, including opacity/alpha channel, font size and word position. In that context I'm using a background image with text overlay. It looks decent on an HE dashboard and really nice on the Android.


image

1 Like

@jshimota Thank you again for the PR. I uploaded v1.1 to Github with these changes and updated HPM. I did make the htmlLastMessage optional via 'Enable HTML Message Events? ' device preference, default is disabled. I chose to do this to reduce driver events since for example some folks like me may never need this new attribute since I don't really use dashboards. Thanks again.

1 Like

you're a giant amongst men! thanks!

1 Like

Thank you for all the hard work on this. I have SMS working NP and I can do directly voice in the child device driver, but when I use rules machine, it insists on passing volume which seem to foul everything up. Note the 50 it passes below. "Rules machine Twilio test,,, 50". I am using the most current version of the container and Child (roughly 3 months old)

Any help would be appreciated

2022-03-05 05:51:16.020 pm errorgroovy.lang.MissingMethodException: No signature of method: user_driver_mlritchie_Twilio_Device_773.speak() is applicable for argument types: (java.lang.String, java.lang.Long) values: [Rules machine Twilio test,,, 50] Possible solutions: speak(java.lang.Object), sleep(long), every(), grep(), inspect(),

Sorry about that. Looked at the HE Documentation and see there are two optional parameters which I didn't account for in the driver. I have uploaded v1.3 to GitHub and HPM which will fix this issue. Volume isn't applicable for this so basically defaulted it to null and not using it.

1 Like

Thank you for the quick fix over the weekend! Only time I can work on this stuff. You Rock! Works Perfectly.

1 Like

@ritchierich

I would like to make a request if possible. Since Twilio is forced to make changes and all these new rules, I have switched to a toll free number as is bypasses a lot of the issues. However there are some requirements, one in particular. Each massage must state the business its being sent from, (How I reference it on their side) and I will be using my number with friends and family so we all use the same number.

But are you able to on the Container side made a field that we can enter in text, that is then added to the beginning of every text that is sent through. (With a return added after for new line)

This would allow me to easy meet the rules set forth by the carriers. All the other stuff I can handle differently if they accept my method of Oot-In and Opt-Out. (Which twilio believes should work) Its just the header that has to be there for every message to be compliant. (Not a separate message but part of the message)

Default Header (optional): ___________________

And then I would say:
Default Header (optional): Albert's Hubitat___________

And my rule or test text would be:
Device Notification: This is a test______

And the message that I would receive is:
Albert's Hubitat
This is a test

I hope this is something that can be done. Else I have to remember to add this to every text notification along with my friends and family and missing it could cause me to run into issues and fees.

I am still using a local number and everything seems to continue working. I don’t have an 800 number to test with. Do you have any links to the document requirements for what you are requesting? Curious if the API is different in Twilio, etc.

so as far as the driver and the way it works its the same for local and toll no difference, so it can be tested with local.

Also local will still work without anything being done (For now), however the carriers are enforcing new rules (Should have got email from twilio about requirements for local numbers.) If that is not done, the you risk being blocked by carriers and increases in fess from carriers. The increase already affected me, i was being charged for by carrier more than twilio was charging. (Carrier bills you twilio number)

Toll Free numbers avoid alot of the compliance and hoops to jump through, but have their own set of rules.