How to Send/Log Events

Send events using Firmware API

If you need to log an Event when the sensor detects temperature over a certain threshold:

  1. Create a new Event named High temperature with code high_temp

  2. Use the Blynk.logEvent(event_code) firmware API command to trigger new event

if (temperature > 35)

When this code worked, an Event will be logged and the system will act accordingly to the Event setup (render on timeline, send notifications, etc.)

Custom Event Description

You can change the description of the event when it's rendered on the timeline in Blynk.Console and in Blynk.Apps.

if (temperature > 35)
  Blynk.logEvent("event_code", String("High TemperatureDetected! Tº: ") + temp);

Make sure you enabled Timeline recording in the Event Settings to see the result in the apps

Send events using HTTPS API

To log an event use this request


description is an optional parameter where you can attach additional information to be rendered on the Timeline along with the event.

For example:

Last updated