BFC BFC Docs
Integrations

Connect Node-RED

Configure the BFC Gateway node and read live automation values into Node-RED flows.

The Setup Tool installs Node-RED, the node-red-bfc-gateway package, and FlowFuse Dashboard. Open the editor at:

http://CONTROLLER_IP:1885/

Before creating a flow

Confirm:

  1. bfc-gateway and bfc-nodered are running.
  2. The Gateway health URL responds.
  3. A Lua automation is publishing a known source/key pair.
  4. You know the value type: float, int, or string.

For example:

Gateway:SetFloat("temphum", "temp", temperature, GatewayValueValidity.VALID, "°C")

uses source temphum, key temp, and type float.

Configure the Gateway server

Add the BFC Lua value node to a flow and create its server configuration:

Field Setup Tool deployment value
Name Any descriptive label
Protocol HTTP
Host / IP bfc-gateway
Port 5000
SSL Verify Off for HTTP
Username Gateway username
Password Gateway password

Use the Docker name because Node-RED and the Gateway share bfc-network. Do not use 127.0.0.1: inside Node-RED that address refers to the Node-RED container.

For an external Gateway, use its reachable DNS name or IP and the appropriate protocol and port. Enable certificate verification for HTTPS only when the certificate is trusted by the Node-RED container.

Configure the Lua value node

Set:

  • Server to the FOG API Server configuration.
  • Source Name to the Lua source name.
  • Key Name to the Lua key name.
  • Data Type to Float, Int, or String.

Connect an Inject node to its input and a Debug node to its output, then deploy. On each input message, the node requests:

/api/LuaValue/SOURCE/KEY/TYPE/value

The complete Gateway response is assigned to msg.payload, for example:

{
  "value": 23.5,
  "unitCode": "°C",
  "validity": "VALID",
  "updatedAt": "2026-07-30T09:15:00+00:00"
}

Use msg.payload.value for a gauge or chart.

Dynamic source and key

An incoming msg.sourceName or msg.keyName overrides the value configured in the editor. The editor currently still requires fallback values, so configure valid defaults even when messages supply overrides.

Authentication behavior

The configuration node logs in on the first request, keeps the JWT in memory, and refreshes it when it is close to expiry. A Node-RED restart or failed refresh causes a new login.

Node status indicates requesting, success, missing configuration, or API error. Use the Node-RED debug sidebar and the bfc-nodered container log for details.

The current package reads the latest Lua value only. It does not provide write, history, or RFID tag nodes in this first version.

Built with ASP.NET Core and Markdig. BFC user documentation · preview release