Accéder au contenu principal

Articles

SONOFF RF BRIDGE with custom firmware

From an user request I took a look into the RF SONOFF Bridge, a quite interesting device from SONOFF. It is able to send and receive 433mhz signal with a very competitive price of less than 10€.

I already own several SONOFF Smart switches on which I loaded custom firmwares with success. One is working since months perfectly!

Here is how the RF bridge looks inside:




First thing I used to do when I launch some new development is to check the state of the art, as we often say google is your friend. And by searching the compatibility between the bridge and RCSwitch library (the main RF library of OpenMQTTGateway) I fall into the very good work of Xose Pérez (Tinkerman)
http://tinkerman.cat/hacking-sonoff-rf-bridge-433/
He ported successfully its ESPURNA code to the Sonoff RF Bridge.

After following its instructions and some mistakes from me (be careful about choosing the good line of pins on the bridge for your FTDI connectors :-( and choose the following parameters except the port) I successful…

Mi flora integration to OpenMQttgateway

Following some users requests on OpenMQTTGateway github I made some research and code to be able to read data from Mi Flora sensor also known as xiaomi flower sensor. The goal is to connect the mi flora to an mqtt compatible controller like openhab or home assistant with a simple arduino or esp8266 connected to an hm10/11 module.


Mi flora use Bluetooth Low Energy technology to communicate to a smartphone.  It gather on one sensor temperature, humidity, hygro and fertility measurement. These measures are available through an app on your smartphone so as to monitor your plants.
As this device use BLE the idea was to be able to read the measures with OpenMqttgateway through the hm10 component.
Some code and library are already available in python for the pi or equivalents. But not for arduino or esp8266.
This is where it begins.
With the current gateway version we were able to receive the mac adress of ble devices including the mi flora one. But not the device measures.
I tried the different …

Changing the openmqttgateway pinout !

By adding more and more modules to the gateway free pins begins to be difficult to find.
The classic wiring used since the begining doesn't answer to the need of adding i2c or rfm69. Rfm69 for instance use fixed pins already used by other component.
Due to these issues we had to redesign a new wiring.
There is no anymore classic, I2C or RFM69 wiring selection in configuration. We now have only one wiring with RF, IR, I2C, ADC, HCSR501 and BT gateway. If you want to add RFM69 and DHT you need to remove I2C , BT and HCSR501.

These 2 configurations are described here.



Of course you can adapt these configurations to suits your needs, they are not a fixed base. 
They are only suggestions corresponding to the wiki schematic and config pins
Thanks for the big work of @hannesdi on the wiki/tests and the suggestion of using RX pin from @gammelobst.

KAKU A new protocol supported by OpenMQTTGateway

The first gateway done with OpenMQTTGateway was the RF one based on RCSwitch (all began with that :-)).  This library is quite robust and support some basic protocols, unfortunately its development is not so active. You could ask me to add protocols directly to the RCSwitch library, but without going this way I was looking for protocols adds with efficient solutions already built (time is a rare commodity). By googling and discussing on the forums I found the NewRemoteSwitch library from Fuzzylogic.  This library enables to control among others KlikAanKlikUit devices with an Arduino. I tried to port to ESP8266 and with some lite modifications it worked! With the help of @DenDeze who did some tests on the library modification, KAKU is now integrated to the gateway since V0.4-beta release.
The KAKU Protocol is used for instance by DIO chacon devices. Example below :


For this gateway named RF2 I use the same hardware receiver and transmitter as RCSwitch gateway with also the same pinout. 
Se…

Why adding RFM69 compatibility to OpenMqttGateway

The next release of OpenMQTTGateway will introduce the compatibility with RFM69 transceivers based on the work of lowpowerlab and bbx10.
After some discussions about what will be the new module for OpenMQTTGateway we concluded that the rfm69 from HopeRF would be a good candidate. I did the implementation with the most powerfull variant of RFM69 the RFM69HCW.




It offers in one module :
Emission and receptionIt support multiple frequencies 315, 433, 868 and 915mhzIt has a range of several hundred metersIt has acknowledgment, you know when the data sent has been received by the recipientsIt can adapt its power related to the distance between sender and receiverIn some word you can now have mqtt data from far sensors with low power consumption.


This first implementation support the rfm69 library which make it compatible de facto with moteinos low power boards.
A second step could be to integrate the library from jeelabs to be compatible with jeenodes and openenergymonitor.
And we can also exp…

New major version of OpenMQTTGateway V0.3

I'm pleased to announce OpenMQTTGateway V0.3 release with the following content:

Add BLE beacons detection thanks to HM10 keyes moduleThis is a major add, you can now detect BLE beacons that are into the gateway perimeter for presence detection, the gateway publish the beacon adress and the signal strength Add the possibility to pass raw data to and from mqtt from and to IRNow you can pass raw IR signal and receive also them
Add RF and IR repeater functionThis function enable to increase the range of your devices by repeating the received signals with the gateway.
Add the ability to handle RF codes with different bit length than 24Add the possibility to filter unknown protocols for IRAdd the possibility to take into account Sony IR protocol special parametersCorrect DHT wrong pin assignementAdd an option to don't resend dht temperature and humidity when there is no value changeChange to GPL V3 license to prepare future libraries addThe new version is available on the github

Ina226 voltage and current sensor with esp8266 sending by MQTT

I needed to measure the voltage and the current of my lawn mower robot, as i have already an home automation system, the point was also to integrate these measures into Openhab and idealy using mqtt protocol. The first idea that came up was to use a voltage divider to measure the voltage with the esp8266 analog pin.Nevertheless i found some contradictives infos about this, the accepted voltage was low between 1v and 2v depending on the sources. Unfortunately my battery is a 28,4v one.
With some search I found on banggood the ina226 sensor already soldered and ready to plug with an arduino. The question was; is this compatible with an esp8266 to allow an easy integration with my home automation system.
The answer is yes.

Thanks to the help of Shelvin blog here are the details:

Pinout for a NODEMCU: Nodemcu/INA226 D1/SCL D2/SDA GND/GND 5V/VCC
IN+ & IN- correspond to the current meter for the tests, I linked them before the INA226 power so as to have some current measurements. VBS is for volta…