Adding Cygnett Smart Plugs to HA and Energy Dashboard

Hi All,

I have previously set up my home with Homekit exclusively and as such purchased many Cygnett Smart Home devices.
Since seeing the light and moving across to HA with primarily Zigbee devices using a Sonoff Zigbee 3.0 USB Dongle, I have struggled to find a way to integrate the Cygnett Smart Plugs and access their energy monitoring sensors.
After much research and not finding much, I have found a successful solution!!!

  1. As Cygnett is powered by eWeLink, I found that eWeLink has a ‘integration’ that can be added in via the Add-Ons section.
    eWeLink Works with Home Assistant - eWeLink
    Install this add on and follow the instruction.

  2. Get rid of your Cygnett App on your phone/tablet and replace it with the eWeLink version. Your login is the same and your devices will automatically show up there.

  3. What I thought was a frustration initially, the smart plug only shows up as an entity with only access to turning the plug on or off, even though it shows the energy details in the attributes.
    However, you can pull this information out using some code in your configuration.yaml

template:
   - sensor:
         - name: lounge_switch_watts
           device_class: power
           unit_of_measurement: W
           state_class: measurement
           state: |-
                {{ state_attr('switch.1001582000', 'power') | replace(" W", "") | float}}
  1. Next is to convert the watts number to kWh.

Go to the Helper section and select Riemann sum integral sensor and fill in the above sensor and use Trapezoidal rule, Metric Prefix of K and Time Unit of Hours.

  1. Finally add this helper sensor into the Energy Dashboard and within a couple of hours you will start getting readings and you previously useless Cygnett Smart Plug is now useful.

Cheers

2 Likes

To provide accurate Energy use data, use Left rule, not Trapezoidal, as Left works better with ‘spikey’ input data. Riemann sum integral sensor no update - #2 by tom_l