While looking for new sensors, I came across the AZ-Envy from AZ-Delivery and was initially enthusiastic about the description of the sensor board. Of course, I ordered three of them. Anyone who has already dealt with the price issue for sensors knows that one sensor alone is quite expensive, but three or five in a pack usually only cost a few euros more. This is probably due to the fact that the free shipping costs and the processing fee which is also part of the price.

Now a few sentences about the board. I don’t understand why no data lines were added to the USB port. As a result, installing the firmware (for beginners as described so nicely in the ad) is extremely complicated. The standard ESP32 or ESP8266 can be flashed much more easily. Of course, once the first firmware is flashed, all other changes can be made via an Over The Air Update (OTA).

But what bothers me most about the board design is that the temperature sensor is right next to the heater of the gas sensor. Even if the sensor has been running for a while, the temperature sensor spits out a wide variety of values. Unfortunately, no offset helps to adjust the temperature. I haven’t compared the humidity with any other product so far, but from what I’ve read on the Internet, the Dev-Board doesn’t seem to work reliably either.

Hardware required for commissioning

Required software

3D printer housing

Download 3D-print Box

Creation of the firmware flash file

There are two ways to create the flash file. Here I am describing one of them.

  • Flash file created with ESPHome.io
  • Flash file created with HomeAssistant

Generate firmware with HomeAssistant

ESPHome HomeAssistant

Install ESPHome under HomeAssitant.

Configure and open ESPHome

Press the + button at the bottom of the page

Enter Projektnamens

Enter SSID (WLAN Name)

Enter WLAN Passworts

Press button “next”

Choose ESP8266

Press button”next”.

A congratulation logo should appear. In case of an error, simply press “next” again

The new project has been created and is not yet connected (therefore red).

Press Install and then Manual download

The firmware is compiled and then downloaded.

This file can then be installed via the terminal.

EZ-Envy-1.yaml

esphome:
  name: humidity
  platform: ESP8266
  board: nodemcuv2
  
i2c:
  - sda: GPIO4
    scl: GPIO5
    id: bus_a

sensor:
  #Temperatur und Luftfeuchtigkeit
  - platform: sht3xd
    i2c_id: bus_a
    address: 0x44
    
    temperature:
      name: "Temperatur"
      id: "temperature"
      filters:
      - offset: -10.0
    humidity:
      name: "Luftfeuchtigkeit"
      id: "humidity"
      filters:
      - offset: 8.0
    update_interval: 10s
    
  # MQ2 Smoke Gas Sensor
  - platform: adc
    pin: A0
    name: "Gassensor"
    update_interval: 10s
    #filters:
    #  - multiply: 100
        #unit_of_measurement: "%"
    filters:
     lambda: |- 
       return (x * 1024/5);
    unit_of_measurement: "ppm"  
    icon: "mdi:percent" 
    
    
# Enable logging
logger:

....
....

AZ-Envy Firmware flashing via Terminal

AZ-Envy

First you have to connect the FT232RL Flasher Board to the AZ-Envy. However, you only need three individual wires (jumper wire). Only the pins GND, RX, TX need to be connected.

Then the AZ-Envy must be supplied with voltage and the FT232RL USB cable is then connected to the PC. You can also connect both USB cables to a USB hub (with external power supply) and then go from there to the PC.

The following steps have to be taken:

  • Create Firmware flashfile with HomeAssistant or ESPHome.
  • Connect EZ-Envy to FT232RL
  • Connect the AZ-Envy and FT232RL to a USB hub with an external power supply
  • Connect the USB hub to the PC
  • Open Terminal and go to the ESPTool folder
  • Command: sudo python esptool.py –port / usbPort / write_flash 0x00000 yourFile.bin
sudo python esptool.py --port /dev/tty.usbserial-A50285BI write_flash 0x00000 ez-envy-1.bin

Bekannte Probleme beim flachen

If the device is not recognized correctly and the following output appears.

  1. Hold down the flash button on the EZ-Envy
  2. Unplug the EZ-Envy’s USB cable and plug it in again.
  3. Now the firmware should be flashed (see picture below)

My conclusion on the AZ Envy

As a development board, I think the board is really successful and it’s fun to work with. If you print out the corresponding case, the price is still reasonably reasonable. The housing also shields the temperature sensor a little from the heating of the gas sensor. Unfortunately, this does not make the temperature values more accurate either.

I will now use my sensor as a gas sensor in the boiler room.

Mit der Hilfe eines ESP8266 und eines einfachen IR Modules kann am Stromzähler der aktuelle Stromverbrauch ausgelesen werden ohne das man den Stromzähler PIN benötigt. Die ausgelesenen Werte können dann mittels Home Assistant HASSIO grafisch dargestellt werden.

Benötigte Hardware

Benötigte Software

Aufbau

