[Release] Join Api Notification Driver

As updates are posted, changelog can be found here.

If you use an android phone and utilize Tasker at all, you may want to play with the Join app. It's tasker integration opens up a realm of possibilities. Thanks to a nudge from @cwwilson08 I gave Join another shot and now I'm hooked. As a result I have expanded my Join API Driver (based on the work @ogiewon and I did with the original Pushover Driver) to include many more options from the API. Below are just a few of the options available.

Device Notification:

  • Custom icon for the status bar.
  • Custom notification sounds.
  • Ability to send SMS text messages as well as messages directly to the Join app.*
  • Send an image to display in the body of the notification.
  • If enabled, open any app on your phone by app name or app package name.
  • If configured, can display actionable links in the notification (actions include but not limited to: run a Tasker task, open a url,send files, send TTS, Send Phone Location, Ring Phone)
  • All of the above can also be displayed as actionable links in the notification itself.

Speak (TTS):

  • Using the Speak() command, you can send TTS messages to any of your integrated android devices or computers.

NodeRed:

  • NodeRed integration opens up that DEEP rabbit hole as well. Flows can be triggered by Join events and can also trigger Join actions.

This and MUCH more can be configured depending on the options you chose. There are too many possibilities to list (essentially any Tasker item can be initialized through HE) but for details on the api please see here.
I have not incorporated all of the API functions, but included all the components I felt were applicable for use with Hubitat.

*SMS messages will be sent TO the number chosen in the "Phone #" preference and will come FROM the phone selected in the "Device" preference.

The API tools allow you to test most configurations beforehand. If it didn't work using the API tools linked above, it won't work from Hubitat. Please test using the tool before requesting changes in this thread.

Driver Code:

Hubitat/drivers/Join API Driver/Join API Driver.groovy at master · stephack/Hubitat · GitHub



Actions can be entered in to the Actions input (each separated by a comma), but can also be configured inline with the message.

Inline Customization:
You can dynamically change or set preferences using the structure below:

messageTextHere[A]action1,action2,action3...[D]device1,device2,device3[T]title[C]category[S]phone#

All inline settings will override the pre-configured setting in the driver. They can be listed in any order as long as the messageText is first.



A few of my NodeRed and Hubitat notifications:

The actions at the bottom (Vpn, Grafana, etc) open weblinks and execute various Tasker tasks related to that notification.

A quick guide to settings up actionable notification items that run Tasker tasks can be found here.



Status bar with notifications from 2 sources, Hubitat and NodeRed (easily distinguishable):

11 Likes

Update 6/11/19:
v1.0.20190611a

  • fixed sms bug
  • added Notification Icon (if Status Bar icon is not set, this will set the image to both notification and status bar icon)


Update 6/08/19: (Important..see last paragraph if updating from an older version)

  • added option for notification category (allows for custom notification settings based on category...ringtone, silent, minimized,etc)
  • switched to asynchronous http calls for efficiency
  • switched to POST instead of GET requests for added security (apikey sent in the body rather than in the URL).

Expanded inline customization to include

  • [A] Actions
  • [T] Title
  • [D] Devices
  • [C] Category
  • [S] Sms Phone #

You can dynamically change or set preferences using the structure below:

messageTextHere[A]action1,action2,etc[D]device1,device2,etc[T]title[C]category[S]phone#

All inline settings will override the pre-configured setting in the driver. They can be listed in any order as long as the messageText is first.

Unfortunately, if updating from an older version, you will need to re-enter a few input fields. Please document your old settings (including your Api key) before updating to the new version.

1 Like

This is amazing. Lol I am so glad I finally convinced someone. I do believe many users will find this useful.

It also let's me reduce the many notification devices I have using my code. Thanks so much for doing this @stephack

2 Likes

