Build a 2log Switch

Learn how to build a 2log Switch

The 2log Switch is a smart wireless socket that can switch power and measure energy consumption. It communicates via WiFi with the 2log server and ensures that only authorized users can use the machines. By measuring the power consumption, the system knows exactly how long the machine has been in use.

Supported smart sockets

Theoretically, any tasmota compatible, ESP8266 based WiFi socket is suitable. Depending on the type, the software from our repository has to be adapted a bit.

To turn a smart socket into a 2log Switch, the 2log Switch firmware must be flashed to the device. For this purpose a USB Serial Adapter (FTDI) is required.

Shelly Plug S

Officially supported is currently the model “Shelly Plug S”. By the way, this is also one of the few models for which correct CE certificates could be provided.

To flash a Shelly Plug S socket you have to do the following steps:

  1. Download the firmware binaries from our CI Pipeline
  2. Open the housing of the socket by loosening the screw on the back.
  3. Connect the serial programmer (This blogpost shows how to connect the pins)
  4. Flash the firmware with esptool
    esptool.py \
        --chip esp8266 \
        --port /dev/tty.usbserial-UUT1 \
        --baud 230400 \
        --before default_reset \
        --after hard_reset write_flash \
        -z \
        --flash_mode dio \
        --flash_freq 40m \
        --flash_size 4MB \
        0x0 /build/bootloader/bootloader.bin \
        0x10000 /build/2log-switch.bin \
        0x8000 /build/partitions-single-1MB.bin