eHz Elektronischer Haushaltszähler

eHz Digitaler Stromzähler (ESP8266)

Das Gehäuse aus dem 3D Drucker passt beim eHz Elektronischen Haushaltszähler. Mit zwei Magneten wird das Gehäuse am Zähler befestigt da der Stromzähler Eigentum des Netzbetreibers ist!

Die rechten beiden IR Dioden werden beim IR Lese-Schreibekopf verwendet (Volkszähler). Dabei wird permanent zwischen den Unterschiedlichen zur verfügung stehenden Zählerständen geschalten und diese ausgelesen (PIN muss beim jeweiligen Energiekonzern angefragt werden).

In unserem Fall benutzen wir die mittlere IR-Diode zum auslesen des aktuellen Stromverbrauchs am Zähler.

ESP Home config.yaml

esphome:
  name: strom
  platform: ESP8266
  board: nodemcuv2
  
# Sensor configuration
sensor:
  - platform: pulse_counter
    pin: D5
    name: "Energieverbrauch"
    unit_of_measurement: 'W'
    update_interval: 60s
    filters:
      - multiply: 6
    accuracy_decimals: 0
    icon: 'mdi:flash'
    id: energieverbrauch_w
    
  - platform: total_daily_energy
     name: "Tagesverbrauch"
     power_id: energieverbrauch_w

time:
  - platform: sntp
    id: my_time

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: „xxxxxxxxxx“

wifi:
  ssid: „xxxxxxxxxx“
  password: „xxxxxxxxxx“

captive_portal:

Home Assistant grafische Darstellung

ESP Home Logs

