On this page
article
C2notify
The C2NOTIFY
command sends a notification to the Cloud C² server (if one is connected). This will appear on the Cloud C² dashboard.
Options
C2NOTIFY
expects two options: the type of notification, and the message itself.
C2NOTIFY INFO some message
C2NOTIFY ERROR some more severe message
Experimenting
You can experiment using the C2NOTIFY
command live, either in the Web Shell in the web UI, or via ssh
!

Using the C2NOTIFY command in the Web Shell
Examples
#!/bin/bash
#
NETMODE NAT
LED C SINGLE
BUTTON
C2NOTIFY INFO "The button was pressed!"
LED B TRIPLE
A more advanced payload using conditionals to check if the button was pressed:
#!/bin/bash
#
NETMODE NAT
LED C SINGLE
BUTTON 3 && {
C2NOTIFY INFO "The button was pressed!"
LED W SOLID
} || {
C2NOTIFY ERROR "The button was not pressed!"
LED R DOUBLE
}