Homebridge: This isn't sufficiently documented

Created on 21 May 2017  路  5Comments  路  Source: homebridge/homebridge

I just got a bunch of colorful LED strips and wanted to give them the HomeKit treatment with a bit of help from this guide, but halfway through I noticed it was absolute garbage, because it doesn't explain anything. Then I went here and found out that the readme doesn't, either.

My code looks pretty much like the one from the guide. After 8 hours of trying not to hurl my Raspberry Pi into the sun, my energy is pretty much gone, so I haven't been able to refactor that mess into something pretty yet.

Homebridge's output when moving the fancy sliders of Apple's Home app around is basically this:

[5/21/2017, 9:29:46 AM] [Farblicht] setPowerState() successfully set to ON
[5/21/2017, 9:29:47 AM] [Farblicht] setPowerState() successfully set to OFF
[5/21/2017, 9:30:05 AM] [Farblicht] Caching Hue as 0 ...
[5/21/2017, 9:30:05 AM] [Farblicht] _setRGB converting H:0 S:NaN B:100 to RGB:ffNaNNaN ...
[5/21/2017, 9:30:05 AM] [Farblicht] Caching Saturation as 100 ...
[5/21/2017, 9:30:05 AM] [Farblicht] _setRGB converting H:0 S:100 B:100 to RGB:ff0000 ...
[5/21/2017, 9:30:05 AM] [Farblicht] _setRGB converting H:0 S:100 B:100 to RGB:ff0000 ...
[5/21/2017, 9:30:05 AM] [Farblicht] ... _setRGB() successfully set to #ffNaNNaN
[5/21/2017, 9:30:05 AM] [Farblicht] setPowerState() successfully set to ON
[5/21/2017, 9:30:05 AM] [Farblicht] ... _setRGB() successfully set to #ff0000
[5/21/2017, 9:30:05 AM] [Farblicht] ... _setRGB() successfully set to #ff0000
[5/21/2017, 9:30:16 AM] [Farblicht] brightness is currently at NaN %
[5/21/2017, 9:30:16 AM] [Farblicht] ... hue is currently NaN
[5/21/2017, 9:30:16 AM] [Farblicht] power is currently OFF
[5/21/2017, 9:30:16 AM] [Farblicht] ... saturation is currently NaN
[5/21/2017, 9:30:30 AM] [Farblicht] power is currently OFF

I can set colors, but brightness, hue, and all the other fancy options seem to be completely unsupported.

Needless to say, this is unusable. Please provide documentation on what can go into an accessory object in config.json and what parameters and responses Homebridge expects. I suggest doing something like shairport-sync with its config file: Just list everything, put detailed descriptions behind everything and comment out the bits that aren't absolutely critical.

Just please, please don't make me read code to figure out how something works.

Thanks for your consideration.

stale

Most helpful comment

Instead of submitting an issue with an entitled "I want this so you need to do it" attitude, perhaps something more constructive? You realize this is an open source hobby project right? Feel free to submit a pull request with some documentation if you feel so inclined.

All 5 comments

Just for clarity, I should perhaps add that I'm writing a Flask application that runs on a Raspberry Pi and, when the right URLs are called, interacts with the attached LED strips.

My config.json looks like this:

{
    "bridge": {
        "name": "AmbiencePi",
        "username": "CC:22:3D:E3:CE:32",
        "port": 51826,
        "pin": "031-45-155"
    },
    "description": "Homebridge",
    "accessories": [
        {
            "accessory": "HTTP-RGB",
            "name": "Farblicht",

            "switch": {
                "status": "http://127.0.0.1:5000/mote/api/v1.0/status",
                "powerOn": "http://127.0.0.1:5000/mote/api/v1.0/on",
                "powerOff": "http://127.0.0.1:5000/mote/api/v1.0/off"
            },

            "brightness": {
                "status": "http://127.0.0.1:5000/mote/api/v1.0/brightness",
                "url": "http://127.0.0.1:5000/mote/api/v1.0/brightness/%s"
            },

            "color": {
                "status": "http://127.0.0.1:5000/mote/api/v1.0/set",
                "url": "http://127.0.0.1:5000/mote/api/v1.0/set/%s",
                "brightness": true
            }
        }
    ],
    "platforms": []
}

The brightness part is just a guess, based on scripts by other people, but it's not even working.

I'll need that documentation to get anywhere with this.

You need a plugin to control them. I suggest homebridge-better-http-rgb

Instead of submitting an issue with an entitled "I want this so you need to do it" attitude, perhaps something more constructive? You realize this is an open source hobby project right? Feel free to submit a pull request with some documentation if you feel so inclined.

@GeorgeBgk Got it, thanks!

@rage8885 I won't even dignify that with a full answer.

This issue has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

a2ron44 picture a2ron44  路  5Comments

morilm picture morilm  路  6Comments

StefanMeGit picture StefanMeGit  路  4Comments

350d picture 350d  路  6Comments

INFINIX98 picture INFINIX98  路  5Comments