The Cloud Gateway (CGW) bridges the local factory MQTT broker with the fischertechnik Cloud, enabling remote monitoring and control. It acts as a bidirectional MQTT message forwarder.
Module Type: CGW (special infrastructure component)
Serial Number: Cleaned variant of the SPS serial number
Function: MQTT bridge, not a production module
The CGW acts as a bridge between the local factory network and the cloud.
graph TD
subgraph Cloud
Dashboard[Cloud Dashboard]
end
subgraph Local_Factory
CGW[CGW Module<br/>Cloud Gateway]
CCU[CCU]
Broker[Local MQTT Broker]
end
Dashboard <-->|Internet/MQTT| CGW
CGW <-->|Local Network| Broker
CCU <-->|Local Network| Broker
The CGW selectively forwards topics between local and cloud brokers.
Messages from the factory are forwarded to the cloud with prefix /j1/txt/<cloud-controller-id>/:
| Local Topic | Cloud Topic |
|---|---|
ccu/order/response |
/j1/txt/<id>/ccu/order/response |
ccu/order/active |
/j1/txt/<id>/ccu/order/active |
ccu/order/completed |
/j1/txt/<id>/ccu/order/completed |
ccu/pairing/state |
/j1/txt/<id>/ccu/pairing/state |
ccu/state/# |
/j1/txt/<id>/ccu/state/# |
fts/v1/ff/+/connection |
/j1/txt/<id>/fts/v1/ff/+/connection |
fts/v1/ff/+/state |
/j1/txt/<id>/fts/v1/ff/+/state |
fts/v1/ff/+/factsheet |
/j1/txt/<id>/fts/v1/ff/+/factsheet |
module/v1/ff/+/connection |
/j1/txt/<id>/module/v1/ff/+/connection |
module/v1/ff/+/state |
/j1/txt/<id>/module/v1/ff/+/state |
module/v1/ff/+/factsheet |
/j1/txt/<id>/module/v1/ff/+/factsheet |
Additionally, dashboard-related topics:
| /j1/txt/1/f/i/# | /j1/txt/<id>/f/i/# |
| /j1/txt/1/i/# | /j1/txt/<id>/i/# |
Messages from the cloud are forwarded to the local broker with prefix removed:
| Cloud Topic | Local Topic |
|---|---|
/j1/txt/<id>/ccu/order/request |
ccu/order/request |
/j1/txt/<id>/ccu/order/cancel |
ccu/order/cancel |
/j1/txt/<id>/ccu/pairing/pair_fts |
ccu/pairing/pair_fts |
/j1/txt/<id>/ccu/set/# |
ccu/set/# |
Dashboard-related topics:
| /j1/txt/<id>/f/o/# | /j1/txt/1/f/o/# |
| /j1/txt/<id>/o/broadcast | /j1/txt/1/o/broadcast |
| /j1/txt/<id>/o/ptu | /j1/txt/1/o/ptu |
| /j1/txt/<id>/c/# | /j1/txt/1/c/# |
The CGW is configured through:
-
fischertechnik Cloud Pairing:
- Performed via TXT Controller UI
- Generates cloud credentials
- Assigns
<cloud-controller-id>
-
Local Broker Configuration:
- Hardcoded in
data/config.jsoninside.ftproject - Contains local broker IP and credentials
- Hardcoded in
Example config.json:
{
"mqtt": {
"localBroker": {
"host": "192.168.0.100",
"port": 1883,
"username": "default",
"password": "default"
},
"deviceId": "CGW001"
}
}The <cloud-controller-id> is obtained during the fischertechnik Cloud pairing process:
- Unique identifier for this factory instance in the cloud
- Used as topic prefix for all cloud messages
- Replaced with local ID
1for dashboard compatibility
External systems can monitor the factory via cloud topics:
- Subscribe to
/j1/txt/<id>/ccu/state/#for factory state - Subscribe to
/j1/txt/<id>/module/v1/ff/+/statefor module states - Subscribe to
/j1/txt/<id>/fts/v1/ff/+/statefor AGV positions
Send commands through the cloud:
- Publish to
/j1/txt/<id>/ccu/order/requestto create orders - Publish to
/j1/txt/<id>/ccu/set/#for configuration changes
The fischertechnik dashboard can connect remotely:
- Uses special
/j1/txt/<id>/f/o/#and/c/#topics - CGW translates between cloud ID and local ID
1
The CGW does not publish state like production modules. However, it appears in the system with:
Connection Topic: module/v1/ff/<serial>/connection
Online Message:
{
"headerId": 1,
"timestamp": "2024-12-08T09:00:00.000Z",
"version": "1.0.0",
"ip": "192.168.0.50",
"manufacturer": "fischertechnik",
"serialNumber": "CGW001",
"connectionState": "ONLINE"
}- Local MQTT typically uses simple authentication (
default/default) ⚠️ Not intended for public exposure- Should be on isolated factory network
- TLS encryption for cloud communication
- Authenticated via fischertechnik Cloud credentials
- Credentials generated during pairing process
- CGW only forwards specific topics
- Prevents unintended message leakage
- Maintains separation between local and cloud concerns
Both credentials must be configured:
- Local Broker: IP and login hardcoded in config
- Cloud Credentials: Generated via TXT Controller pairing UI
On startup, CGW:
- Connects to local MQTT broker
- Connects to fischertechnik Cloud MQTT broker
- Subscribes to relevant topics on both brokers
- Begins forwarding messages
If connection fails:
- CGW retries connection automatically
- Messages may be lost during disconnection
- No local queueing of cloud-bound messages
To debug CGW operation:
- Monitor both local and cloud brokers
- Check topic prefixes are correct
- Verify CGW connection status
- Review CGW logs on TXT Controller
- No State Buffering: Messages lost during disconnection are not recovered
- One-Way Real-Time: Not designed for request-response patterns
- Topic Whitelist: Only predefined topics are forwarded
- No Message Transformation: Messages are forwarded as-is (except topic prefix)
For development without cloud connection:
- Disable CGW
- Use local MQTT broker only
- All functionality works locally
For testing cloud integration:
- Use MQTT client to connect to cloud broker
- Subscribe to
/j1/txt/<id>/#to see all forwarded messages - Publish to
/j1/txt/<id>/ccu/order/requestto test remote control