LogoLogo
GitHubBlynk WebsiteLogin to Blynk.Console
  • Introduction
  • Getting Started
    • Supported Hardware
    • Quickstart
      • Next Steps After Quickstart
      • Quickstart Device: Code Overview
      • Troubleshooting
    • Device Activation Methods
      • Manual Device Activation
      • WiFi provisioning
      • Static Token
    • Template Quick Setup
      • Set Up Datastreams
      • Set Up Web Dashboard
      • Set Up Mobile App Dashboard
      • Prepare Your Code
      • Test your Template
    • Send Data From Hardware To Blynk
    • Control Devices (GPIOs and beyond)
    • Events
    • Notifications (Alerts)
    • Sign Up / Sign In
  • General Concepts
    • Developer Mode
    • Device
    • Device Template
    • Connection Lifecycle
      • Disconnections And Heartbeat
    • Users
      • Multi-tenancy
    • Organizations
    • Automations
      • Forward Device Data
  • Message Usage
  • Integration Guides
    • Node-RED
    • The Things Stack
      • Getting Started
      • Device Grouping
      • Automated Device Onboarding
      • System DataStreams
    • Blues
    • NCD Industrial Vibration Sensor
    • Particle - monitor with Blynk
    • Particle - control with Blynk
    • AWS IoT Core
  • Myriota
  • OpenWeather
  • Blynk.Console
    • Overview
    • Dashboards
      • Dashboard Widgets
    • Devices
      • Device profile
        • Dashboard
        • Device Info & Metadata
        • Notifications & Events
        • Developer tools
          • General
          • Datastreams
          • Testing
          • Actions Log
      • Actions with devices
      • Segments
      • Filters
      • Notifications Settings
      • Device Sharing
    • Locations
      • Location Profile
      • Assigning Devices to the Locations
    • Organizations
      • Create a Sub-Organization
      • Working with Sub-Organizations
    • Users
      • User Profile
    • Device Templates
      • Working With Templates
      • Info
        • Offline Ignore Period
        • Manufacturer
        • Template ID
        • Categories
        • Hotspot Prefix
      • Datastreams
        • Datastream Settings
          • Name
          • Alias
          • Virtual Pin
          • Color
          • Data Type
          • Min Value
          • Max Value
          • Default Value
          • Save RAW Data
          • Invalidate Value
          • Wait for confirmation from device
          • Sync with latest server value every time device connects to the cloud
          • Expose to Voice Assistants
        • Virtual Pin
        • Location
        • Enumerable
      • Web Dashboard
        • Multiple Dashboard Tabs
      • Metadata
        • Metadata Tutorial
      • Connection Lifecycle
      • Events
        • Custom Events
          • Event Settings
          • How to Send/Log Events
          • Content Events
        • Notifications Settings
          • Custom Sounds and Critical Notifications
      • User Guides
      • Assets
    • Widgets (Console)
      • Switch
      • Slider
      • Number Input
      • Image Button
      • Web Page Image Button
      • LED
      • Label
      • Gauge
      • Chart
      • Map
      • Image Gallery
      • Custom Chart
      • Heatmap Chart
      • Video
      • Bitmask Table
      • Gradient Ramp
      • Terminal
      • Segmented Switch
      • Alarm & Sound Widget
      • Modules
    • Blynk.Air
      • Shipment Details
      • Shipment Management
        • New Shipping
      • Device shipment statuses
      • User-Controlled Shipments
    • Settings
      • Organization Settings
        • General
        • Users
        • Locations (Job Site or Facilities)
        • Tags
      • Roles and Permissions
      • Developers
        • OAuth2
        • Webhooks
        • Create New Webhook
      • Integrations
    • User Profile Menu
    • Limits
  • Blynk.Apps
    • Overview
    • Mobile Dashboard Editor
    • Device Header Constructor
      • Header Design
      • Header Mini Widgets
        • Connection Status Widget
        • Last Reported Widget
        • Tabs Widget
        • Datastream Value Widget
        • Image Widget
        • Battery Level Widget
        • Signal Level Widget
        • Tags Widget
      • Header Buttons
    • Pages
    • Widgets (app)
      • Common Widget Settings
      • List of Datastreams types supported by Widgets
    • Widgets Controllers
      • Button
      • Styled Button
      • Icon Button
      • Image Button
      • Slider
      • Vertical Slider
      • Step Slider
      • Vertical Step Slider
      • Joystick
      • zeRGBa
      • RGB Light Control
      • Step H
      • Step V
      • Slope Control
      • Switch
      • Level Slider
      • Level Slider with Switch
    • Widgets Displays
      • Value Display
      • Labeled Value
      • LED
      • Gauge
      • Radial Gauge
      • Enhanced Gauge
      • LCD
      • Simple Chart
      • SuperChart
      • Terminal
      • Video Stream
      • Level H
      • Level V
      • Image Gallery
      • Gradient Ramp
      • Icon
      • Image Animation
      • Lottie Animation
    • Widgets Interface
      • Tabs
      • Menu
      • Map
      • Text Input
      • Numeric Input
      • Time input
      • Segmented Switch
      • Icon Segmented Switch
      • Text
      • Formatted Text
      • Dynamic Spacer
    • Widgets Other
      • Music Player
      • WebPage Button
      • WebPage Image Button
      • Alias Name
    • Main Menu
      • My Profile
      • Organization
      • Settings
      • Help
      • About
      • Log Out
    • Devices
      • Add New Device
    • Automations
    • Notifications & Events
  • Blynk.Edgent
    • Blynk.Edgent overview
    • Blynk.Inject and Blynk.Air
    • OTA: Firmware Over-The-Air updates
  • Blynk.NCP
    • Blynk.NCP overview
    • Supported Connectivity Modules
    • OTA: Firmware Over-The-Air updates
  • Blynk Library - firmware API
    • Installation
      • Install Blynk Library in Arduino IDE
      • Install Blynk Library for Platformio.org
      • Install ESP8266 core for Arduino IDE
    • Configuration
    • Connection Management
    • Device Online/Offline Status
    • Digital/Analog Pins
    • Virtual Pins
    • Widget Properties
    • State Syncing
    • Timers
    • Time (RTC clock)
    • Timezone / Location
    • Log Event
    • Metadata
    • Debug
    • Reboot
    • Over-The-Air Firmware Updates (OTA)
    • Other
    • Limitations and Recommendations
    • Blynk Protocol
  • BLYNK.CLOUD MQTT API
    • Device MQTT API
      • Authentication
      • Topic Structure
      • Datastreams
      • Widget Properties
      • Events
      • Metadata
      • Timezone/Location
      • OTA
      • Miscelaneous
      • Code Examples
  • BLYNK.CLOUD HTTPS API
    • Device HTTPS API
      • Get Datastream Value
      • Get Multiple Datastream Values
      • Get Historical Data From Device
      • Update Datastream Value
      • Update Multiple Datastreams Simultaneously
      • Upload a Set of Timestamped Data
      • Update Widget/Datastream Property
      • Send/Log An Event
      • Get Device Metadata Value
      • Update Device Metadata Value
      • Is Device Connected
      • Upload a File
      • HTTPS API Troubleshooting
    • Platform API
      • Authentication
      • Ogranization API
        • Get Own Organization Info
        • Get Organization Info
        • Search Organizations
        • Create Organization
        • Get Static Tokens
        • Get Organization Tags
        • Get Organization Automations
      • Devices API
        • Get All Devices
        • Search Devices
        • Get Devices by Owner Email
        • Get Devices in user organization
        • Get Recently Activated Devices
        • Get Device Info
        • Get Connection Status
        • Create Device
        • Edit Device
        • Get Datastream Values
        • Update Datastream Value
        • Update Multiple Datastreams Values
        • Import Datastream Values
        • Update Datastream Property
        • Get Datastream Historical Data
        • Get Device Metadata
        • Update Device Metadata
        • Get Device Tags
        • Get Device Timeline Log
        • Log a Device Event
        • Get Actions Log
        • Erase All Data
        • Remove Device Owner
        • Transfer Device
        • Delete Device
      • Users API
        • Get All Users
        • Search Users
        • Create New User
        • Invite User
        • Get User Info
        • Update User Role
      • Templates API
        • Get All Templates
        • Get Template Info
        • Get Template Metadata
        • Get Template Datastreams
        • Get Template Events
    • Security
  • Downloads
    • Blynk Mobile Apps
    • Blynk Library
  • Troubleshooting
    • General Issues
    • Developer Mode
    • Changes from Blynk 0.1
      • Migrating to the new Blynk - Full Guide
    • Glossary
    • Links
  • Commercial Use
    • Deploying Products With Dynamic AuthTokens
    • Deploying Products With Static Tokens
    • Working With Clients
    • Supported topologies
    • Business Plan (White Label Solution)
      • App Publishing Process And Timeline
      • What's Needed To Publish Your Apps And Go Live
      • Branding Materials
      • Custom Email Address For Transactional Emails
      • Application Settings
        • General
        • Design
        • Mobile Apps
        • Sign Up
  • Add-Ons
    • Add-on list
    • Amazon Alexa
    • Google Assistant
    • Localization
    • Database Access
    • Marketing