INFO Reading configuration /config/esphome/strom.yaml...
INFO Detected timezone 'CET' with UTC offset 1 and daylight saving time from 27 March 02:00:00 to 30 October 03:00:00
INFO Starting log output from strom.local using esphome API
INFO Successfully connected to strom.local
[19:32:31][I][app:102]: ESPHome version 2021.9.3 compiled on Oct 10 2021, 21:35:03
[19:32:31][C][wifi:501]: WiFi:
[19:32:31][C][wifi:361]:   SSID: 'xxxxxxxxxxxxxxx'[redacted]
[19:32:31][C][wifi:362]:   IP Address: xxx.xxx.xxx.xx
[19:32:31][C][wifi:364]:   BSSID: xx:xx:xx:xx:xx:xx[redacted]
[19:32:31][C][wifi:365]:   Hostname: 'strom'
[19:32:31][C][wifi:369]:   Signal strength: -51 dB ▂▄▆█
[19:32:31][C][wifi:373]:   Channel: 6
[19:32:31][C][wifi:374]:   Subnet: 255.255.255.0
[19:32:31][C][wifi:375]:   Gateway: xxx.xxx.xxx.x
[19:32:31][C][wifi:376]:   DNS1: xxx.xxx.xxx.x
[19:32:31][C][wifi:377]:   DNS2: (IP unset)
[19:32:31][C][logger:193]: Logger:
[19:32:31][C][logger:194]:   Level: DEBUG
[19:32:31][C][logger:195]:   Log Baud Rate: 115200
[19:32:31][C][logger:196]:   Hardware UART: UART0
[19:32:31][C][pulse_counter:147]: Pulse Counter 'Energieverbrauch'
[19:32:31][C][pulse_counter:147]:   State Class: 'measurement'
[19:32:31][C][pulse_counter:147]:   Unit of Measurement: 'W'
[19:32:31][C][pulse_counter:147]:   Accuracy Decimals: 0
[19:32:31][C][pulse_counter:147]:   Icon: 'mdi:flash'
[19:32:31][C][pulse_counter:148]:   Pin: GPIO14 (Mode: INPUT)
[19:32:31][C][pulse_counter:149]:   Rising Edge: INCREMENT
[19:32:31][C][pulse_counter:150]:   Falling Edge: DISABLE
[19:32:31][C][pulse_counter:151]:   Filtering pulses shorter than 13 µs
[19:32:31][C][pulse_counter:152]:   Update Interval: 60.0s
[19:32:31][C][total_daily_energy:024]: Total Daily Energy 'Tagesverbrauch'
[19:32:31][C][total_daily_energy:024]:   Device Class: 'energy'
[19:32:31][C][total_daily_energy:024]:   State Class: 'total_increasing'
[19:32:31][C][total_daily_energy:024]:   Unit of Measurement: 'Wh'
[19:32:31][C][total_daily_energy:024]:   Accuracy Decimals: 2
[19:32:31][C][total_daily_energy:024]:   Icon: 'mdi:flash'
[19:32:31][C][captive_portal:148]: Captive Portal:
[19:32:31][C][ota:029]: Over-The-Air Updates:
[19:32:31][C][ota:030]:   Address: strom.local:8266
[19:32:31][C][ota:032]:   Using Password.
[19:32:31][C][api:135]: API Server:
[19:32:31][C][api:136]:   Address: strom.local:6053
[19:32:31][C][api:140]:   Using noise encryption: NO
[19:32:31][C][sntp:044]: SNTP Time:
[19:32:31][C][sntp:045]:   Server 1: '0.pool.ntp.org'
[19:32:31][C][sntp:046]:   Server 2: '1.pool.ntp.org'
[19:32:31][C][sntp:047]:   Server 3: '2.pool.ntp.org'
[19:32:31][C][sntp:048]:   Timezone: 'CET-1CEST-2,M3.4.0/2,M10.5.0/3'
[19:32:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 68.00 pulses/min
[19:32:32][D][sensor:121]: 'Energieverbrauch': Sending state 408.00000 W with 0 decimals of accuracy
[19:32:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6002.70361 Wh with 2 decimals of accuracy
[19:32:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 68.00 pulses/min
[19:32:32][D][sensor:121]: 'Energieverbrauch': Sending state 408.00000 W with 0 decimals of accuracy
[19:32:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6002.70361 Wh with 2 decimals of accuracy
[19:33:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 67.00 pulses/min
[19:33:32][D][sensor:121]: 'Energieverbrauch': Sending state 402.00000 W with 0 decimals of accuracy
[19:33:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6009.40381 Wh with 2 decimals of accuracy
[19:34:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 68.00 pulses/min
[19:34:32][D][sensor:121]: 'Energieverbrauch': Sending state 408.00000 W with 0 decimals of accuracy
[19:34:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6016.20361 Wh with 2 decimals of accuracy
[19:35:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 70.00 pulses/min
[19:35:32][D][sensor:121]: 'Energieverbrauch': Sending state 420.00000 W with 0 decimals of accuracy
[19:35:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6023.20361 Wh with 2 decimals of accuracy
[19:36:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 75.00 pulses/min
[19:36:32][D][sensor:121]: 'Energieverbrauch': Sending state 450.00000 W with 0 decimals of accuracy
[19:36:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6030.70459 Wh with 2 decimals of accuracy
[19:37:32][D][pulse_counter:159]: 'Energieverbrauch': Retrieved counter: 70.00 pulses/min
[19:37:32][D][sensor:121]: 'Energieverbrauch': Sending state 420.00000 W with 0 decimals of accuracy
[19:37:32][D][sensor:121]: 'Tagesverbrauch': Sending state 6037.70361 Wh with 2 decimals of accuracy

Short description

SodaStream Oled Display

Everyone who owns a SodaStream has probably asked themselves how full my CO2 cylinder is. In most cases the cylinder is empty once you have been shopping. Most SodaStream users have a second cylinder, but it still sparked my creativity to come up with a simple solution.

The small software program is currently used to determine the number of impacts pressed and shown on the display (line 2). In line 3 is the added time of the duration / length of the pushed pushes. These values can be used to roughly estimate how much Co2 is still in the cylinder. What is shown graphically in line 4 by means of a progress indicator.

Hardware required

  • Wemos D1 mini (ESP8266)
  • Limit switch Ender 3 Pro
  • OLED Display I2C 0,96 Zoll
  • Cable / single wires
  • 3D Printer + Filament
  • Soldering iron with equipment

Software required

  • Arduino IDE
  • Tinkercad
  • Ultimaker Cura / Prusa Slicer

3D Printer settings

Ender 3 Pro

Print Settings

3D Printer Tinkercad STL File

Tinkercad SodaStream

Arduino IDE Software Code

I have to adapt to publish (currently code excerpt).

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <ESP8266WiFi.h>

#define SCREEN_WIDTH 128 // display width, (pixels)
#define SCREEN_HEIGHT 64 // display height, (pixels)

// I2C connected display SSD1306 
#define OLED_RESET     0 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#define NUMFLAKES     10 // Number of snowflakes in the animation example

#define LOGO_HEIGHT   16
#define LOGO_WIDTH    16
static const unsigned char PROGMEM logo_bmp[] =
{ B00000000, B11000000,
  B00000001, B11000000,
  B00000001, B11000000,
  B00000011, B11100000,
  B11110011, B11100000,
  B11111110, B11111000,
  B01111110, B11111111,
  B00110011, B10011111,
  B00011111, B11111100,
  B00001101, B01110000,
  B00011011, B10100000,
  B00111111, B11100000,
  B00111111, B11110000,
  B01111100, B11110000,
  B01110000, B01110000,
  B00000000, B00110000 };

Result Pictures

ToDo

  • Wemos D1 Mini ESP.deepSleep
  • One Case for alle the stuff
  • Smaler Display Case
  • Battery shield + display battery status
  • Change Wemos D1 Mini to ESP8266 BLE + IOS App