Skip to content

Multi bridge

Frederic Bardin edited this page Dec 29, 2025 · 2 revisions

Multi-bridge

Multi-bridge is integrated in phpMyHue since v1.9
It is managed thru config files, 1 per bridge.


Create a new config file manually

To create a new configuration, copy an existing config file from the 'include' directory (ie.: 'config.php' or the template 'config.tpl.php') and name it 'config_bridgename.php' (without any space).
Respecting the pattern allows auto-detection of multi configuration.

Update the copied file with your bridgename features (protocol, ip, username).


Search for a new bridge automatically

If you do not have all the new bridge feaatures (ie.: no known username), you can let the automated configuration do the job.
Meanwhile, as a configuration already exists, you need to 'hide' it to trigger the automated process:

  1. Rename all configuration files except the template 'config.tpl.php' by adding a prefix to their name (ie config.php => zconfig.php).
    It will prevent any detection.

  2. Reload the main phpmyhue page to trigger the automated configuration, then follows the instructions.

  3. When the new configuration is available, rename back all the configuration files by removing their prefix.
    If the new bridge was created with 'config.php' then rename it manually as 'config_bridgename.php' to allow multi-configuration auto-detection.


How to use multi-configuration files

  • By selection : each time you run a new phpmyhue session, it will detect multi-config and will ask once which file to use

  • By url : you can directly provide the configuration file to use by adding it to the phpmyhue url as follows:
    <phpmyhue url>?cfg=<config file name> (without the '.php' extension)
    ie. *https://myphpserver/phpmyhue?cfg=config_mybridge"

    By this way, it is simple to create a bookmark per configuration for a more simple use.

Remark: You can rename all your config files as 'config_bridgename.php' and not use anymore the 'config.php' file, it will work.

Clone this wiki locally