Thank you for steering me in this direction again. I didn't think I could be convinced to spend $$ on another notification app but the Tasker/AutoApps/NodeRed stuff was too powerful to pass up. There were times when I would receive an alert, then would need to open connect to my VPN, then open the HE admin interface to do something. With the actionable notifications, I can do this all from the notification itself....great stuff.

Next mini project is to use this to Cast my TinyCam feeds to my GH Hubs and my Office monitor based on Motion/open/close events. Should be very easy now that I have them connected via Join. Loving the options so far.

1 Like

Thanks for this, it looks incredible. Are you able to document and share your NodeRed flow?

The rabbit hole is deepening!

Which flow?
The Watchdog is a variation of the one @btk shared.

The tank level is a custom Wemos D1 with an ultrasonic sensor that reports directly to node red.

Or were you asking how to get Join notifications out of node red?

1 Like

Yes. It's a little confusing for a Node red/Join newbie.

There is a Join node you can install using the Manage Palette option. Search for Join and you will see one (the second one I believe) that says Join joaomgcd. Once installed you would need to setup the config node with you Api key and I would recommend you go ahead and have it create a new Join device...that way you can send messages directly to Nodered as well as send push notifications out.

Before digging too deep I would definitely play with the Api tool the developer provided so you can understand how the different options work together. Go here and click on the Join Api button to send test notifications to your devices.

Once configured you can do simple notification using the inputs in the Join message node

For more advanced configs you would need to setup a function node or a change node (I prefer change) before the Join node to set the respective API options. Here is the change node I fill out as needed. You can import it and set the values as needed.

[
    {
        "id": "b64341c8.b0dd8",
        "type": "change",
        "z": "1162bb2f.9e0155",
        "name": "Join Push Config",
        "rules": [
            {
                "t": "set",
                "p": "devices",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.text",
                "pt": "msg",
                "to": "payload",
                "tot": "msg"
            },
            {
                "t": "set",
                "p": "push.title",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.category",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.smallicon",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.image",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.icon",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.actions",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.say",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.sounds",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.find",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.app",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "push.appPackage",
                "pt": "msg",
                "to": "",
                "tot": "str"
            },
            {
                "t": "delete",
                "p": "payload",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1055,
        "y": 320,
        "wires": [
            []
        ],
        "l": false
    }
]

The flexibility of this can't be understated IMO. With the ability to communicate with tasker and a pi the sky is the limit on the automations that can be created.

I've been using @cwwilson08's driver for a while now and absolutley love it. The actionable notifications are amazing. Using the maker API i'm able to disarm HSM right from within the notifcation that the alert has gone off.

1 Like

@stephack's final creation should blow my modifications out of the water..

Awesome use case @Ryan780.
I'm in the process of updating the driver to allow more on inline customization as well as a few refinements. If you are interested in trying the update, I wouldn't bother with what is in my github right now. I'll be posting an update today that makes quite a few changes but would also require you to update every instance of the driver (I changed a few input names to match the api). If you only have one instance then it's not a big deal.

The actionable nature of the notifications is something that would have been great for the native Hubitat app notifications to use. I'm disappointed they didn't.

I am hoping we will see increased functionality in this area in the future as well. For now I love join and the other apps so this will work.

I only have 5, so it wouldn't be too bad. I'll definitely take a look.

The other thing to note is the ability to put your actions as a Quick Tile. For me, from the quick settings area on my phone I can disarm or arm HSM.

That's available without even using the notifications part.

@Ryan780, @cwwilson08
I posted the update (v1.0.20190608) to Github. Please see the second post in the thread for changes.

1 Like

It looks really good!

Are you able to place some examples of the message format for the examples above please. I'd like to know how you get the two or three options at the bottom of the notification. I'm unable to figure it out without a working example. Thanks!

Edit: @mike please see below. Hopefully it is helpful. The built in actions are a lot simpler so I don't think they need their own guide. Below is a semi-complex example but once configured, you can easily add as many custom Tasker actions as needed in less than a minute.