Skip to content

[Tutorial] : Building a Smart Inventory System with Telegram Alerts Using Favoriot

Smart Inventory with Telegram Alerts | FAVORIOT Blog
FAVORIOT BLOG / PROJECT TUTORIAL

Build a Smart Inventory System with Telegram Alerts

Know what is running low before it disrupts your factory. Connect RFID or weight sensors, monitor stock in FAVORIOT, and notify your team through Telegram.

Tutorial concept · Based on the March 18, 2025 IoT World article · Connect • See • Act™

Stock shortages often become visible only when someone goes to the shelf and finds it empty. A connected inventory system helps your team see stock movement sooner and respond to low levels.

Inventory Sensor / Gateway FAVORIOT Telegram Alert
From physical stock to a timely notification: the complete monitoring loop.
RFID tags
or load cell
→
Arduino /
Raspberry Pi
→
FAVORIOT
dashboard
→
Threshold
check
→
Telegram
alert
What you will build

A prototype that collects stock-related readings, sends them to the FAVORIOT platform, displays their status, and triggers a Telegram notification when the measured quantity falls below a chosen threshold.

1. What you need

Hardware

  • MFRC522 RFID reader and RFID tags, or a load cell with HX711 amplifier
  • Arduino-compatible board or Raspberry Pi
  • Network connectivity, power and wiring

Software

  • Arduino IDE or Python
  • FAVORIOT platform account
  • Telegram bot and chat ID
  • HTTP or MQTT client

Choose the right sensor: RFID can identify tagged items entering or leaving a location. Weight sensing can estimate the remaining quantity of bulk items when unit weight is known. Neither method automatically gives accurate stock counts without appropriate inventory logic and calibration.

STEP 01
Set up FAVORIOT

  1. Register or sign in to the FAVORIOT platform .
  2. Create an application for your inventory monitoring project.
  3. Register your device and keep its assigned identifier and credentials.
  4. Configure the telemetry fields you want to track, such as item_id , weight_g , estimated_units and stock_status .
  5. Create a dashboard with a current-stock display, historical chart and alert status.
Example telemetry (illustrative)
                    {
                      "item_id": "RAW-MAT-001",
                      "weight_g": 850,
                      "estimated_units": 17,
                      "stock_status": "LOW"
                    }
                

This is a conceptual data record, not a guaranteed drop-in API payload. Format requests using the API specification for your FAVORIOT account.

STEP 02
Connect the sensor

Option A: RFID reader with Arduino

Connect an MFRC522 module to an Arduino Uno using SPI. The original tutorial uses the following pin mapping:

MFRC522 → Arduino Uno

SDA/SS → D10 · SCK → D13 · MISO → D12 · MOSI → D11 · RST → D9

Use the board’s compatible voltage and SPI pins. MFRC522 modules generally require 3.3 V logic. Confirm wiring for your exact board before powering it.

                #include <SPI.h>
                #include <MFRC522.h>

                #define SS_PIN 10
                #define RST_PIN 9
                MFRC522 reader(SS_PIN, RST_PIN);

                void setup() {
                  Serial.begin(9600);
                  SPI.begin();
                  reader.PCD_Init();
                }

                void loop() {
                  if (!reader.PICC_IsNewCardPresent() ||
                      !reader.PICC_ReadCardSerial()) return;

                  String tag = "";
                  for (byte i = 0; i < reader.uid.size; i++) {
                    if (reader.uid.uidByte[i] < 0x10) tag += "0";
                    tag += String(reader.uid.uidByte[i], HEX);
                  }
                  Serial.println("RFID tag: " + tag);
                  // Next: publish the tag through your board's
                  // network client using FAVORIOT's current API.
                  reader.PICC_HaltA();
                  reader.PCD_StopCrypto1();
                }
            

The RFID reader detects a tag. To calculate actual stock, your application must decide whether the scan represents an arrival, dispatch or another event, and prevent duplicate scans from changing the count.

Option B: Raspberry Pi with a load cell

Connect a calibrated load cell through an HX711 amplifier to the Raspberry Pi. Read the measurement with a Python library compatible with your HX711 module. The exact library calls differ across packages.

                # Illustrative stock-monitoring logic
                LOW_STOCK_GRAMS = 100

                while True:
                    weight_g = read_calibrated_weight()  # your HX711 adapter
                    publish_to_favoriot({"weight_g": weight_g})

                    if weight_g < LOW_STOCK_GRAMS:
                        send_telegram_alert("Inventory level is low")

                    sleep(30)
            

This pseudocode explains the logic. Replace the helper functions with working HX711, FAVORIOT and Telegram clients. Add error handling, alert deduplication and a recovery threshold before production use.

STEP 03
Set up Telegram notifications

  1. Open Telegram and create a bot through BotFather using the /newbot command.
  2. Keep the bot token private. Never publish it in a webpage or source repository.
  3. Send your bot a message and use Telegram’s getUpdates method to find the chat ID.
  4. Configure your notification logic to call Telegram’s sendMessage method when stock falls below the threshold.
Example alert

LOW STOCK ALERT
Item: RAW-MAT-001
Measured weight: 85 g
Minimum threshold: 100 g
Action: Check stock and arrange replenishment.

For a centrally managed approach, check whether the notification actions in your FAVORIOT plan support your preferred Telegram workflow. Alternatively, run the notification logic in your application or gateway.

STEP 04
Test before deployment

  • Verify the device is sending readings and the dashboard updates.
  • Test normal stock, low stock and stock replenishment.
  • Confirm alerts reach the correct Telegram chat.
  • Prevent repeated alerts for every reading below the threshold.
  • Check behavior during Wi-Fi outages, power failures and sensor faults.
  • Compare measured inventory with physical counts.

STEP 05
Prepare for real operations

Mount sensors safely, protect network credentials, document calibration and define who responds to each alert. For factories, consider maintaining stock transactions in the existing inventory or ERP system while FAVORIOT provides monitoring and visibility.

CONNECT
Collect stock signals
→
SEE
Track inventory status
→
ACT
Notify the right team

Why this matters

A dashboard alone cannot replenish a shelf. The real value comes when stock data leads to a clear response: someone receives the alert, checks the situation and takes action. That is how a simple sensor project can begin to reduce operational blind spots.

Tutorial disclaimer: This page is an educational adaptation of the original project concept, not a claim of a verified customer deployment. Example code is illustrative and requires hardware-specific testing, current API configuration and security review.

BUILD WITH FAVORIOT

Turn stock readings into operational visibility.

Start with one item, one sensor and one clear alert. Then expand when the workflow has been tested.

Explore FAVORIOT Platform →

Need guidance? info@favoriot.com

Adapted from the original IoT World tutorial (18 March 2025) .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.