---
title: "Connect wired Phidgets with Edge MC and Node-RED"
slug: "connect-wired-phidgets-with-edge-mc-and-node-red"
updated: 2022-09-30T18:14:01Z
published: 2022-09-30T18:14:02Z
canonical: "support.tulip.co/connect-wired-phidgets-with-edge-mc-and-node-red"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.tulip.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect wired Phidgets with Edge MC and Node-RED

## Connecting Wired Phidgets with Edge MC and Node-RED

*Learn how to connect wired Phidgets to Tulip with an Edge MC and Node-RED*

## Summary

This article covers the workflow to connect wired Phidgets to an Edge MC and send data to Tulip via a Node-RED flow.

By the end of this article, you will have the following flow within Node-RED to send Phidget data from your sensor to a Machine within Tulip.

You will complete the following steps:

1. Connecting the Phidgets to an Edge MC
2. Setting up machine attributes in Tulip
3. Node-RED flow setup

What you will need is:

- An Edge MC [registered to your Tulip account](https://support.tulip.co/docs/how-to-register-an-edge-mc)
- USB to Mini-USB cable
- [VINT Hub Phidget](https://www.phidgets.com/?tier=3&amp;catid=64&amp;pcid=57&amp;prodid=1202)
- [Humidity Phidget](https://www.phidgets.com/?tier=3&amp;catid=14&amp;pcid=12&amp;prodid=1179)
- [Phidget cable](https://www.phidgets.com/?tier=3&amp;catid=30&amp;pcid=26&amp;prodid=153)

**Note**: Purchasing a Tulip Factory Kit will include all relevant Phidget items.

## 1. Hardware Setup - Connecting your Phidgets to an Edge MC

1. Connect the **Humidity Phidget** to the 0 port on the **VINT Hub Phidget** using the Phidget cable.
2. Connect the **VINT Hub Phidget** to one of the USB ports on your **Edge MC** with a USB to Mini-USB cable.

## 2. Machine Setup - Creating Machine Attributes

To send data from the Phidget sensor to Tulip, let's first set up a Machine using the Tulip API as its data source. Refer to the **Setting up a New Machine** section of the [How to use the Machine Attributes API](https://support.tulip.co/docs/how-to-use-the-machine-attributes-api) article for an in-depth overview.

We'll need to create two machine attributes for this machine:

1. A machine attribute for **Humidity** and type set to **Float**
2. A machine attribute for **Temperature** and type set to **Float**

You'll want to note the `attributeId` and `machineId` values to pass into the Node-RED flow.

You can also set up a Machine Type to assign to the Machine if you plan to use the Phidget sensor(s) to change aspects such as the state of the machine or perform any counts based on the sensor outputs. Refer to [How to Set Up Machine Types](https://support.tulip.co/docs/how-to-set-up-machine-types) if this is of interest.

## 3. Node-RED Setup - Building Node-RED Flow

Open the Edge Device Portal on the Edge MC connected to the Phidget sensor(s). Launch the Node-RED Editor using the following credentials:

- Username: admin
- Password: Your Edge IO password

See more information [here](https://support.tulip.co/docs/using-node-red-with-edge-mc) to get started with Node-RED on Edge MC.

In the Node-RED Palette Editor:

1. Install the **Phidgets** set of nodes from the Library.

*Reference [this](https://nodered.org/docs/user-guide/runtime/adding-nodes) Node-RED article, under "Using the Editor"*

1. Add a **Connect** node, located under the Phidgets nodes.
2. Add a **HumiditySensor** and a **TemperatureSensor** node, also located under Phidgets nodes.
3. Add a **machine-attr** node, located under the Tulip nodes.
4. Double click on the two Phidgets Sensor nodes. Configure as follows:
  - **Name:** Give it a name associated with the corresponding sensor, for example **Phidget-Humidity.**
  - **Device Info:** Copy and paste the **Device Info** corresponding to the **Humidity** Machine Attribute from your machine in Tulip.
  - **Attribute Source:** Change to **msg.payload.humidity .**![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connecting%20Wired%20Phidgets%20with%20Edge%20MC%20and%20Node-RED_457400870.png)
5. Add a second **machine-attr** node.
6. Similar to step 4, configure the second **machine-attr** node.

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connecting%20Wired%20Phidgets%20with%20Edge%20MC%20and%20Node-RED_457401647.png)
  - ***Name:*** Give it a name associated with the temperature sensor, for example **Phidget-Temperature.**
  - **Device Info:** Copy and paste the **Device Info** corresponding to the **Temperature** Machine Attribute from your machine in Tulip.
  - **Attribute Source:** Change to **msg.payload.temperature .**
7. Add a **debug** node, located under common nodes.
8. Connect the nodes as follows. Note that each data stream has its own Tulip node:

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connecting%20Wired%20Phidgets%20with%20Edge%20MC%20and%20Node-RED_457387412.png)

1. Click **Deploy** in the top right of your screen to deploy the flow to your Edge MC.

To see your Phidgets in action, navigate back to your **Machine** in Tulip. You should see a live display of the humidity and temperature data your Phidget is reading:

![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Connecting%20Wired%20Phidgets%20with%20Edge%20MC%20and%20Node-RED_457399742.png)

Here is Node-RED's [documentation](https://nodered.org/docs/) for further reading.

Have a powerful Node-RED use case? Share your development on [Tulip Community](https://community.tulip.co/c/show-and-tell/9)!

Here is the JSON for this Node-RED flow - [import](https://nodered.org/docs/user-guide/editor/workspace/import-export) it into Node-RED for use on your device.

Note: `%your info here%` should be replaced with each of the machine attributes from your factory instance.

```
[{"id":"c8373720.e62f4","type":"tab","label":"Phidget Flow","disabled":false,"info":""},{"id":"9ca3e9dc.929e38","type":"phidget22-connect","z":"c8373720.e62f4","port":"5661","hostname":"0.0.0.0","debug":true,"x":90,"y":240,"wires":[["72614446.57e55c","f247f156.11f5a"]]},{"id":"72614446.57e55c","type":"phidget22-humiditysensor","z":"c8373720.e62f4","channel":0,"deviceSerialNumber":-1,"debug":true,"dataInterval":"5000","hubPort":0,"humidityChangeTrigger":0,"x":310,"y":160,"wires":[["46cb0ce3.25c094","a241d898.d84ed8"]]},{"id":"a241d898.d84ed8","type":"debug","z":"c8373720.e62f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":240,"wires":[]},{"id":"f247f156.11f5a","type":"phidget22-temperaturesensor","z":"c8373720.e62f4","channel":0,"deviceSerialNumber":-1,"hubPort":0,"debug":true,"dataInterval":"5000","temperatureChangeTrigger":0,"RTDWireSetup":3,"RTDType":2,"thermocoupleType":2,"x":320,"y":320,"wires":[["42a73f38.a98fa","a241d898.d84ed8"]]},{"id":"46cb0ce3.25c094","type":"tulip-machine-attribute","z":"c8373720.e62f4","name":"Phidget-Humidity","useCustomApiAuth":false,"apiAuth":"","keepAlive":true,"keepAliveMsecs":10000,"deviceInfo":"{%your info here%}","payloadSource":"payload.humidity","payloadType":"msg","x":590,"y":160,"wires":[[]]},{"id":"42a73f38.a98fa","type":"tulip-machine-attribute","z":"c8373720.e62f4","name":"Phidget-Temperature","useCustomApiAuth":false,"apiAuth":"","keepAlive":true,"keepAliveMsecs":10000,"deviceInfo":"{%your info here%}","payloadSource":"payload.temperature","payloadType":"msg","x":600,"y":320,"wires":[[]]}]
```
