How to create new binding?

To whom it may concern,

I am developer of Yeelight, and I would like to create new binding for Yeelight devices.

But I didn’t find any developer guide in the web portal.

Does anyone here could help and show me where I can find the developer document?

Best Regards!

2 Likes

Does this help :
http://docs.openhab.org/developers/

Hi,
Try out the following links too.
Concepts of Eclipse Smarthome:- https://www.eclipse.org/smarthome/documentation/index.html
IDE setup for binding development:- https://www.youtube.com/watch?v=o2QjCGdZl7s
Introduction to bindig development:- https://www.youtube.com/watch?v=30nhm0yIcvA

Regards,
Abin

It helps! Thanks!

Run into this error when trying to create_openhab_binding_skeleton, any advise?

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.845 s
[INFO] Finished at: 2016-10-24T15:32:20+08:00
[INFO] Final Memory: 23M/274M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project pom: The desired archetype does not exist (org.eclipse.smarthome.archetype:org.eclipse.smarthome.archetype.binding:0.9.0-SNAPSHOT) -> [Help 1]

Hi,

Have you installed maven??

Regards,
Abin

I tried again, it works. Weird! Nothing changed.

K. All the best for the project.

Regards,
Abin

Abin,

I have successfully create binding and run it.

I have one question, when I trying to add a thing, I need specify thing ID, which suppose to be the unique device ID for my case. What if user don’t know the device ID, is there some kind of discovery logic that scan specific thing around?

Regards!
-Coaster

Yes, you can find documentation of MDNS and UPnP discovery here

1 Like

That’s exactly what I am looking for! Great thanks!

so… the binding you are developing… this will allow us to control the Yeelight wifi bulbs for example without the Mi Home application?

I have a few Yeelight bulb lying around doing nothing, just waiting to be integrated in openhab :slight_smile:

1 Like

Coding complete, will publish soon.

1 Like

Really cool!!!

If you need testing… let me know!

looking forward to this :slight_smile:

Pull request created, waiting for review.

You can try in advance if you want.

1 Like