Sonoff Binding (RESTful)

I had the idea to get some of those sonoff touch swiches because they look just better as the my current ones and they need to go by the end of the year.
But I will only get them if they can be controlled in OH without any internet connection. I don’t want to connect to any ewelink servers or anything else, only local network.

They have WLAN, DIY developer documentation sais they have RESTful API, but on OpenHAB it seems noone cares. There are no new contributions and everyone using the old MQTT approach. (which should be last resort for any connection).

Are there any bindings you can use for your sonoff devices?
Do you guys all use the plain HTTP binding?

Why? It’s all local (no internet connection required), lighter weight than an HTTP server when running on a microcontroller, and offers features HTTP cannot such as quality of service, offline detection/reporting, and automatic discovery of devices that follow one of the several supported standards. It’s also more reactive since changes are pushed to OH rather than OH needing to poll the device for changes.

There is a reason we have so many X2mqtt services out there (e.g. zigbee2mqtt) instead of z2http services.

I can’t find an official Sonoff binding for OH so I’m not able to find out any information on the binding.

Double check that the switches you are looking at are in the list of supported devices in the Sonoff REST API docs to make sure these are among the supported devices. The list is rather short.

But assuming the devices are supported, the plain vanilla HTTP binding would work just fine with this API. You don’t get automatic discovery so you can skip the first half of the docs. You’ll just need some JSONPATH and possibly Jinja to format the POST request payloads to the devices to command them.