Maker API

I'm using the Maker API and one device returned a current value with two instances of the switch attribute. And it's missing the level (for a Hue bulb).

Is this a bug or simply a misfeature?

Would need to see what the device details screen shows for states on the right of the commands. Maker API only returns what the devices object reports.

Is it only for a specific device or a specific driver?

I can investigate more but this is one example I can get when I simply send the device ID to get the current value

{
    "id": "81",
    "name": "hueBridgeBulb",
    "label": "Backporch1",
    "attributes": [
        {
            "name": "level",
            "currentValue": 50,
            "dataType": "NUMBER"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        }
    ],
    "capabilities": [
        "Switch",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "SwitchLevel",
        {
            "attributes": [
                {
                    "name": "level",
                    "dataType": null
                }
            ]
        },
        "Refresh",
        "Actuator",
        "Light",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "ChangeLevel"
    ],
    "commands": [
        "off",
        "off",
        "on",
        "on",
        "refresh",
        "setLevel",
        "startLevelChange",
        "stopLevelChange"
    ]
}

Yes. This is normal. Look further down and you can see that the capabilities have two switch attributes. So both get returned. Both light and switch capabilities have a switch attribute.

OK. Just expected them to be coalesced or else marked to differentiate them. As long as they have the same value I can handle it.

Can I overlap maker API requests? If have two devices and using async I can send commands for each one and request status. The requests seem to trip over each other.

Look at the lack of event logs even after a reboot I now suspect that I'm a victim of Zigbee ... perhaps at the edge of distance or just buggy. Going to switch to LIFX bulbs.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.