-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: main
Are you sure you want to change the base?
Conversation
--- | ||
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 | ||
--- |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
#### Step 4: Start the Device Agent | ||
|
There was a problem hiding this comment.
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?
Co-authored-by: Zeger-Jan van de Weg <[email protected]>
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 |
There was a problem hiding this comment.
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?
#### 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 |
There was a problem hiding this comment.
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 ....
.
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. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
#### 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### 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. |
There was a problem hiding this comment.
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
### 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. | ||
|
||
{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. |
There was a problem hiding this comment.
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.
#### 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### 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). |
Description
Related Issue(s)
Checklist