Accéder au contenu principal

SONOFF RF BRIDGE + Pilight or How to extend the supported protocols by our little bridge

With version V0.9 of OpenMQTTGateway @steadramon & @puuu (the ESP library creator) enabled by their work to integrate Pilight library on OMG.

Permiting to increase significantly the list of RF protocols of OMG .

But now that we have this interesting possibility and with the goal of OMG of beiing multi boards compatible, why not trying to put Pilight on a Sonoff RF Bridge.

So as to do this test I ordered a new one so as to be on the same hardware as most of the users (my other RF Bridge is a demonstration old one)



So as to decode RF signals the Sonoff RF Bridge has a special dedicated chip (EFM8BB1) that communicate with the esp8285 with a serial connection.
If we want to increase the number of RF protocols compatibles on the device without modifying the hardware, the only software based solution is to hack the EFM8BB1. This hack is available and made by @Portisch.
The list of protocol is interesting but at the moment not as big as Pilight one. Maybe I will test this nice work later.

The second possibility is to modify the bridge hardware to connect directly the receiver and the emitter to the ESP8285. This way we are more close to the usage done traditionaly with OpenMQTTGateway, the decoder/encoder job is done by the microcontroller and not by a separate uc.

This is where @wildwiz enter to the scene, he made a detailled tutorial on ESPURNA wiki on how to do that, it is call the direct hack.

Here is my bridge before the modification.



No needs to detail more the hardware modifications to make, if you follow carrefully the instructions from @wildwiz it should be OK.
You need, to do that, some soldering dexterity due to the little components on which you will have to attach your resistors. 
Be ready (psychologically) also on breaking potentialy your RF Bridge.

Here is the result on mine after the modification:




You can see the two resistors added and the two cut traces.

Once the direct hack has been done we can upload to the bridge with OMG, 
so as to do that you can follow the tutorial on the wiki and stop before the software setup section. 

In terms of gateways to use we have now several possibilities:
  • ZgatewayRF
  • ZgatewayRF2
  • ZgatewayPilight
As the goal is to check the piligh library integration on the board we are going to try ZgatewayPilight of course.

We just left this one uncommented.

Regarding RF configuration we need to say to the ESP8285 that now he has to use the RF Bridge receiver and emitter pins. We configure config_RF.h like this
:
And that's all. Now upload the code to the bridge and you should see that when pressing a button (this extract contains also my other boards reception):



You see above that my arduino Uno with an ethernet shield is the first to answer but that s another story.

We can also now receive temperature and humidity from a DIGOO DG-R8S




You can of course send commands also by using the syntax detailled into the wiki and control power plugs or other actuators.

And that's it we have now extended the protocols supported by the SONOFF RF BRIDGE!


Commentaires

  1. Companies that produce industrial chemicals require products that are safe, rugged and resist chemical attack and wear. They produce magnetic and mechanical float level sensors, chemical compatibility, temperature and viscosity.
    Chemical Level Sensor

    RépondreSupprimer

Enregistrer un commentaire

Posts les plus consultés de ce blog

433toMQTTto433 - Bidirectional ESP8266 NodeMCU gateway between RF 433Mhz signal and MQTT

The goal  is to act as a gateway between 433Mhz sensors and a MQTT broker or between the MQTT broker and 433Mhz actuators, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets) with software like openhab.

List of compatible sensors here

The interest of putting this gateway to an ESP8266 and not on a raspberry pi is to be able to manage security actions at gateway level (power on a siren, cut power to certain devices) following RF data received by sensors without being dependent to the PI for security related actions.

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQTTGateway

You need:

Software:

MosquittoArduino IDE latest version (tested ok with 1.6.10)esp8266 board added to t…

Infrared IR, 433mhz and MQTT on ESP8266 bidirectional gateway OpenMQTTGateway

Following discussions on the home assistant forum people gave me the idea to add Infrared communication to the 433mhz gateway. 

The goal is to act as a gateway between 433Mhz sensors, infrared remote controls and a MQTT broker or between the MQTT broker and 433Mhz actuators, infrared devices, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal receive MQTT data from a topic and send infrared signal corresponding to the received MQTT data publish MQTT data to a different topic related to received infrared signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets), your tv, home cinema, hifi ... with software like openhab or home assistant.

List of compatible RF sensors here

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQT…

Adding infrared emitter to SONOFF RF BRIDGE

With the add of  SONOFF RF Bridge  to the OpenMQTTGateway compatibility list we were able to send and receive 433mhz by MQTT. 
The interesting thing with OpenMQTTGateway is the ability to have on one board several gateways (RF, IR, BLE and more to come ;-). 

The last versions of SONOFF RF BRIDGE as two IO free pins, why not using these pins to add a new gateway to this little cheap device and control more devices.



If we follow the interest of the different gateways you are more interested on RF and after comes IR infrared.

My choice came in this case to add an infrared emitter to the RF Bridge, with this gateway we are adding the capacity of controlling TV, DVD, hifi...

On the hardware side, I followed the same schematic for IR setup with ESP8266 with just a little add a protection resistor of 1K for the IR led.
The other resistor is connected between the transistor base and IO5 of the RF Bridge instead of D0.
The IR led is powered by the 3,3V of the Sonoff RF Bridge.

The schema:


Here is how i…