Orvibo binding for B25EU sockets

Hello,
is the orvibo s20 binding supporting B25EU sockets? If not, is expected to be added? Or if the protocol is known, I am able to add it to the binding , but I need to know the protocol.

Hi,
i need the binding for b25EU, too. Is anybody working on it?
Thanks.

I found this solution:

  1. I uploaded a new firmware on the socket using Souliss (www.souliss.net)
  2. I used them with the Souliss Binding on openhab.

It works like a charm and Souliss is the best for Arduino and ESP8266 boards. (The orvibo B25EU is an ESP8266 ).

1 Like

How exactly did you do that?

If you like , I could post my souliss firmware, but you have to have an arduino to program the B25EU.
Pratically:
1- see this: https://blog.slange.co.uk/orvibo-b25-wifi-power-socket/
2- write a firmware that is able to have the same behavior as the original:
3- upload it on the orvibo B25EU

To program the socket:

First of all, install arduino IDE an try with souliss (I can post my code)

When you will have uploaded the firmware, you have to use the souliss binding in order to have the socket on openhab.

2 Likes

@lucarui

Thank you very much. :slight_smile:

Sounds a bit complicated. :wink:

Thought the “socket programing” was a bit easier. Unfortunately, I do not have an Arduino …

But thanks anyway!

Thanks.
I am a newbe and trying to manage openhab.
Arduino sounds for me like a new project.
Is there any solution on binding level?

Hi Lucari,

as a newbe, i bought now the arduino uno and installed the IDE on ubuntu, add ESP8622 Thing and library souliss.
i tested the arduino uno with blink exaple and it works.
from here, i hope you can help me out:

At "https://blog.slange.co.uk/orvibo-b25-wifi-power-socket/ ", you describe the sonoff firmware, which is not available at openhab as binding. only souliss is available in openhab.

  1. how can i upload the souliss firmware to B25 Socket?
  2. What are the packages, i need to dowload to upload via IDE on B25 to use the typicals descriped in “https://github.com/souliss/souliss/wiki/Typicals” ?
  3. what do you use to connect at TX and RX, 5V, GND on platine? i’ve just wires.

Sorry for troubling you with stupid questions.

thanks in advance

Sorry for the delay…

  1. physically in this way:
    link the arduino’s RST to arduino 's GND
    link arduino 's 5V to Orvibo’s 5V(is the “gold” pin)
    link the arduino 's GND to orvibo’s GND
    link RX to RX and TX to TX
    Link arduino 's 5v to orvibo’s GPIO0 when you connect the arduino to the PC in order to set the orvibo’s ESP8266 in programming mode
    upload firmware
    the firmware you have to use is , for example, this one:

#include “SoulissFramework.h”

// Configure the framework
#include “bconf/MCU_ESP8266.h” // Load the code directly on the ESP8266
#include “conf/Gateway.h” // The main node is the Gateway, we have just one node
#include “conf/IPBroadcast.h”

uint8_t ip_address[4] = {192, 168, 0, 84};
uint8_t subnet_mask[4] = {255, 255, 255, 0};
uint8_t ip_gateway[4] = {192, 168, 0, 1};

#define Gateway_address 77
#define Peer_address 84
#define myvNet_address ip_address[3]
#define myvNet_subnet 0xFF00
#define myvNet_supern Gateway_address

//RESET SOFTWARE
#define VNET_RESETTIME_INSKETCH
#define VNET_RESETTIME 0x00042F7 // ((20 Min*60)*1000)/70ms = 17143 => 42F7
#define VNET_HARDRESET ESP.reset()

// **** Define the WiFi name and password ****
#define WIFICONF_INSKETCH
#define WiFi_SSID “XXXXX”
#define WiFi_Password “XXX”

// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>

/*** All configuration includes should be above this line ***/
#include “Souliss.h”

#include <SoftwareSerial.h>

#include <ArduinoOTA.h>

//LOGICS & DEF
#define RELAY 5
#define BUTTON 14
#define LED1 4
#define LED2 12
#define RELAY_SLOT 0

void setup() {

//PER ORVIBO BISOGNA SETTARLO AD 1
digitalWrite(0,HIGH);

Serial.begin(115200);

Initialize(); //Souliss initialization

SetIPAddress(ip_address, subnet_mask, ip_gateway);

//SetAsGateway(myvNet_address); // Set this node as gateway for SoulissApp
// Port defaults to 8266
// ArduinoOTA.setPort(8266);

// Hostname defaults to esp8266-[ChipID]
ArduinoOTA.setHostname(“Souliss-S20SmartSocket3”);

// No authentication by default
// ArduinoOTA.setPassword((const char *)“123”);

ArduinoOTA.onStart( {
Serial.println(“Start”);
});
ArduinoOTA.onEnd( {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf(“Progress: %u%%\r”, (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println(“Auth Failed”);
else if (error == OTA_BEGIN_ERROR) Serial.println(“Begin Failed”);
else if (error == OTA_CONNECT_ERROR) Serial.println(“Connect Failed”);
else if (error == OTA_RECEIVE_ERROR) Serial.println(“Receive Failed”);
else if (error == OTA_END_ERROR) Serial.println(“End Failed”);
});
ArduinoOTA.begin();
Serial.println(“Ready”);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

//Set typicals
Set_T11(RELAY_SLOT);

pinMode(RELAY,OUTPUT);
digitalWrite(RELAY,LOW);



pinMode(BUTTON,INPUT);
digitalWrite(BUTTON,LOW);

digitalWrite(LED2,LOW);

pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);

}

void loop() {

ArduinoOTA.handle();

//delay(100);
// Here we start to play
EXECUTEFAST() {
UPDATEFAST();

    FAST_510ms()
    {
      if(digitalRead(BUTTON)==LOW)
      {
    if(mOutput(RELAY_SLOT)==Souliss_T1n_ToggleCmd)
    {
      mInput(RELAY_SLOT)=Souliss_T1n_OffCmd;
    }
    else
    {
      mInput(RELAY_SLOT)=Souliss_T1n_OnCmd;
    }
      }

      Logic_T11(RELAY_SLOT);
      DigOut(RELAY,Souliss_T1n_Coil,RELAY_SLOT);
      DigOut(LED1,Souliss_T1n_Coil,RELAY_SLOT);
      LowDigOut(LED2,Souliss_T1n_Coil,RELAY_SLOT);
    }

    //FAST_GatewayComms();
    FAST_PeerComms();
}                                                        

}

  1. You have to follow the guide I shared on previous post in order to import Souliss on Arduino IDE. Then the only thing you have to upload on orvibo is the firmware I’m posting now.

  2. 5v on platine, then Tx , Rx, GPIO0, GND

Stupid questions don’t exist!!! :wink:
I’m here if you need.

on openhab you have to configure the Souliss Binding.
This is an example: https://github.com/openhab/openhab1-addons/wiki/Souliss-Arduino-based-SmartHome-Binding

thanks. i’ll try as soon as possible and give you feedback.
What do you think about applying MQTT to B25EU? Do you think, it may work?