Homebridge Plugin

Hi all!

I’ve added a new feature to Custom Apps: Config Scripts

Config Scripts are Node.js modules that you can execute to dynamically build configuration parameters before they are passed to the Render Script . This allows you to tap into the vast ecosystem of modules available on npm to build your own connected applets.

A Config Script is a very simple Node module that exports a single function that returns a Promise that resolves to an array of key/value pair objects. The most trivial example looks like this:

module.exports = function(config) {
    return new Promise(function(resolve) {
        resolve([
            {
                key: 'foo',
                value: 'bar',
            },
        ]);
    });
};

I’ve put together a little tutorial to demonstrate how Config Scripts can be used in conjunction with Render Scripts to pull data from the XBOX LIVE API and push your Gamerscore to your Tidbyt device.

Here is the final result:

Let me know what you think.