Skip to content

Loxone Integration

Document Context

  • Purpose: Complete integration guide for connecting whatwatt Go devices with Loxone home automation system for energy monitoring and control
  • When to use: Smart home setups with Loxone Miniserver, energy management automation, consumption monitoring, load balancing scenarios
  • Prerequisites: Loxone Miniserver Gen ½, Loxone Config software, whatwatt Go device on network, basic Loxone programming knowledge
  • Related to: HTTP virtual inputs, energy monitoring blocks, data visualization, automation triggers based on energy consumption
  • Validates against: Live energy data from whatwatt Go REST API integrated into Loxone monitoring and automation logic

Key Facts

  • Integration method: HTTP REST API polling via Loxone Virtual HTTP Input
  • Update frequency: Configurable polling interval (recommended: 30-60 seconds)
  • Data format: JSON energy measurements parsed by Loxone
  • Authentication: Optional HTTP digest authentication support
  • Monitoring capabilities: Real-time power, energy counters, voltage, current, frequency
  • Automation potential: Load shedding, solar optimization, peak demand management
  • Visualization: Built-in Loxone energy monitoring widgets
  • Error handling: Connection monitoring and fallback logic

This guide shows how to integrate whatwatt Go energy monitoring into Loxone for comprehensive smart home energy management.

Overview

The whatwatt Go device integrates seamlessly with Loxone home automation systems through the REST API. This enables real-time energy monitoring, automated load control, and intelligent energy management within your Loxone smart home.

Prerequisites

Hardware

  • Loxone Miniserver (Gen 1 or Gen 2)
  • whatwatt Go device (firmware 1.2+)
  • Stable network connection for both devices

Software

  • Loxone Config (latest version)
  • Access to Loxone configuration

Network Setup

  • Both devices on same network or accessible via routing
  • HTTP connectivity from Miniserver to whatwatt Go
  • Optional: Static IP for whatwatt Go device

Step 1: Prepare whatwatt Go Device

1.1 Find Device IP Address

Use device discovery to find your whatwatt Go:

# Method 1: mDNS hostname
ping whatwatt-XXXXXX.local

# Method 2: Network scan
nmap -sn 192.168.1.0/24 | grep -A2 -B2 whatwatt

1.2 Test API Access

Verify REST API responds correctly:

# Test system endpoint
curl http://DEVICE_IP/api/v1/system

# Test energy data
curl http://DEVICE_IP/api/v1/report

Expected response format:

{
  "report": {
    "id": 7892,
    "interval": 6.749,
    "tariff": 1,
    "date_time": "2025-10-07T14:26:10Z",
    "date_time_local": "2025-10-07T14:26:10+02:00",
    "instantaneous_power": {
      "active": {
        "positive": {
          "total": 2456,
          "l1": 823,
          "l2": 891,
          "l3": 742
        },
        "negative": {
          "total": 0,
          "l1": 0,
          "l2": 0,
          "l3": 0
        }
      }
    },
    "voltage": {
      "l1": 231.2,
      "l2": 230.8,
      "l3": 232.1
    },
    "current": {
      "l1": 3.6,
      "l2": 3.9,
      "l3": 3.2
    },
    "energy": {
      "active": {
        "positive": {
          "total": 1234567.8
        },
        "negative": {
          "total": 98765.4
        }
      }
    }
  },
  "meter": {
    "status": "OK",
    "interface": "MBUS",
    "protocol": "DLMS",
    "logical_name": "LGZ1030784855204"
  },
  "system": {
    "id": "ECC9FF5C7F14",
    "date_time": "2025-10-07T14:26:24Z"
  }
}

Step 2: Configure Loxone Integration

2.1 Create Virtual HTTP Input

  1. Open Loxone Config
  2. Navigate to Periphery → Virtual Inputs
  3. Add new Virtual HTTP Input:
  4. Name: whatwatt_Energy
  5. Address: http://DEVICE_IP/api/v1/report
  6. Update Cycle: 60 seconds (adjust as needed)
  7. Format: JSON

2.2 Configure HTTP Settings

In the Virtual HTTP Input properties:

  • Method: GET
  • Content-Type: application/json
  • Timeout: 30 seconds
  • Authentication: Set if device has authentication enabled

2.3 Parse JSON Response

Add multiple Virtual HTTP Input Commands to extract data:

