Skip to content

diefenbecker/opencistern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zisternenmessung

Checks the level of your cistern using an ESP8266 with various possible distance sensors (Ultrasound, ToF). There is a selection of different cistern shapes (cylinder, square, horizontal, standing) with calculation of the volume. The measured values are output on a separate website (without Homeautomation central), data can be send via MQTT to your own MQTT broker or via HTTP to an own interface. In addition, it is possible to let prepare the data on www.bubux.de

Supported distance sensors

  • HC-SR04
  • VL53L0X
  • VL53L1X

Supported temperature (humidity) sensors

  • DHT22-Sensor

Planned:

  • BME280
  • DS18B20

Supported displays

  • LCD '1602'
  • LCD '1604, 2004'
  • OLED 'SSD 1106, 1306'

Wiring

Anschluss

The ToF sensors are also connected to D1/D2 as an alternative to the ultrasonic sensor. On the picture the pin D4 for the switchable output e.g. for a relay is missing.

Latest version already compiled

Find here Version 1030 a already compiled version tested with NodeMCU and Wemos D1 mini

Start-Up

Once the firmware has been flashed to the NodeMCU and everything is correctly wired, the sensor can be commissioned.

The sensor tries to connect to a configured WLAN. If this does not work (which is the case during the first start-up), the sensor creates a WLAN access point with the name "WLAN cistern" which should be found in the smartphone, for example. Connect to this WLAN.

Now call up the address http://192.168.4.1 in the browser of the connected device. This address is usually also displayed and linked in the connection settings of the connected WLAN. The configuration page of the sensor now opens.

Enter the SSID and the password of the home WLAN and click on "Save configuration". The other settings (cistern form, etc.) can be made later.

The sensor then restarts and attempts to connect to the home WLAN. If this was successful, the access point is no longer accessible and the sensor should have been assigned an IP address in the network. This can be looked up in the router (e.g. in the Friztbox under "Home network -> Network").

If the "WLAN cistern" access point is still visible, the connection to the home WLAN was not successful. Then carry out the above steps again.

More information

More information about installation etc. can be found on http://blog.bubux.de/fuellstandmessung-der-zisterne-mittels-esp8266-nodemcu-und-ultraschallsensor/. There are several articles that deal with the topic.

Use own api

The measured data can be sent to your own interface via http post. A configurable URL is called and the values for the distance and the level in the variables are _abstand and _fuellstand transferred. Example: http://server:port/path_to_own_api?abs=_abstand&hoehe=_fuellstand

Use bubux api

With the WebAPI, the data (level, MAC address, local IP and firmware version) is sent to www.bubux.de where a graphical evaluation of the cistern level of the last 30 days is prepared. This evaluation can be accessed via a link in the web interface of the respective sensor. No central home automation is necessary here.

Statistik

JSON

With /json behind the URL of the sensor, the measured values can be queried via JSON. For example, 192.168.178.49/json.

JSON example

Use MQTT

Send the measured data to an MQTT broker

MQTT Konfig

Switchable output

The software supports a switchable output to D4 depending on a configurable minimum and maximum level

Relausausgang

Used libraries

  • ESP8266WiFi.h
  • ESP8266mDNS.h
  • ESP8266WebServer.h
  • ESP8266HTTPClient.h
  • ESP8266httpUpdate.h
  • Ticker.h
  • EEPROM.h
  • Wire.h

All libraries listed above are included in the ESP8266 core (https://github.com/esp8266/Arduino) . Currently it is mandatory to use version 2.4.7! This is done e.g. in the Borad-Manager of the Arduino IDE.

Donation

To support this project, feel free to make a small donation. The donations go to the foundation "Bärenherz" in Wiesbaden (https://www.baerenherz.de/de/)

Installation

Since the installation is individual depending on the cistern, I won't say much about it. I will only say that I packed the sensor into a surface-mounted box from the DIY store and "potted" it with hot glue. Resin would probably have been better, but the sensor works perfectly so far. The sensor hangs downwards on a board in the cistern. The NodeMCU is connected to a cable about 6m long and is housed in a small storage room.

Einbau1 Einbau2 EInbau3

Some screenshots of the webinterface with it´s configuration page

Startpage

Configuration page (1)

Configuration page (2)

Configuration page (3)

About

Checks the level of your cistern using an ESP8266 a with a bunch of possible distance sensors (ultrasound, ToF)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published