Category: Uncategorized

How to add a TeHyBug Smart Home Data Logger to your HomeAssistant?

There are several ways it add a TeHyBug to your HomeAssistant.
1. Embed a public graph to your dashboard.
2. Add it as an MQTT Sensor to your Homeassistant.

Usually, Home Assistant is installed on a Raspberry Pi or similar devices.
If you don’t have an MQTT Brocker, here is the instruction on how to install the MQTT Broker on your PI.

https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/

  1. Put your TeHyBug into a configuration mode.
  2. open HTTP://192.168.1.1 in your browser (Firefox works best)
  3. Configure WIFI Connection by providing your WIFI Credentials.
  4. Go to Custom MQTT Configuration and fill the required fields similar to the screenshot below, the MQTT Server should be the IP Address of your MQTT Broker
MQTT configuration example
  1. Save, activate the live mode and restart the TeHyBug.
  2. Make sure mqtt block in the configuration exists, if not please configure it a your home assistant integration. Open the configuration.yaml file of your home assistant and add a sensor block, if the sensor block exists, just extend it:

Example configuration.yaml entry:

sensor:
  - platform: mqtt
    name: "Temperature Test"
    state_topic: "/tehybug/sensor1"
    unit_of_measurement: "°C"
    value_template: "{{ value_json.t }}"
  - platform: mqtt
    name: "Pressure Test"
    state_topic: "/tehybug/sensor1"
    unit_of_measurement: "hPa"
    value_template: "{{ value_json.p }}"

After this, you will be able to add a new sensor entity to your dashboard.

TeHyBug – Configuration

Once you connect to the TeHyBug Wifi Network AP and open http://192.168.1.1/ in your browser, you will see the configuration index page.

TeHyBug 18650 Universal menu, other TeHyBugs have a similar menu

The first thing you should do is to provide your Wifi Credentials on the “Configure Wifi” page. Nothing special just fill the form with your network name and password.

The next step on TeHyBug 18650 Universal is to select the connected sensor on the “Sensor configuration” page. Here is also nothing special, just select the sensor that you have connected.

Then go to the “Current environment data” page and check if the sensor is delivering data properly.

As next select the desired data serving method, if you don’t know what an MQTT or HTTP POST/GET request is, then you should use the “Default configuration” page and leave other data serving methods untouched.

(For the “Default configuration” you’ll have to create an account at http://tehybug.com )

(If you chose the default configuration please write down the TeHybug key. You will need to provide it at your TeHyBug account.)

On the default configuration page, you’ll have to define the data frequency in minutes. Data frequency is a time interval that defines how often should the TeHyBug measure the sensor data and send it to a remote data server. Lower data frequency means higher power consumption and causes the battery to discharge faster.

Success message after saving the configuration

Once you click save, the success message will ask you to activate the live mode and start serving data. If you are ready with your configuration, you can click the “activate live mode” link. Optionally you can also activate the live mode from the index page, so you don’t need to do it on the configuration page.

Success message after the live mode activation

Then you will see the next message to restart your TeHyBug, when you click the restart link, your TeHyBug will close the WIFI Network AP reboot and start serving data.

Done!

Login to your data server and check the TeHyBug Sensor data.

TeHyBug – first start instructions

First start guide

Important: You will notice black glue on the front of the ESP8266 ESP-01 module, don’t try to remove it! It protects a thin tiny wire, which enables the power-saving deep sleep mode of the chip.

Warning: TeHyBug is not protected against reverse polarity. Reverse polarity of power source will damage/burn your device. Make sure you connect the power to the screw terminal correctly.

When you connect a power supply (min 3.4V, max 12V, 5V recommended) to your TeHyBug, the blue LED on the ESP-01 module will light up solid, which means that your TeHyBug is in a configuration mode.

If you plan to use a 9V Battery make sure that the real battery voltage is below 10 Volts otherwise it will damage/burn your device.

TeHyBugs with an OLED display are already preconfigured in a „display only mode“ and are ready for use, just connect it to a power supply. If you would like to change the configuration or use some different data serving modes: you can put your TeHyBug into a configuration mode by pressing the RESET „BLACK“ button and shortly after that the MODE „RED“ button, the blue led will blink shortly and light up after 3 seconds solid.

Configuration

  1. Open with your computer or mobile phone a list with available Wi-Fi networks, there will be a new Wi-Fi network called TeHyBug_XXXXXX
  2. Connect your device to a TeHyBug Wi-Fi network.   
  3. After your device is connected to TeHyBug Wi-Fi network, start your web browser and open this address: http://192.168.1.1/

The TeHyBug configuration webpage will open and you will have multiple multiple configuration choices.

You should start first with the Wifi configuration and provide there the Wifi Credentials of your home network.

Once the wifi configuration is saved, continue with the data serving configuration, there are several data serving choices:

Default settings if you are going to use the tehybug.com data server (signup at tehybug.com website and add your TeHyBug into your account) or custom settings where you can define the URL of any other data server.

After everything is set, you can activate the live mode and restart your TeHyBug, it should start serving the environmental data.

How to activate configuration mode manually with buttons on the board?

If you have provided incorrect Wi-Fi credentials in the configuration mode or you would like to change the settings:

Press the RESET „BLACK“ button and shortly after that press the MODE „RED“ button, the blue led will blink shortly and light up (after 3 seconds) solid, after that, you will be able to connect to a TeHyBug Wi-Fi network and change your configuration.

How to activate the live mode manually with buttons?

In case you have put your TeHyBug into a configuration mode by mistake (the blue led lights up solid) and you don’t want to change your previous settings, you can activate the live mode by pressing the RESET „BLACK“ button, and shortly after that press the MODE „RED“ button (the same way you put your TeHyBug from a live mode to a configuration mode), the blue LED will blink short (it means that you TeHyBug is in live mode, connecting to the configured Wi-Fi network and is serving the data).

Your TeHyBug has an additional Micro USB connector, so you can power it directly from a USB power supply. DO NOT use a battery and a USB power supply at the same time, it will damage your devices.

For more info’s please visit http://tehybug.com/