Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RevPi docs to Node-RED hardware section #3004

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sumitshinde-84
Copy link
Collaborator

Description

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated

Comment on lines 1 to 9
---
eleventyNavigation:
key: Revolutionary Pi
parent: Hardware
meta:
title: Setting Node-RED on Revolutionary Pi
description: Learn how to set up Node-RED on a Raspberry Pi 4, including installation, configuration, and integration with sensors and actuators.
keywords: node-red, raspberry pi, Revolutionary Pi
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which make and model are we talking? I think this is too broad

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this will work on all Revolution Pi models with Compute Module 4, such as RevPi Connect 4 and RevPi Core S.

Copy link
Collaborator Author

@sumitshinde-84 sumitshinde-84 Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one do we have? Can someone test the guide with it?

Comment on lines 117 to 118
#### Step 4: Start the Device Agent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to create a service?

To install the FlowFuse Device Agent and set it up as a service, download and execute the installation script from GitHub:

```bash
curl -O https://raw.githubusercontent.com/FlowFuse/device-agent/main/service/raspbian-install-device-agent.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just execute right away, but split it into 3 commands?

Comment on lines +71 to +88
#### Step 1: Update System Packages

```bash
sudo apt update && sudo apt upgrade -y
```

#### Step 2: Install Node.js

You can install Node.js from the default APT repositories:

```bash
sudo apt install -y nodejs
```

#### Step 3: Verify Installation

```bash
node -v
Copy link
Member

@ZJvandeWeg ZJvandeWeg Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sudo apt update && sudo apt upgrade -y
sudo apt install -y nodejs
node -v

You can continue with this guide if your version matches or is later then .....

Comment on lines +91 to +94
After running the verification command, the installed Node.js version should be displayed in the terminal.

> **Note:** Ensure that the installed version is **Node.js 18 or later**, as this is the recommended version for optimal compatibility with the device agent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After running the verification command, the installed Node.js version should be displayed in the terminal.
> **Note:** Ensure that the installed version is **Node.js 18 or later**, as this is the recommended version for optimal compatibility with the device agent.

Comment on lines +97 to +105
#### Step 1: Install Required Package (curl)

If `curl` is not already installed on your system, you will need to install it first:

```bash
sudo apt install -y curl
```

#### Step 2: Execute the Installation Script
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Step 1: Install Required Package (curl)
If `curl` is not already installed on your system, you will need to install it first:
```bash
sudo apt install -y curl
```
#### Step 2: Execute the Installation Script


#### Step 3: Restart the Device Agent

Once the device is configured, restart it. The FlowFuse Device Agent will start automatically upon reboot.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sudo systemctl restart flowfuse-device-agent

Comment on lines +115 to +133
### Registering the Device Agent to FlowFuse and Running It

After installing the FlowFuse Device Agent, the next step is to link the Revolutionary Pi to your [FlowFuse team](/docs/user/team/). This allows the device to be managed remotely and receive Node-RED deployments.

#### Step 1: Add a New Device to Your FlowFuse Team

Follow the instructions in the official documentation to add your device to your FlowFuse team: [Add a Remote Instance](/docs/device-agent/register/#add-remote-instance).

Once you register the device, you will receive the configuration details required to connect device to your team. Copy the provided command.

![Image showing command device configuration dialog and the command placeholder, where you will find the command to link the device to your FlowFuse team.](./images/how-to-setup-node-red-on-raspberry-pi-device-configuration-dialog.png "Image showing command device configuration dialog and the command placeholder, where you will find the command to link the device to your FlowFuse team."){data-zoomable}

#### Step 2: Configuring the Device

Execute the command you copied to complete the device configuration.

#### Step 3: Restart the Device Agent

Once the device is configured, restart it. The FlowFuse Device Agent will start automatically upon reboot.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<obtain connection command, link to external docs page>

flowfuse-device-agent --quick-connect <insert-your-three-word-token>
sudo systemctl start flowfuse-device-agent

Verify in FlowFuse that your device is connected.

Comment on lines +135 to +155
#### Step 4: Verifying the Device Agent is Running

After the device restarts, you can check if the FlowFuse Device Agent is running by using the following command:

```bash
sudo systemctl status flowfuse-device-agent
```

This should display the status of the FlowFuse Device Agent, showing whether it's active and running.

> **Note:** If you encounter any issues with the agent not starting automatically, you can manually start it with the following command:

```bash
sudo systemctl start flowfuse-agent
```

#### Step 5: Monitor and Manage Device from FlowFuse

Once the device is successfully registered and running, you can monitor and manage it from the FlowFuse platform remotly. Any changes you make to the device’s configuration or Node-RED flows will be reflected on the device immediately.

To access the device editor, go to your FlowFuse team, where you will see the Revolutionary Pi listed under remote instances. Click on it to enable the device editor, then open the editor. For more information, refer to [Deploy Flows to Remote Instances](https://flowfuse.com/docs/device-agent/quickstart/#deploy-flows-to-remote-instances).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Step 4: Verifying the Device Agent is Running
After the device restarts, you can check if the FlowFuse Device Agent is running by using the following command:
```bash
sudo systemctl status flowfuse-device-agent
```
This should display the status of the FlowFuse Device Agent, showing whether it's active and running.
> **Note:** If you encounter any issues with the agent not starting automatically, you can manually start it with the following command:
```bash
sudo systemctl start flowfuse-agent
```
#### Step 5: Monitor and Manage Device from FlowFuse
Once the device is successfully registered and running, you can monitor and manage it from the FlowFuse platform remotly. Any changes you make to the device’s configuration or Node-RED flows will be reflected on the device immediately.
To access the device editor, go to your FlowFuse team, where you will see the Revolutionary Pi listed under remote instances. Click on it to enable the device editor, then open the editor. For more information, refer to [Deploy Flows to Remote Instances](https://flowfuse.com/docs/device-agent/quickstart/#deploy-flows-to-remote-instances).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants