Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Friends of Hue Switches #22

Closed
philipparndt opened this issue Dec 19, 2020 · 3 comments
Closed

Add support for Friends of Hue Switches #22

philipparndt opened this issue Dec 19, 2020 · 3 comments
Assignees

Comments

@philipparndt
Copy link

Currently, a Friends of Hue switch will be handled as an "unknown" sensor.
The problem is, that it is not possible to access the state of an unknown sensor.

Here is an example json message from the hue API for a "Senic" Friends of Hue Switch.
There seems to be nothing specific for "Senic" in this message.

{
    "capabilities": {
        "certified": true,
        "inputs": [
            {
                "events": [
                    {
                        "buttonevent": 16,
                        "eventtype": "initial_press"
                    },
                    {
                        "buttonevent": 20,
                        "eventtype": "short_release"
                    }
                ],
                "repeatintervals": []
            },
            {
                "events": [
                    {
                        "buttonevent": 17,
                        "eventtype": "initial_press"
                    },
                    {
                        "buttonevent": 21,
                        "eventtype": "short_release"
                    }
                ],
                "repeatintervals": []
            },
            {
                "events": [
                    {
                        "buttonevent": 19,
                        "eventtype": "initial_press"
                    },
                    {
                        "buttonevent": 23,
                        "eventtype": "short_release"
                    }
                ],
                "repeatintervals": []
            },
            {
                "events": [
                    {
                        "buttonevent": 18,
                        "eventtype": "initial_press"
                    },
                    {
                        "buttonevent": 22,
                        "eventtype": "short_release"
                    }
                ],
                "repeatintervals": []
            }
        ],
        "primary": true
    },
    "config": {
        "on": true
    },
    "manufacturername": "PhilipsFoH",
    "modelid": "FOHSWITCH",
    "name": "Some Name",
    "productname": "Friends of Hue Switch",
    "recycle": null,
    "state": {
        "buttonevent": 22,
        "lastupdated": "2020-12-17T08:32:32"
    },
    "swupdate": {
        "lastinstall": null,
        "state": "notupdatable"
    },
    "swversion": null,
    "type": "ZGPSwitch",
    "uniqueid": "00:00:00:00:01:23:45:67-89"
}

Can you add support for this? Or would you accept a PR?

philipparndt added a commit to philipparndt/yetanotherhueapi that referenced this issue Dec 20, 2020
@ZeroOne3010
Copy link
Owner

Hey, thank you very much for this issue and the pull request! Sorry for the delay in replying. 🎅 I'd definitely love to add support for Friends of Hue. 👍 I'll comment some more on the PR.

ZeroOne3010 added a commit that referenced this issue Jan 5, 2021
Addresses #22, "Add support for Friends of Hue Switches"
@ZeroOne3010
Copy link
Owner

@philipparndt Would you mind checking whether my switch overhaul at #24 would make sense to you and would fulfil your need for FoH support?

@ZeroOne3010
Copy link
Owner

Resolved in #24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants