Own binding as a REST server Add-ons Bindings restapi rest

Hi!

I want to create binding for Supla.org devices. This binding should be simply a REST server that is compatible with this client https://github.com/SUPLA/restful-api-client/blob/master/php/SuplaCloudClient.php3 (warning PHP code :wink: ).

How can I do it? Can I use some javax.ws.rs classes? Do I need to provide my own server (Tomcat/Jersey)?

Thank in advance!

Anyone?

So if I understand you correctly, then you want to replace the Supla-cloud by openHAB? If not, then I don’t see the purpose of a REST server.

You may want to update your topic title because it is quite unclear.

Sorry for being unclear.

Basically yes - I want to replace supla cloud. Thanks to this I will bind OpenHab with supla devices. Thanks to this I will be able to control Suplas with my OpenHab application (either web or mobile), because for us it will be only things (OpenHab nomenclature)

Hey @marcel_erkel can you give me some update?

Hi Martin,

I googled a bit. I don’t think you’ll need to build a REST server. The Supla devices seem to use their own proprietary protocol:

You probably also want to look at this file. This seems to contain how the cloud application talks to the supla server’s socket.

And take a look at supla-core which seems to contain the supla server which communicates with the devices.

Once that is all clear, start with the openHAB developer guide.

Then make a decision whether you want the binding to talk to the Supla server (the easier, but still not easy option) or have the devices talk to your binding without the use of the Supla server.

That’s about what I can tell. If you’re a seasoned programmer and like a challenge then I would say go for it. Because a challenge it will be; there seems to be no documentation at all.

So unless you already bought a lot of Supla devices, I would consider a different technology.

1 Like