ESPURNA, SONOFF and OPENHAB

HI openHabbers, I am really a newbie in openHAB and enthusiast user of SONOFF Devices with ESPURNA firmware.

usually I configure them to operate with domoticz, but now, I would like to test OpenHAB cause I think that’s much bettere as domoticz.

BTW, in domoticz configuration is very simple and fast, but in OPENHAB I cannot find a way to create and or connect my devices to it.

Is there anyone who can help Me to understand how OpenHAB can receive from ESPURNA?

I usually use MQTT, and installed both MQTT Bindings and MQTT Internal Broker.
It seems from the log that I am receiving something from my DEVICE, but cannot understand how to create the binding to a specific device, and how to create channels to interact with ON/OFF switch or to read data such as TEMP/HUM or VOLTAGE, CONSUMPTION and so on.

Configuration is very confusing and I am lost between BINDINGS, SERVICES, THINGS…

:scream::scream:

1 Like

This is a screen of the data given by the SONOFF POW for example.

I would like to read all datas to store and have some graphs of power consumption, and also the ability to send a command to the switch to power ON or OFF the things connected to it.

Attached a few sreen shots of pages in ESPRUNA

I’ll start with this How to get started (there is no step-by-step tutorial) because I think you are running ahead before you have a good foundation to stand on.

At a high level:

  1. install and get your ESPURNA devices publishing to that broker. You can use the embedded broker or an external one like Mosquitto. Verify they are sending messages to the broker using some MQTT client (e.g. MQTT Explorer)

  2. Install the MQTT 2 binding

  3. Create an MQTT Broker Thing configured to connect to the broker.

  4. If you have Home Assistant enabled on the ESPURNA devices, you should be able to run a scan from the Inbox and the devices will automatically be discovered. If not then you need to manually create Generic MQTT Things to publish and subscribe to the right topics.

  5. Create Items and link them to the proper Channels on the MQTT Things.

  6. Build Rules, set up your UI etc. using the Items.

Thanks @rlkoshak I will try as soon as I can.
At first sigth it seems to be easier as I tougth…

Thanks again…

Hi to all… Finally with the help of @rlkoshak I have succeeded in configuring my first SONOFF in openHAB.

I am actually receiving data from a SONOFF POW. It tells me VOLTAGE, CURRENT, Power, Reactive Power and Apparent Power of things connected to it, but I cannot find how to add UNIT OF MEASUREMENT to the Items I have linked to the Thing.
They are all GENERIC numbers, but I would like to show for example the symbol “V” near the number expressing voltage, or the symbol “W” near POWER.

Any Idea on how to manage that via the paper UI?

You can’t in PaperUI. PaperUI is for administration so there is no customization possible. To build a UI for your home automation, you need to use sitemaps or HABPanel.

Hi, I’m using the Sonoff RF Bridge with the Sonoff PIR motion sensor and after a few configuration changes, I’ve found out how to use the PIR without a Rule to turn the state to “off”. In the Espurna Siwtches screen, simply change the “Pulse mode” to “Normally OFF” and change the “Pulse time” to whatever time you want the status to be updated. In my case it’s 3 seconds. Now I use Paper UI to capture the mqtt (Thing, Switch) of sonoffbridge01/relay/0 which is 1 for motion detected. Hope that helps.