Powered by GitBook
On this page
  • Status Types
  • Default Statuses
  • Custom Statuses
  • Settings
  • General
  • Notifications
  • Settings

Was this helpful?

  1. Blynk.Console
  2. Device Templates

Connection Lifecycle

PreviousMetadata TutorialNextEvents

Last updated 3 months ago

Was this helpful?

Connection Lifecycle helps you customize the default Online/Offline device statuses and/or add more specific statuses to accurately reflect what's happening with the device's Internet connection at the moment and adjust the dashboards' behavior accordingly.

For context, refer to the , which covers key use cases and the underlying processes.

Status Types

Default Statuses

There are two default connection statuses: Online and Offline with a timeout between them. These events can be customized, but can't be deleted.

When device connects to Blynk.Cloud (or transmits data), server immediately captures this and sets the device status to Online.

When device disconnects from the server, timer starts. When timeout is reached, server sets device to Offlinestatus.

Custom Statuses

You can add 2 more custom statuses and timeouts between them. Statuses will be applied automatically one after another based on the timeouts.

One custom status, Inactive, is pre-configured for you by default and can be altered or deleted if not needed. This uses one of the slots for custom statuses.

Let's imagine a device, that sleeps most of the time, but is expected to report data at least once during 24 hours. If the device doesn't report for 3 months, it is considered to be "No longer active".

  1. Online status is applied when the device connects to server and successfully reports data.

  2. After stage one is over the server captures disconnection and starts the timer. In 5 minutes the server automatically sets the device to Standby status. Your customers will understand that the device is not online, but is operating as expected and won't be concerned about it being Offline or not working. Set up a wait between Online and Standby to 5 minutes.

  3. The server is waiting for 24 hours for the device to connect and report data (become Online). If that doesn't happen, the server applies No Data Reported status. This is an indication for you and your customers that something is not working correctly. Set up a wait between Standby and No Data Reported to 24 hours.

  4. If there is no signal from the device for 3 months, the server applies No Longer Active status. Set up a wait between No Data Reported and No Longer Active to 3 months.

