Accéder au contenu principal


Externalize the BLE devices decoding in a library - TheengsDecoder

 These last years OMG has grown leveraging different types of libraries for device decoding: RCSwitch at the beginning for RF/433mhz IRRemote and IRRemote ESP8266 for Infrared ESPilight and  RTL_433_ESP  for RF And many others for sensors, actuators, processing, mqtt... I thank all the maintainers and contributors of these libraries, without them, OMG would not exist. As you know OMG support also Bluetooth device decoding and control , we are not relying on a library for this, but rather on the OMG code. This is mainly due to the history, with the first reading of a Mi Flora by an HM10 integrated in November 2017 and the ESP32 reading of this same sensor in January 2018.  After BLE devices were added from time to time to reach a list of more than 25 devices compatible. A lot of other open-source software are using the BLE data broadcasted to propose a similar approach, sometimes dedicated to one or a range of devices, for a particular platform, or for a particular controller. My opini

Get your BLE sensors data into Home Assistant in 5 minutes

You can now upload your board directly from the web browser!  So let's imagine you want to read data from a sensor like a Mi Flora or a LYWSD03MMC,  Plug an ESP32 dev board to your computer USB port Go to this website: Select esp32dev-ble Click the install button Depending on your board you may have to press the BOOT button Choose the port that the ESP is connected to. Wait until the process is complete. Release the BOOT button That's it, OMG is now loaded into your ESP32 board without Arduino IDE, platformIO or a binary flasher. Here are the steps in images: Now comes the Home Assistant part: Add the MQTT integration and activate auto discovery Create a user and a password (Configuration->Users) without administrator right for the gateway Well, this is enough for Home Assistant. So let's now connect both: Check the Wifi Access points available with your smartphone Search for one named OMG_something or OpenMQTTGate

Low power ESP32 BLE gateway

For a few years now we are able to read BLE sensors with an ESP32 . These sensors are advertizing their data with a one to many communication principle. This type of BLE communication has the big advantage of being low power for the sensor, these BLE devices can last several months/years on a battery. This is especially interesting with home automation or use cases that don't require a long-range communication. My test regarding BLE range gives outside  around 60m/200ft  with an LYWSD03MMC  (a popular temperature and humidity sensor). That's enough to cover a house with one or a few gateways. Where it could be difficult is when you want to have BLE sensors outside, so as to monitor your vegetable garden moisture, have some temperature sensors into your greenhouse or check that your garage/storage room door is closed. It may be difficult for the sensor to reach the BLE gateway inside and you may not have power outside. Also you may not want to invest into a communication techno

A reliable Raspberry Pi 4B setup with UPS (power bank) and SSD

 After more than 4 years spent in home automation, the thing that bothered me the most was the regular failure of my Pi SD cards. These failures were the consequences of power supply issues and too much IO on the SD card. I could have tried to reduce the IO or to buy a better model of SD card. With a home automation system, you need something that is available when you need it. Not something that stops in the middle of your holidays. So here are the results of my recommendations: For the storage, it is now well known that the SD Card on the PI is subject to corruption, to avoid that you can put your system in read-only mode, try to reduce the writing, or install an SSD. The raspberry pi 4b can now also boot from the SSD. I choose this solution as I wanted to keep the DB on the Pi. For the UPS, I had the occasion to test several Power Bank without satisfaction. Indeed if the power bank you are using doesn't have a pass-through mode, you have a risk that the bank will stop at an unex

AVATTO S06 IR gateway compatible with OpenMQTTGateway

For this new post we will make it compatible with OpenMQTTGateway ; the BAKEEY IR remote on banggood or AVATTO S06 on Aliexpress (the links are affiliated). From this discussion on Home Assistant forum, I have deducted that the AVATTO gateways may be uploaded with new firmware, so I bought 2 of them. Thanks to their pinout information I was able to quickly get this device up and running with OMG. Overview The S06 is a compact IR bridge with FCC, CE, and RoHS marks,you can find it for less than 15$. Here are some photos: Disassembly It is not so easy to open, you will need a thin plate, insert it on the junction between the two box parts and do a lever effect at several locations. We can see inside that the microcontroller is a TYWE3S, the FCC datasheet   gives us plenty of information: ESP8266 1mb flash 50K RAM So we may be able to flash it with an FTDI and upload OMG. Here is the LED setup: It has 7 IR emitters LED, one receiver, and one blue LED. the IR LED is bigger compared to my

SONOFF MICRO USB switch review

I had the chance to test the sonoff micro (product given by itead), this device is an USB connected switch. You can control it from the Ewelink app and by the way power ON or OFF your USB devices. You can also program the start or the stop. It can answer several use cases: Restart your raspberry pi <4 if you are not at your home from a third party application Restart your ESP or Arduino Cut your smartphone power when it is charged Switch on or off devices powered by USB (mini lamp, mini fans...) The device is tiny but nevertheless be carefull it will not fit on all USB port environments. The button enable to power it on or off without smartphone and to put into pairing mode. The interesting stuff comes here, the device is rated for 5V 2.5A, it doesn't support Quick charge or power supply >5V. We see that the device support 2.4Ghz wifi as the other sonoff devices. If we check the current consumption without device we can see that


For this new article we will adapt a new device; the SMART RF & WIFI GATEWAY or SMART HOME MODEM (difficult to have the real name with this kind of generic product ...) The shape of the stick and its theoretical abilities attracted me at first time in aliexpress , I was asking myself what kind of microcontroller handle the wifi and RF on this size. A simple package with a short user manual and the USB Stick. At the rear a link enable to download an app, but it is not the way I want to go. If with a screw driver or a knife we open it, we can see a surprise ! It seems to have an ESP on it. We can see also a buzzer, a button and 2 leds. At the right we see the 433mhz antenna with its decoder. The part of the uC back that we can see looks like a lot with the back side of an ESP12 .We see also 4 small holes that remind us the kind of programming holes present on the SONOFF devices. Do they enable to flash the chip? By checking