Cisco Webex (formerly known as Webex Teams) is used for collaboration in many organizations. If you're already a Webex user it just makes sense to bring your Hubitat notifications into the app. Even if you're not a Webex user, this driver will work with a free account.
Setup Instructions:
If not already using Webex, sign up for an account at https://teams.webex.com. Enter your email address and if you don't have an account and your domain name is an enterprise customer already, you will receive an email to activate your account. Activate it, set a password, set your display name. Click on Try Messaging to begin.
Create a bot account at https://developer.webex.com. You'll have to sign in using your user account (that you set up in step 1 if not already on the platform.) Click on the link for Bots or otherwise create a new bot at https://developer.webex.com/my-apps/new/bot. It will require a globally unique username. Upload a cool icon, or use one of the defaults. Take note of the username (your_bot_name@webex.bot) as well as the Bot API access token.
Create a space that you will use for your notifications. You'll probably want to install the mobile and/or desktop client(s) on your devices. Once in the app with a space created, invite your bot from step 2 to the space using the three-dot menu in the space.
Navigate to Rooms - List Rooms | Cisco Webex for Developers. If your browser is still logged in to the Webex platform you'll see your initials up top. If not, log in. On the right hand side of this API reference change the Authentication to use the bot's API token (1 & 2 in image) then run the command. From the response section at the bottom, identify the room you added your bot to. Copy the ID (3 in image) and store it somewhere.
Add the two drivers (the parent and the device) to your HE hub (Drivers Code).
Create a new virtual device and set the type to Webex Parent and Save Device.
Enter the API auth token for your bot and press Save Preferences.
In the create device command, provide a label for your notification room on Webex and supply the room ID that you captured in step 4.
From here you can use the notification device in Rule Machine, webcore etc.
The driver can be found here:
Special thanks to @ritchierich for his Twilio driver used as the base for this driver.
To-do:
I would like to automate step 4 (and maybe step 3) at some point but the extra steps are one-time-only. Will invest the time if it turns out a lot of people use this driver and if feedback indicates the extra steps are onerous.
That would be cool, reminds back in my openhab days and the XMPP chat type stuff you could do. @doogles just curious what examples would you use it for since you can remotely use dashboards ?
Interested to hear the use cases as well. At one extreme a full blown chatbot could be implemented to interpret commands and perform actions. Webex has 'cards' functionality that could be applicable for menu based operations too. But these possibilities seem at first thought like they'd be reimplementing things already done elsewhere.
I think if I were to try a chatbot, it would be implemented with an intermediary service in the cloud, sitting in the middle of the WebEx and Hubitat APIs.
Ok, so I had some time to think about the "use case" question. I originally sat silent on this because at first I agreed that there's 100 other ways to control Hubitat that seem more sensible. That said, I came up with a real-world use case:
I'm doing all notifications using Webex, now. While there are other ways to notifications to me, I like the inherent history & timestamps that sending the notifications in Webex provive.
I would love the ability to respond with a keyword or two in order to drive certain actions -- such as replying "OFF" and "ON" or "SNOOZE" to turn the notifications on and off, or simply temporarily shut them up. In practice in my environment, this would simply mean being able to act on select replies in the Webex space. In my environment specifically, the "OFF" and "ON" examples would ultimately drive a "Global Notification Mode Enabled" switch which my rules check before sending anything to Webex.
That said, I suspect receiving anything back from the Webex space would be a lot more complex than what the driver is doing right now, so indeed maybe not worth it. Maybe I just use a IFTTT "Do" button on my phone to toggle the switch.
Thanks for taking the time to write it up! To send a message to the Webex bot would require registering a webhook listener which is why I indicated the code would have to be implemented in the middle somewhere. eg. a cloud function to receive the "off" command and then process it. The control path back to Hubitat would probably have to be Maker API cloud endpoints to take the necessary action.
I agree that this would be pretty cool and convenient too.
The next thing we need is for Cisco to give us the ability to select different notification sounds depending on which space had activity.
I do like how you can change spaces notification behavior (@-mentions only, All) but that's only half the battle: Since I use Webex for work, I now get the same sound regardless of if the notification is re: work or Hubitat. I don't know if I need that level of additional stress in my life.
I agree with the notification sound selection, that would be cool ... I hear it's coming Q4 (sorry just kidding... It's kind of a running joke about Cisco features that never come to life).
For this reason I have started looking at moving my hubitat notifications over to telegram since I'm using for a few other home network things.
I've been "a Cisco guy" for 22 years, now; you're 100% right.
My favorite Cisco move, though, is this:
Cisco will invest in a product, and after a handful of years they will get it to ~80% of where the product needs to be. But then they acquire some company and decide THAT product is the new, shiny object that is the future. So they abandon the almost-there 80% product, start investing in the 20% product .. lather, rinse, repeat.
I won't complain too badly about them, though, since that's how I make a living.
Might be time to consider an alternate application as you suggest; Pushover or whatever.
Yes, I have been able to get this one to work with MS Teams. You have to set up a webhook integration on a MS Teams channel first to get the webhook URL. You can then use it with the notifier below. The only difference is that this device shows up under "Audio" notification devices. I am planing to rebuild it, but I'm not that knowledgeable about HE yet. [Release] Webhook Notifier