Example step by step to add a hardware device to newly installed openhab2

Just noticed this post: Smart light switch based on ESP8266

Tutorial so to speak on building an mqtt ac switch. FYI.