New-AwtrixNotification
SYNOPSIS
Creates an AwtrixNotification object for deferred or reusable dispatch.
SYNTAX
New-AwtrixNotification [[-Text] <Object>] [-TextCase <Int32>] [-TopText] [-TextOffset <Int32>] [-Center]
[-Color <Object>] [-Gradient <Array>] [-BlinkTextMilliseconds <Int32>] [-FadeTextMilliseconds <Int32>]
[-Background <Object>] [-Rainbow] [-Icon <String>] [-PushIcon <Int32>] [-Repeat <Int32>]
[-DurationSeconds <Int32>] [-Hold] [-Sound <String>] [-Rtttl <String>] [-LoopSound] [-Stack] [-Wakeup]
[-Clients <String[]>] [-NoScroll] [-ScrollSpeed <Int32>] [-Effect <String>] [-EffectSettings <Hashtable>]
[-Bar <Int32[]>] [-Line <Int32[]>] [-Autoscale] [-BarBackgroundColor <Object>] [-Progress <Int32>]
[-ProgressColor <Object>] [-ProgressBackgroundColor <Object>] [-Draw <Array>] [-Overlay <String>] [-Send]
[-BaseUri <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Returns an [AwtrixNotification] object that holds all properties of a one-time AWTRIX notification. Call .Send() when you're ready to dispatch it, or pass -Send to dispatch immediately.
Storing the object lets you build reusable notification templates that can be cloned and customized without reconstructing every property each time.
EXAMPLES
EXAMPLE 1
$alert = New-AwtrixNotification -Text 'Alert!' -Color Red -Sound 'alarm' -Hold
PS> $alert.Send()
Builds a reusable alert notification and sends it on demand.
EXAMPLE 2
$template = New-AwtrixNotification -Icon 'warning' -Color '#FF0000' -DurationSeconds 5
PS> $disk = $template.Clone(); $disk.Text = 'Disk full!'; $disk.Send()
PS> $net = $template.Clone(); $net.Text = 'Network down!'; $net.Send()
Template pattern: clone a base notification, customize text, send.
EXAMPLE 3
New-AwtrixNotification -Text 'Done!' -Rainbow -Send
Inline: create and immediately send.
PARAMETERS
-Text
The text to display. A simple string or an array of colored fragment objects created by New-AwtrixTextFragment.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TextCase
0 = global setting, 1 = force uppercase, 2 = show as sent.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-TopText
Draw text on top of the display.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-TextOffset
X-axis offset for the starting text position.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Center
Centers a short, non-scrollable text.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Color
Text, bar, or line color. Accepts a named color, hex string, or RGB array.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Gradient
Colorizes text in a gradient of two colors.
Type: Array
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-BlinkTextMilliseconds
Blinks the text at the given interval in ms.
Type: Int32
Parameter Sets: (All)
Aliases: BlinkTextMs
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-FadeTextMilliseconds
Fades the text on and off at the given interval in ms.
Type: Int32
Parameter Sets: (All)
Aliases: FadeTextMs
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Background
Background color.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Rainbow
Fades each letter through the entire RGB spectrum.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Icon
Icon ID, filename (without extension), or Base64-encoded 8x8 JPG.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PushIcon
0 = static, 1 = moves with text once, 2 = moves with text repeatedly.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Repeat
Number of times the text scrolls before the notification ends.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-DurationSeconds
How long the notification is displayed in seconds.
Type: Int32
Parameter Sets: (All)
Aliases: DurationSec
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Hold
Keep the notification on screen until dismissed via the middle button or Clear-AwtrixNotification.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Sound
RTTTL ringtone filename (no extension) from the MELODIES folder, or a 4-digit DFplayer MP3 number.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Rtttl
Inline RTTTL sound string played with the notification.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LoopSound
Loop the sound or RTTTL for the duration of the notification.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Stack
Stack this notification (true) or immediately replace the current one (false).
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Wakeup
Wake the matrix if it is off for the duration of this notification.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-Clients
Additional AWTRIX device IP addresses to forward this notification to.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoScroll
Disables text scrolling.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ScrollSpeed
Scroll speed as a percentage of the original speed.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Effect
Background effect name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-EffectSettings
Hashtable to change color and speed of the background effect.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Bar
Bar chart data.
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Line
Line chart data.
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Autoscale
Auto-scale bar and line chart axes.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-BarBackgroundColor
Background color of bar chart bars.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Progress
Progress bar value 0-100.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-ProgressColor
Progress bar foreground color.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressBackgroundColor
Progress bar background color.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Draw
Array of drawing instruction objects.
Type: Array
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Overlay
Effect overlay: clear, snow, rain, drizzle, storm, thunder, frost.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Send
Dispatch the notification to the device immediately after creating the object.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-BaseUri
Base URI of the AWTRIX device. Overrides the module-level connection.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.