Command Name JSON Path Description
Power_Total report.instantaneous_power.active.positive.total Total active power consumption (W)
Power_L1 report.instantaneous_power.active.positive.l1 Phase L1 active power (W)
Power_L2 report.instantaneous_power.active.positive.l2 Phase L2 active power (W)
Power_L3 report.instantaneous_power.active.positive.l3 Phase L3 active power (W)
Energy_Import report.energy.active.positive.total Total imported energy (Wh)
Energy_Export report.energy.active.negative.total Total exported energy (Wh)
Voltage_L1 report.voltage.l1 Phase L1 voltage (V)
Voltage_L2 report.voltage.l2 Phase L2 voltage (V)
Voltage_L3 report.voltage.l3 Phase L3 voltage (V)
Current_L1 report.current.l1 Phase L1 current (A)
Current_L2 report.current.l2 Phase L2 current (A)
Current_L3 report.current.l3 Phase L3 current (A)
Meter_Status meter.status Meter communication status
Device_ID system.id Device unique identifier

Step 3: Create Energy Monitoring Logic

3.1 Add Energy Monitor Block

  1. Navigate to Building Structure
  2. Add Energy Monitor Block
  3. Configure inputs:
  4. Connect Power_Total to power input
  5. Connect Energy_Import to meter input

3.2 Create Analog Memory for Values

Add Analog Memory blocks for each measurement:

Power_Total → Analog Memory → "Current_Power"
Energy_Import → Analog Memory → "Total_Energy"
Voltage_L1 → Analog Memory → "Voltage_L1"

3.3 Add Monitoring Logic

Create monitoring logic for:

  • High consumption alerts
  • Power quality monitoring
  • Energy cost calculation
  • Load balancing triggers

Step 4: Visualization and Controls

4.1 Energy Dashboard

Create a room in Loxone Config for energy monitoring:

  1. Add Room: "Energy Monitoring"
  2. Add Controls:
  3. State Display: Current power consumption
  4. Analog Display: Real-time power values
  5. Info Box: Daily/monthly energy totals
  6. Chart: Power consumption history

4.2 Alerts and Notifications

Configure push notifications:

Power_Total > 5000W → Push Message: "High power consumption detected"
Voltage_L1 < 220V → Push Message: "Low voltage on L1"

Step 5: Advanced Automation

5.1 Load Shedding

Create automatic load shedding based on consumption:

IF Power_Total > 4000W AND Solar_Available < 1000W
THEN
  Switch OFF non-essential loads
  Send notification

5.2 Solar Optimization

Optimize energy usage with solar production:

IF Solar_Production > Power_Consumption + 500W
THEN
  Start heat pump
  Start EV charging

5.3 Peak Demand Management

Prevent expensive peak demand charges:

IF 15min_Average_Power > Peak_Threshold
THEN
  Reduce loads by priority
  Delay non-critical operations

Troubleshooting

Common Issues

Issue Cause Solution
No data received Network connectivity Check IP address and network
Timeout errors Slow response Increase timeout value
JSON parse errors Wrong API endpoint Verify /api/v1/report endpoint
Authentication failed Wrong credentials Check device authentication settings

Debug Steps

  1. Test API manually: Use curl/browser to verify API response
  2. Check Loxone logs: Monitor for HTTP request errors
  3. Verify JSON format: Ensure response matches expected structure
  4. Network diagnostics: Ping test between devices

Error Monitoring

Add error handling in Loxone:

IF HTTP_Status ≠ 200
THEN
  Set error flag
  Send notification
  Use last known values

Performance Optimization

Update Frequency

  • Real-time monitoring: 30-60 seconds
  • Historical data: 5-10 minutes
  • Billing purposes: 15 minutes

Network Optimization

  • Use static IP for whatwatt Go
  • Consider QoS settings for reliable communication
  • Monitor network latency

Example Automation Scenarios

Scenario 1: Smart EV Charging

IF Solar_Production > House_Consumption + 2000W
AND EV_Connected = TRUE
THEN
  Start EV charging at available solar power

Scenario 2: Heat Pump Optimization

IF Time = 06:00 AND Forecast_Solar > 3000W
THEN
  Pre-heat house using night tariff
  Prepare for solar heating

Scenario 3: Battery Management

IF Grid_Power > 0 AND Battery_SOC < 20%
THEN
  Charge battery from grid (night tariff)
ELSE IF Solar_Excess > 1000W
THEN
  Charge battery from solar

Security Considerations

  • Network security: Keep devices on private network
  • Authentication: Enable device authentication if accessible from internet
  • Regular updates: Keep firmware updated
  • Monitoring: Log access attempts and unusual patterns

Next Steps

  • Expand monitoring: Add more whatwatt Go devices for detailed monitoring
  • Energy optimization: Implement advanced load balancing algorithms
  • Cost tracking: Integrate with utility billing data
  • Predictive control: Use weather forecasts for heating/cooling optimization

Support and Resources

  • Loxone Documentation: Energy monitoring best practices
  • Community Forum: Share automation ideas and troubleshooting
  • Professional Setup: Consider Loxone Partner for complex installations