Skip to main content

Basic D-duino code (OLED, WifiManager)

In a previous blog post I introduced to you the D-duino ESP8266 boards. In this blog post, I’ll show you a small Arduino code which is providing the basic functionality for my next projects.

What’s in the box

I am using the awesome WifiManager library. I will handle the configuration and connection to a WiFi network. If  the ESP is unconfigured or the AP is not reachable, it will start an access point by its own. You can connect to this AP and a caption portal will open. Scan for networks, select one and enter the password. The configuration will be saved in the EEPROM. No need to set the credentials inside of your code.

Over-the-Air update is also implemented. This makes it very easy to update the code without connecting the MCU via USB to the host. It’s also faster than serial uploads.

Last part is of course the OLED display. I am using the ESP8266_SSD1306 library. It has some very nice features like progress bars, several graph commands (lines, shapes etc.), pictures and of text.

Read More

DIY IoT Central – Home Assistant / InfluxDB / Grafana

Get started with Home Assistant, InfluxDB and Grafana.

Laying the Foundation

Create several directories to persist configurations, logs & data

You’ll most likely use different directory names – keep in mind that you have to update the docker-compose.yaml too
/share/Container/home-assistant Home Assistant configuration
/share/Container/influxdb InfluxDB Data & Config
/share/Container/grafana/log Grafana Logs
/share/Container/grafana/data Grafana Data

Basic configuration

InfluxDB Generate the default config for InfluxDB

docker run --rm influxdb:1.2-alpine influxd config > influxdb.conf

Now move the influxdb.conf to your config directory (in my case /share/Container/influxdb)

Home Assistant If no configuration is found, Home Assistant will create a basic configuration itself after the container has started.

Read More