Skip to content

CT1113 IoT Platform

CT1113 runs the SenseMy IoT Platform for LoRaWAN device management and data processing.

Overview

Property Value
VMID 1113
IP REDACTED_IP3
Node px1-silverstone
Type LXC Container
Purpose IoT/LoRaWAN platform

Note: IP changed from REDACTED_IP to REDACTED_IP3 during VLAN 10 retirement on 2026-01-09

Services

Service Port Purpose
ChirpStack 8080 LoRaWAN network server UI
Node-RED 1880 Flow-based automation
MQTT 1883 IoT messaging
Ingest API 5000 Data ingestion endpoint
Transform API 5001 Data transformation

Architecture

LoRaWAN Devices
      │
      ▼
LoRaWAN Gateway → ChirpStack (8080)
                       │
                       ▼
                  MQTT Broker (1883)
                       │
              ┌────────┴────────┐
              ▼                 ▼
         Node-RED          Ingest API
         (1880)             (5000)
              │                 │
              └────────┬────────┘
                       ▼
              PostgreSQL (CT1112)
              └── ingest_db
              └── transform_db
              └── microshare_db

Accessing Services

ChirpStack UI

URL: http://REDACTED_IP:8080 (or via Traefik if configured)

Default credentials: Check /opt/chirpstack/ for configuration

Node-RED

URL: http://REDACTED_IP:1880

Used for: - Device data transformations - Alert rules - Integration flows

MQTT Broker

# Subscribe to all topics
mosquitto_sub -h REDACTED_IP -t '#' -v

# Publish test message
mosquitto_pub -h REDACTED_IP -t 'test/topic' -m 'Hello'

Configuration

ChirpStack

Config location: /opt/chirpstack/

Key files: - chirpstack.toml - Main configuration - region_*.toml - Regional parameters

Node-RED

Config location: /root/.node-red/

Flows are stored in flows.json

MQTT

Config location: /etc/mosquitto/

Database Connections

The IoT Platform uses databases on CT1112:

Database Purpose
ingest_db Raw sensor data
transform_db Processed data
microshare_db Application data

Connection string:

postgresql://iot_platform:iotpass2025@REDACTED_IP:5432/<database>

Common Operations

Check Service Status

# Enter container
pct exec 1113 -- bash

# Check services
systemctl status chirpstack
systemctl status nodered
systemctl status mosquitto

View Logs

# ChirpStack logs
pct exec 1113 -- journalctl -u chirpstack -f

# Node-RED logs
pct exec 1113 -- journalctl -u nodered -f

# MQTT logs
pct exec 1113 -- tail -f /var/log/mosquitto/mosquitto.log

Restart Services

pct exec 1113 -- systemctl restart chirpstack
pct exec 1113 -- systemctl restart nodered
pct exec 1113 -- systemctl restart mosquitto

Device Onboarding

Add New LoRaWAN Device

  1. Get device EUI, AppKey from manufacturer
  2. Log into ChirpStack UI (http://REDACTED_IP:8080)
  3. Create Application (if needed)
  4. Add Device with OTAA credentials
  5. Device will join on next uplink

Verify Device Connection

# Subscribe to device uplinks
mosquitto_sub -h REDACTED_IP -t 'application/+/device/+/event/up' -v

Backup

CT1113 is included in cluster backup strategy:

  • ZFS Snapshots: Daily at 02:00
  • Vzdump: Daily backup

Manual Backup of Flows

# Backup Node-RED flows
pct exec 1113 -- cat /root/.node-red/flows.json > nodered_backup.json

# Backup ChirpStack config
pct exec 1113 -- tar czf - /opt/chirpstack > chirpstack_backup.tar.gz

Troubleshooting

Device Not Joining

  1. Check gateway is online in ChirpStack
  2. Verify device EUI and AppKey
  3. Check MQTT messages:
    mosquitto_sub -h REDACTED_IP -t 'gateway/+/event/+' -v
    

No Data in Database

  1. Check Node-RED flows are deployed
  2. Check database connectivity:
    pct exec 1113 -- psql -h REDACTED_IP -U iot_platform -d ingest_db -c "SELECT 1"
    
  3. Check transform service logs

MQTT Connection Refused

# Check broker is running
pct exec 1113 -- systemctl status mosquitto

# Check listener config
pct exec 1113 -- cat /etc/mosquitto/mosquitto.conf