[Release] Virtual Message Notification Device

The Virtual Message Notification Device driver provides a place to receive and store textual notifications from Hubitat apps and rules. While receiving the notification, some date/time simplification formatting occurs, and optional HTML formatting can be applied. The final message, through a device attribute, can then be used by a rule to send notifications to announce on a TTS device, or send a text or push notification.

Hubitat does not accept < or > in UI text fields. However, apps and drivers can add and manipulate strings with those characters. The driver "translates" sudo-markup, such as used by the community Pushover driver and/or BBcode, into HTML formatted strings.

This driver was originally created to clean up a list of supplied calendar entries, simplify the date/time display, add HTML formatting, and then provide a place to hold the message before getting sent through Pushover.

Use Case Ideas

  1. Grabbing multiple upcoming events from a calendar, cleaning up date/times for readability, add HTML formatting, and then sending as a push message.

  1. Grabbing multiple upcoming events from a calendar, cleaning up date/times for audibility, and then sending a notification to a TTS device.

Jan 19, No School - Martin Luther King Jr. Day, Jan 20, Test JFK Event, Jan 21, Pretzel Forms Due by 9 am, Jan 21, 7-8 pm, PTA Meeting

Installation

Currently, manual installation by importing the driver code. Considering HPM in the future.

https://raw.githubusercontent.com/neeravmodi/Hubitat/refs/heads/main/Drivers/virtual-message-notification-device.groovy

Preferences / Configuration

  1. Use HTML Encoding
  2. Use Pushover encoding
  3. Colorize 'color' words
  4. Use BBCode Encoding

Attributes that can be used in rules

  • message
  • messageRaw

Limitation

This is a virtual notification device for receiving the message. A simple rule is still needed to send the message to required devices.

I'm not a formally educated programmer. Comments and suggestions welcomed.

6 Likes

(reserved for future use)