---
# System prepended metadata

title: 'Robonomics 2 gang switch with ESPHome: openHAB binding'
tags: [R devices]

---

# Robonomics 2 gang switch with ESPHome: openHAB binding

This article explains how to connect 2 gang Robonomics smart switch with ESPHome firmware to openHAB. This article assumes that you already uploaded ESPHome firmware on the switch. If no, refer to [previous article](https://hackmd.io/@nakata5321/SkO8ejq_T) first.

The article was written in openHAB 4.1.1.

## openHAB

### Binding

To connect ESPHome devices to openHAB first you need to install "ESPHome binding for the Native API". For this go to "Add-on Store -> Search" and type "ESPHome". Install it.

![image](https://hackmd.io/_uploads/HJg6rW3Fp.png)

### Things

Power on the switch and then go to "Settings -> Things". At the bottom of the page will be the "INBOX" button. Press on it. You will find a new device.
![image](https://hackmd.io/_uploads/SkC1OW3Yp.png)

If there is no "INBOX" button, press the button "new thing", choose ESPHome binding, and start scanning the network. This action will discover all available things.

![image](https://hackmd.io/_uploads/HyS3dW3tT.png)

Choose the discovered switch and add it. Return to the Things page. Choose the switch. At the top of the page, choose the "Channels" tab.

![image](https://hackmd.io/_uploads/rk56cWnFp.png)

Here press "Add Equipment to Model" and at the bottom of the new page choose "Select All". Then press "Add to Model".

![image](https://hackmd.io/_uploads/rJGCiWhFa.png)

### Add to Page

Now it's time to add buttons to a Page. Go to "Settings -> Pages". Create a new one or choose the existing one. In the example, we will create a new Layout page. Give the "Label" for the page.
![image](https://hackmd.io/_uploads/ryrnTWhK6.png)

Then press "add Masonry" and add a new item. Choose "Add from Model":

![image](https://hackmd.io/_uploads/Sk9-0b2Y6.png)
 Then "Pick" all items which you need:
 
 ![image](https://hackmd.io/_uploads/Hk_URZntT.png)

 and save Page. That's all. Now you can control the switch from openHAB.