Settings

General

You can change name of any status and color-code it.

Choose names that are easy to understand. Set the colorcoding and the icon to reflect the nature of the status following known patterns. Online - green, Offline - grey. Be careful with red and orange colors as they can be interpreted as errors.

Log when device reports any data

This setting is designed for devices that periodically send data but are not continuously connected to Blynk Cloud. It is particularly useful for devices that use HTTP(s), cloud-to-cloud integrations, or other methods that do not rely on the Blynk library.

How It Works:

• When enabled, the device will be marked as Online once data is received.

• The device will remain in the Online status for the duration of the configured Wait Period, even if no new data is received.

• If no additional data is received within the Wait Period, the device status will transition to Offline.

This feature ensures that devices with intermittent connectivity still appear online while actively transmitting data, improving visibility and event logging within Blynk.

Notifications

When connection status changes, users can receive emails, SMS, or push notifications. Keep in mind, that notifications can be blocked by the users in smartphone settings.

Settings

Display

  • Show event in Notifications - add selected events to the general Notifications & Alerts section in Blynk apps. Access this page from the top menu on the home screen of the app.

  • Show on Device Timeline - add selected events to the device Timeline of the selected device in apps and Blynk.Console. Access this page from the top menu on the device dashboard in the app or using the Timeline tab of the device dashboard on the web.

Notification Limits

To control how often users get notified about specific events you can apply Notification limits.

Limit Period- limits the number of notifications to just one notification for a specified time period. Timer starts when first Event happened and notification sent.

❇️ Example: if you set 1 hour as a limit, end-users will only get one notification within 1 hour after the first event was recorded. No matter how many events are generated by hardware (or API calls) during one hour after that, no notifications will be sent.

Event Counter - notification will be sent only after a number of events was recorded. The counter starts when the first event happened. After the counter value was met, the counter resets to zero.

❇️ Example: if the counter is set to 50 and device sends 100 events, the user would only get 1 notification (every 51st event will trigger the notification).

You can also use Limit period and Event counter together.

❇️ Example: set Limit Period to 1 hour and Event Counter to 5.

  • When first event is recorded, the Limit Period timer starts and Event Counter starts

  • Device sends 100 events

  • When 6th event is logged, a notification is sent because counter value is met

  • No more notifications are sent because 1h limit is active

Please note that these notifications contribute to the overall event notification quota.

The current daily limit is 100 events per device. For Enterprise clients, this limit may be adjusted to meet their specific needs.

Custom Event Description

Interactions

Statuses set up in the Connection Lifecycle tab can modify the behavior of the device dashboard UI (except for online event) to provide feedback and avoid unwanted user actions. The following options are available:

  • Disable all dashboard widgets - all widgets on device dashboard will be disabled when the status is applied.

  • Disable control widgets - widgets that can accept user input (button, switch, text input, etc.) will be disabled.

Use this option when you don't want users to interact with the device. For example, when the device is offline.

  • Display notification on dashboard open - when users open the device dashboard, a pop up will show up for 3 seconds indicating the state, both on the web and mobile.

  • Display notification on interaction - when users try to interact with widgets, a banner will pop up, indicating that the device is in the certain status. You can still interact with widgets and change their state, however, on every interaction you'll get a banner with a warning. This option is the default for all newly created templates.

Default timeout is set to 1 minute, however, in real life the time when a device is marked 'offline' depends on how exactly device had disconnected. You can read more about various here.

If the device is Offline, but is implemented, the users will be able to change the parameters, but the changes will be applied when the device goes online.

disconnection scenarios
syncing to the latest server state
Device Connection Lifecycle
Template "Connection Lifecycle" section
Log when device reports any data
Connection Lifecycle events in the notifications section in a mobile app
Connection Lifecycle events in the device timeline
App with all widgets disabled
App with control widgets disabled