# IND400 with API

### 📺 Video Tutorial

{% embed url="<https://www.youtube.com/watch?v=mq5Ddm6YlCI>" %}

## Smart Weighing with MQTT- IND400 in ACTION

The **Mettler Toledo IND400** is a **smart weighing indicator** designed for industrial applications. It supports modern protocols such as **MQTT, OPC UA, and Ethernet/IP**, making it **IIoT-ready** for digital factories.

### 🔑 What you’ll learn

* How to log in and authenticate with the IND400 using the **REST API**
* Sending GET/POST requests to read and write data
* Understanding the difference between **REST (request/response)** and **WebSocket (real-time streaming)** communication
* Setting up a WebSocket connection to continuously receive live weighing data
* Demo: Visualizing the data in **Node-RED**

### ⚙️ Example REST API Request

```http
POST http://192.168.0.58/v1.0.0/login
Content-Type: application/json

{
  "username": "002",
  "password": "yourpassword"
}
```

**Response (with access token):**

```json
{
  "accessToken": "eyJhbGciOiJIUzI1NiIs...",
  "expiresIn": 3600
}
```

***

### 🌐 WebSocket Example

**Global variables defined in POSTMAN:**

<figure><img src="/files/Op1FPB2PUMJVdDDQbKFJ" alt=""><figcaption></figcaption></figure>

**Connection URL:**

```
ws://192.168.0.58/v1.0.0/measurements/00000000-0401-0500-0000-00C516882663?stable=true&threshold=5&unit=kg&Authorization=Bearer YOURTOKEN
```

Once connected, the IND400 continuously streams real-time weight values.

<figure><img src="/files/eWaRjGPQIzmQSYomye3W" alt=""><figcaption></figcaption></figure>

***

### 📊 Applications

* Real-time monitoring of weighing processes
* Continuous data logging into **databases or historians**
* Feeding streaming data into **dashboards, MES, or cloud platforms**
* Seamless integration with **IIoT and Industry 4.0** architectures

## Key notes:

{% embed url="<https://www.canva.com/design/DAGxLbZ9Xc8/JmgxvzLDbsKvQ2nFcITY7g/view?utlId=hb50de73826&utm_campaign=designshare&utm_content=DAGxLbZ9Xc8&utm_medium=link2&utm_source=uniquelinks>" %}

## Node-RED Example Code

The Node-RED flow used in the video can be found in the GitHub repository mentioned below:

{% embed url="<https://github.com/Code-and-Compile/Mettler_Toledo_IND400_API>" %}

## ♥️ Work With Me

I regularly test **industrial automation and IIoT devices**. If you’d like me to **review your product** or showcase it in my courses and YouTube channel:

📧 Email: <rajvir@codeandcompile.com> or drop me a message on [LinkedIn](https://www.linkedin.com/in/singhrajvir/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.codeandcompile.com/product-reviews/smart-devices/smart-weighing-indicator/ind400-with-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
