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.
Danger!If your device connects to mains electricity (AC power) there is danger of electrocution if not installed properly. If you don’t know how to install it, please call an electrician (Beware: certain countries prohibit installation without a licensed electrician present). Remember: SAFETY FIRST. It is not worth the risk to yourself, your family and your home if you don’t know exactly what you are doing. Never tinker or try to flash a device using the serial programming interface while it is connected to MAINS ELECTRICITY (AC power).
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:
- Download the firmware binaries from our CI Pipeline
- Open the housing of the socket by loosening the screw on the back.
- Connect the serial programmer (This blogpost shows how to connect the pins)
- 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