Skip to content

yinkiu602/esphome-localbytes-plug

 
 

Repository files navigation

About

This is an ESPHome firmware for the Localbytes smart plug, which is sold pre-loaded with tasmota. This firmware supports the original 10A plug and the upgraded 13A plug. You can buy these smart plugs here.

Manual Addition

You can use the following YAML to add the device to your ESPHome setup.
Please note this does not enable API Encryption or OTA Password

substitutions:
  name: localbytes-plug-pm-<NAME>
  friendly_name: Localbytes Plug PM <NAME>

packages:
  localbytes.plug-pm: github://LocalBytes/esphome-localbytes-plug/localbytes-plug-pm.yaml@main

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Original Credit

Massive thanks to @JamesSwift who made the original here - JamesSwift/localbytes-plug-pm
Without whom, esphome would still be an unsupported platform

Features

  • Turn the switch on and off via home assistant or web interface
  • Disabled the LED by pressing and holding the button for 3 seconds (or toggle the option in home assistant/web interface)
  • Disable the physical button (i.e. child lock) by pressing and holding the button for 10 seconds (or toggle the option in home assistant/web interface)
  • Power monitoring via home assistant or web interface
  • Calibrate the power monitoring using a GUI via home assistant
  • See and alter the calibration data via home assistant
  • ESPHome dashboard import

Installation

To flash the ESPHome firmware over tasmota, first flash the ESPHome minimal firmware using the tasmota web interface (as the full firmware is too big to fit in the free space left by tasmota). Then connect to the wifi hotspot that is created and enter your network's wifi details.

At this point you can use the "dashboard import" feature of esphome to take ownership of the device. The next time you hit install/update via the dashboard, the full firmware will be uploaded to the plug.

Alternatively, if you don't want to import the plug to your ESPHome dashboard, connect to the hotpsot the device creates and use the web UI to flash the full firmware from the latest release.

Firmware File Too Big

A minimal firmware is provided as an intermiediary step, as there isn't enough space on the factory smart plugs to store the new full firmware while it is being flashed. Some users have reported that even this minimal firmware is still too large. If this is the case, you can try flashing the Tasmota minimal firmware instead. Then flash the full firmware afterwards.

Calibration

Once you have flashed the new firmware onto your smart plug and connected it to home assistant, you may wish to calibrate your plug to improve it's accuracy. To calibrate your plug, you need another "known-good" smart plug or a calibration device.

Plug your new smart plug into the known-good smart plug, then plug a kettle, toaster, or other high-power appliance into it. From home assistant, go to Developer Tools > Services. Use the services calibrate_current, calibrate_power, and calibrate_voltage to report the real readings as given from the "known-good" device. (Don't forget to turn on the kettle/toaster and leave it to stabilize it's power usage for a moment before starting to copy the readings).

About

An ESPHome firmware for the Localbytes smart plug

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published