- docs
- FlowFuse User Manuals
- Using FlowFuse
- Getting Started
- FlowFuse Concepts
- Changing the Stack
- DevOps Pipelines
- Environment Variables
- FlowFuse File Nodes
- FlowFuse Persistent Context
- FlowFuse Project Nodes
- High Availability mode
- Instance Settings
- Logging
- Shared Team Library
- Snapshots
- Teams
- FlowFuse API
- Migrating a Node-RED project to FlowFuse
- Device Agent
- Device Agent
- Hardware Guides
- FlowFuse Cloud
- FlowFuse Cloud
- FlowFuse Self-Hosted
- Installing FlowFuse
- Overview
- Configuring FlowFuse
- DNS Setup
- Docker install
- Email configuration
- First Run Setup
- FlowFuse File Storage
- Install FlowFuse on Kubernetes
- Local Install
- Upgrading FlowFuse
- Administering FlowFuse
- Administering FlowFuse
- Administrator configuration for SSO
- licensing
- Monitoring
- Telemetry
- User Management
- Support
- Community Support
- Premium Support
- Debugging Node-RED issues
- Contributing
- Contributing to FlowFuse
# Register your Device
To connect a device to FlowFuse, it needs a set of credentials.
There are two types of configurations to choose from:
- Device Configuration: for connecting a single device to the platform
- Provisioning Configuration: for setting up one or more devices to automatically register themselves on the platform
# Generating "Device Configuration"
for a single device
- Go to your teams's Devices page.
- Click the Register Device button.
- You will be prompted to give the device a name and an optional type. The type field can be used to record additional meta information about the device.
- Click Register
Once the device has been registered, you will be shown the Device Configuration dialog. This is the only time the platform will show you this information without resetting it. Make sure to take a copy or use the Download button to save the configuration file locally.
Repeat these steps for each device you want to connect to the platform.
# Generating "Provisioning Configuration"
for automatic registration of one or more devices
- Go to your teams's Settings page.
- Open the Device tab.
- Click the Create Provisioning Token tab.
- You will be prompted to give the token a name and to chose what instance, if any, the device should be assigned to.
- Click Create
Once the Provisioning Token has been created, you will be shown the Device Provisioning Configuration dialog. This is the only time the platform will show you this information. Make sure to take a copy or use the Download button to save the configuration file locally.
# Connect the device
# Install the configuration
Before you can connect a device to the platform, the device must have a Device Configuration file or a Device Provisioning Configuration file present in its working directory. There are two ways to do this:
- Copy the configuration file into the device's Working Directory.
- Download the configuration file to the device using its built in Web UI. NOTE: The Device Agent must be running and the command line flag for the Web UI must be enabled. See Command Line Options for more information.
# Copy method
Place the Device Configuration or Device Provisioning Configuration file on the device in the Working Directory
By default, the device agent expects the configuration file to be named device.yml
, if not, you will need to start the device agent with the -c
Command Line Option and specify the path of the configuration file.
The agent can then be started with the command: [^global-install]
flowforge-device-agent
You will see the device start and perform a 'call-home' where it connects back to the platform to check what it should be running.
# Download method
If the Device Agent is running with the Web UI enabled, you can download the configuration file to the device using the Web UI. This is useful if you don't have direct access to the device's file system. Once the configuration file is downloaded, the device agent will automatically restart and load the configuration.
# Additional Information
If you copy or download a Device Provisioning Configuration file to the device, you will see the device start and perform a 'call-home' where it connects back to the platform to auto register itself in the team devices. If successful, the real Device Configuration is generated and downloaded to the device. The original Provisioning Configuration will be overwritten meaning subsequent runs will not need to perform the auto registration again.
# Assign the device to a Node-RED instance
The next step is to assign the device to a Node-RED instance.
- Go to your teams's Devices page.
- Open the dropdown menu to the right of the device you want to assign and select the Add to Instance option.
- Select the instance in the dialog and click Add to continue.
# Remove a device from a Node-RED instance
To remove the device from a Node-RED instance:
- Go to your teams's Devices page.
- Open the dropdown menu to the right of the device you want to remove and select the Remove from Instance option.
- Confirm the action by clicking the Remove option.
The device will stop running the current Node-RED flows. It will then wait until it is assigned to another instance.
# Assign the device to an Application
The next step is to assign the device to a FlowForge Application
- Go to your teams's Devices page.
- Open the dropdown menu to the right of the device you want to assign and select the Add to Application option.
- Select the application in the dialog and click Add to continue.
# Remove a device from an Application
To remove the device from an application:
- Go to your teams's Devices page.
- Open the dropdown menu to the right of the device you want to remove and select the Remove from Application option.
- Confirm the action by clicking the Remove option.
The device will stop running the current Node-RED flows. It will then wait until it is assigned to another application or instance.
# Regenerating Configurations
To regenerate device configurations:
- Go to your team's or instance's Devices page.
- Open the dropdown menu to the right of the device and select the Regenerate Configuration option.
- You will need to confirm this action as the existing configuration will be immediately revoked. If the device tries to use the old configuration it will fail to connect and will delete its local copy of the snapshot it was running. Click Regenerate Configuration to continue.
You will then be shown the Device Configuration dialog again with a new configuration to copy or download.
# Deleting a device
To delete a device:
- Go to your team's or instance's Devices page.
- Open the dropdown menu to the right of the device and select the Delete device option.
- Confirm the action by clicking the Delete option.
The next time the device attempts to connect to the platform it will find it is no longer authorised and will stop and delete its local copy of the flows it was running.
# Node-RED Settings
Most Node-RED settings are managed by the platform as part of deploying an instance to the device. However some settings can be overridden locally on the device.
# HTTPS configuration
Available in Device Agent 0.10+
The https
configuration option in device.yml
can be used to enable HTTPS within Node-RED. The values are passed through to the Node-RED https
setting.
The ca
, key
and cert
properties can be used to provide custom certificates and keys. The values should be set to the contents of the certificate/key.
Alternatively, the properties caPath
, keyPath
and certPath
can be used instead to provide absolute paths to files containing the certificates/keys.
https:
keyPath: /opt/flowforge-device/certs/key.pem
certPath: /opt/flowforge-device/certs/cert.pem
caPath: /opt/flowforge-device/certs/ca.pem
# httpStatic
configuration
Available in Device Agent 0.10+
This option can be used to serve content from a local directory.
If set to a path, the files in that directory will be served relative to /
.
httpStatic: /opt/flowforge-device/static-content
It is also possible to configure it with a list of directories and the corresponding path they should be served from.
httpStatic:
- path: /opt/flowforge-device/static-content/images
root: /images
- path: /opt/flowforge-device/static-content/js
root: /js
# Troubleshooting
If you have problems with the device agent the first thing to do is to enable the verbose logging mode.
To do this add a -v
to the command line. This will present a lot more information about what the agent is doing. It will show that is has connected to the FlowFuse instance and every time it checks in, it will also log all the local HTTP requests made when accessing the Node-RED Editor via the FlowFuse application.