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

[miio] Support Yeelight lamp9 & lamp10 #10061

Closed
mrumpf opened this issue Feb 6, 2021 · 2 comments · Fixed by #10763
Closed

[miio] Support Yeelight lamp9 & lamp10 #10061

mrumpf opened this issue Feb 6, 2021 · 2 comments · Fixed by #10763
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@mrumpf
Copy link

mrumpf commented Feb 6, 2021

The following lamps are not yet supported by the binding:

What do I need to do to add support to the binding? Currently, I just added an entry to the "yeelink.light.lamp1.json" file:

{
        "deviceMapping": {
                "id": [
                        "yeelink.light.lamp1",
                        "yeelink.light.lamp2",
                        "yeelink.light.lamp3",
                        "yeelink.light.lamp4",
                        "yeelink.light.lamp5",
                        "yeelink.light.lamp6",
                        "yeelink.light.lamp7",
                        "yeelink.light.lamp8",
                        "yeelink.light.lamp9",
                        "yeelink.light.lamp10",
                        "yeelink.light.strip4",
                        "yeelink.light.ct2",
                        "yeelink.light.mono1",
                        "yeelink.light.mono2",
                        "yeelink.light.mono4",
                        "yeelink.light.mono5",
                        "yeelink.light.panel1",
                        "yeelink.light.virtual"
                ],
...
}

And to the MiIoDevices.java file

...
    YEELINK_LIGHT_LAMP8("yeelink.light.lamp8", "Yeelight", THING_TYPE_BASIC),
    YEELINK_LIGHT_LAMP9("yeelink.light.lamp9", "Yeelight Staria Bedside Lamp Pro", THING_TYPE_BASIC),
    YEELINK_LIGHT_LAMP10("yeelink.light.lamp10", "Yeelight Staria Floor Lamp", THING_TYPE_BASIC),
    YEELINK_LIGHT_MONO1("yeelink.light.mono1", "Yeelight Bulb", THING_TYPE_BASIC),
...

But currently the binding fails to pull the token from the cloud so that I receive communication errors.

@mrumpf mrumpf added the enhancement An enhancement or new feature for an existing add-on label Feb 6, 2021
@marcelrv
Copy link
Contributor

easiest is to use the latest version of the binding and try the testcommands switch
it will try current known properties and build a best-quess json file from the responses.

image

If you know the existing models have the same features as your current, you can do as described above. (testing would be as simple as updating the model in your config with any of the id's in the above list)

Don't know why it is receiving the wrong token from the cloud. Is it maybe on muliple servers? (each server has different token, or was the token not yet refreshed?), or the light maybe not online?
In the userdata/miio folder you find the full response from the cloud, that may help in finding the right token

@marcelrv
Copy link
Contributor

@mrumpf did you manage to run that test feature and get the corresponding file

marcelrv added a commit to marcelrv/openhab-addons that referenced this issue May 27, 2021
close openhab#10061

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@marcelrv marcelrv linked a pull request May 27, 2021 that will close this issue
kaikreuzer pushed a commit that referenced this issue May 28, 2021
* [miio] add support for yeelight mono4
* [miio] add support yeelight lamp 9 & 10

close #10619
close #10061

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
computergeek1507 pushed a commit to computergeek1507/openhab-addons that referenced this issue Jul 13, 2021
* [miio] add support for yeelight mono4
* [miio] add support yeelight lamp 9 & 10

close openhab#10619
close openhab#10061

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this issue Oct 26, 2021
* [miio] add support for yeelight mono4
* [miio] add support yeelight lamp 9 & 10

close openhab#10619
close openhab#10061

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this issue Nov 7, 2021
* [miio] add support for yeelight mono4
* [miio] add support yeelight lamp 9 & 10

close openhab#10619
close openhab#10061

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
* [miio] add support for yeelight mono4
* [miio] add support yeelight lamp 9 & 10

close openhab#10619
close openhab#10061

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants