GUI-O PUSH NOTIFICATIONS
Push notifications are urgent and personal alerts that appear on a user's mobile device even when the GUI-O application is not actively in use. Additionally, if the mobile device is offline, push notifications will be delivered once an internet connection is re-established. This ensures that users always stay informed about the status and performance of their connected devices.
NOTE: Push notifications feature is only available in PRO version (minimal required version of GUI-O application is v1.0.61).
Page contents
How do GUI-O push notifications work?
GUI-O push notifications are based on FCM (Firebase Cloud Messaging) in conjunction with our server. A unique Firebase token is generated and is stored on our server along with the application's universally unique identifier (UUID). The UUID is used to send push notifications to a specific recipient through our server using a simple HTTPS request. For additional information, see Push notifications done properly section in the manual.
IMPORTANT NOTE: GUI-O application never retrieves any personal information! Only the Firebase token and application UUID is stored on our server. When re-installing GUI-O application (or application clearing data) a new Firebase token and UUID are generated.
Never share your application UUID with a third party. You can revoke and regenerate the application UUID by clearing the GUI-O application data or reinstalling the application.
GUI-O push notifications principle of operation
GUI-O & Postman tutorial
The following tutorial shows how to quickly test GUI-O push notifications feature without any additional hardware. In this example, Postman platfrom is used, but any other platform capable of creating POST requests is suitable for testing.
Prerequisites
Download Postman
Download GUI-O Postman collection
Step 1: Retrieve application's universally unique identifier (UUID)
Open GUI-O application, navigate to settings and select "Info"
Verify that the text "Available" is displayed under "Push notifications" entry
Make a note of "Application UUID" (you can share the "Application UUID" by tapping on it)
Step 2: Create push notification request
Install Postman for your operating system and create a free account
Open Postman, select "File -> Import" and import GUI-O Postman collection
Select sendPushNotification POST request and click on "Body" tab
Set your "Application UUID" (retrieved in Step 1)
Press "Send" button to create a push notification request
Wait for the push notification to appear on your Android device
GUI-O basic push notification example
The following example shows how to create a HTTPS push notification request using the Arduino environment. Of course, any other device that is able to make HTTPS requests can be used with GUI-O push notifications framework.
Prerequisites
Download Arduino IDE
Open Arduino IDE and add support for your board (board should support WiFi)
Install "ArduinoJson" using the library manager
Download BasicPushNotification.zip and extract the archive
Step 1: Retrieve application's universally unique identifier (UUID)
Open GUI-O application, navigate to settings and select "Info"
Verify that the text "Available" is displayed under "Push notifications" entry
Make a note of "Application UUID" (you can share the "Application UUID" by tapping on it)
Step 2: Modify and upload the code
Open Arduino IDE
Select "File -> Open"
Navigate to location where BasicPushNotification.zip archive was extracted
Select BasicPushNotification.ino and confirm
Set your router name and password
Set your "Application UUID" (retrieved in Step 1)
Make sure that your board is connected to your PC
Ensure that the correct port and baud rate are selected
Press upload button to start code upload
Step 3: Send a push notification
Open any serial terminal and connect to your board (baud rate 115200)
Enter your push notification message on the serial terminal - the text must be terminated with the \n (new line) character.
Observe the response on the serial terminal - if successful, message "Push notification sent" will be displayed
Check the push notification on your Android device
NOTE: Customize the sound, vibration, LED light, and priority of GUI-O app notifications by navigating to "Android settings -> Apps -> Manage apps".
ESP32 & Arduino & GUI-O push notifications
The ESP32 examples can be easily expanded to also include push notifications. Follow the instructions to setup the board and libraries required for the ESP32 MQTT example first, then see the steps below.
Step 1: Retrieve application's universally unique identifier (UUID)
Open GUI-O application, navigate to settings and select "Info"
Verify that the text "Available" is displayed under "Push notifications" entry
Make a note of "Application UUID" (you can share the "Application UUID" by tapping on it)
Step 2: Create tokens for MQTT communication
Open GUI-O application and select "Add" from the top-right corner of the home screen
Select "IoT (Create device)" and add a new device (specifying arbitrary name and optional user name)
After adding a device, note the In and Out tokens which are required in the following step (tokens can be shared via email by pressing the "Share" icon)
Step 3: Modify and upload the code
Download BasicMQTT_SSL_TLS_PushNotification.zip and extract the archive
Open BasicMQTT_SSL_TLS_PushNotification.ino using Arduino IDE
Set your router name and password
Set your "Application UUID" (retrieved in the Step 1)
Set the In and Out tokens generated in Step 2
Make sure that your board is connected to your PC
Ensure that the correct port and baud rate are selected
Press upload button to start code upload
Step 4: Using GUI-O application to interact with ESP32
Open GUI-O application and select "Connect" from the top-left corner of the home screen
Tap on the device created in Step 2
Wait for successful connection and try the example
Set the light brightness below 20% to trigger the push notification
Connect . Create . Control