Loxone Hue Scene Controller

Integrate Philips Hue scenes with your Loxone smart home system

View on GitHub
Lighting Controller Setup

Overview

This repository contains a Pico C script to integrate Philips Hue lighting with a Loxone smart home system. Originally developed by Marcel Schreiner, this script has been adapted to trigger Philips Hue scenes and turn off entire Hue scene groups.

What is this for? The script bridges your Loxone Miniserver and Philips Hue lights, allowing Loxone inputs (e.g., buttons or sensors) to control pre-set Hue scenes (like "Relax" or "Bright").

Credits

This project builds on the original work by Marcel Schreiner, who developed the initial Pico C code for controlling individual Hue lamps and groups. Full credit goes to Marcel for the original idea and implementation.

How It Works

The script enables Loxone inputs to control Philips Hue scenes or turn off light groups by sending HTTP commands to the Hue Bridge. Follow the steps below to set it up.

Step 1: Configure Your Hue Bridge

Example JSON snippet for scenes in group 3:


"f5zBZNQ0tdzhJo-": {
    "name": "Hoofdverlichting",
    "type": "GroupScene",
    "group": "3",
    "lights": ["18", "20", "26"],
    ...
},
"OxEpoBvjp4n2wB6": {
    "name": "Ochtend",
    "type": "GroupScene",
    "group": "3",
    "lights": ["18", "20", "26"],
    ...
}
    

Step 2: Insert the Program Block in Loxone Config

To use the Pico C script in Loxone Config, you need to add a Program block to your project:

Step 3: Configure the Script

In the script’s "Configure your system here" section, enter:

Example configuration based on the JSON file above:

// Set type of input (I0-I12)
bulbType[0] = TYPE_SCENE;     // I0: Activates a scene for group 3
bulbType[1] = TYPE_SCENE;     // I1: Activates another scene for group 3
bulbType[2] = TYPE_GROUP_OFF; // I2: Turns off group 3

// Set group ID
bulbId[0] = 3; // I0: Group 3
bulbId[1] = 3; // I1: Group 3
bulbId[2] = 3; // I2: Group 3

// Set scene ID
sceneId[0] = "f5zBZNQ0tdzhJo-"; // I0: "Hoofdverlichting" scene
sceneId[1] = "OxEpoBvjp4n2wB6"; // I1: "Ochtend" scene
sceneId[2] = "";                // I2: No scene (group off)

Step 4: Set Up the Lighting Controller

Lighting Controller Setup Lighting Controller Setup Lighting Controller Setup Lighting Controller Setup Lighting Controller Setup

Tips for Success