Help required with configuring Eufy Smart Plug (UK)

I have an issue trying to configure a Eufy T1203 Smart Plug UK, tried with HA V78.3 &V79.2. I have tried with the configuration like:-

in configuration.yaml

eufy:
    username: [email protected]
    password: !secret

and also tried the following

eufy:
   devices:
       - address: 192.168.0.30
         access_token: JZ527J231N8A2Y45
         type: T1203
         name: Smart Plug

but neither configuration shows the device in Home Assistant and I can’t see any errors in the log for Eufy. Would anyone have any advice or help on how to configure these?

Neither of those code excerpts are correctly formatted. For example in the first one, the 2nd and 3rd lines need to be indented.

Thanks for the reply. I have them indented in my config correctly (I think) as shown in the HA Component Eufy docs. Unfortunately I can’t display the correct formatting in this post. I’m wondering if the issue is that I have a UK smart plug T1203 and this integration doesn’t support that.

I’m having the same problem here - also using a UK smart plug. Could you let me know if you find a solution? I’m hoping it’s not just that the component isn’t supported because it’s different to the US style plugs.

The component source is here https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/eufy.py

The python module that the component is based on is here https://github.com/google/python-lakeside

Both seem to be maintained by the same person. Why not post an issue on the lakeside github?

1 Like

Thanks again Nick. I’ve submitted the following issue: [https://github.com/google/python-lakeside/issues/12] (Support For Eufy T1203 Smart Plug (UK))

Until a fix is issued I have managed to get this working by creating it as a custom component and then modifying the code in a few files to include the T1203 switch.

Here’s what I did for Hassio:

Copy the following files to their respective locations. If the folders don’t exist in your config then create them.

Copy: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/eufy.py
To: /config/custom_components/eufy.py

Copy: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/switch/eufy.py
To: /config/custom_components/switch/eufy.py

Copy: (All 3 files in lakeside)
https://github.com/google/python-lakeside/tree/master/lakeside
To: /config/deps/lib/python3.6/site-packages/lakeside

Then you will need to edit the following files to Include T1203:

/config/deps/lib/python3.6/site-packages/lakeside/__init_.py

   - line 103:      elif self.kind == "T1201" or self.kind == "T1202" or self.kind == "T1211": 
   + line 103:      elif self.kind == "T1201" or self.kind == "T1202" or self.kind == "T1203" or self.kind == "T1211": 

/config/custom_components/eufy.py

   - line 46: 'T1211': 'switch' 

   + line 46: 'T1211': 'switch', 
   + line 47: 'T1203': 'switch' 

Add the Eufy configuration (as in the component docs) to configuration.yaml:-
/config/configuration.yaml

    eufy:
      username: [email protected]
      password: Password for Eufylife.com account

Then restart Home Assistant and it should auto discover your T1203 Smart Plug.

Hi jamos,

After these modifications, are you able to monitor energy consumption, or just use the plug as an on/off switch?

Thanks!

Hi, No energy monitoring it’s just on/off unfortunately. Instead I have bought a TP-Link HS110 for energy monitoring which works very well with HA.

Understood. Thanks!!

Is this still working - I have tried both configs but cant get my smart plug to work

Whats the latest config for the smart plug?

I also can’t get them working. I bought two T1203 switches. HA no longer throws up errors that the Eufy platform couldn’t be configured, but no switches show up.

1 Like

Same as me - be great if these could be fully supported because for £17 on Amazon they make for an excellent smart plug device and include energy monitoring

Maybe a little too good to be true at that price :stuck_out_tongue:

1 Like

After some debugging via the python console I can control the plug socket directly from python

I upgraded lakeside to 11 in my python virt env

python3

import lakeside
devices = lakeside.get_devices('USERNAME', 'PASSWORD')
print(devices)
switch1 = lakeside.switch('192.168.0.88', 'LOCAL_CODE', 'T1203')
switch1.connect()
switch1.get_status()
switch1.set_state(power=True)
switch1.set_state(power=False)

I can see this works on the switch turning it on and off

This was the output of get_status

sequence: 12648130
code: ""
switchinfo {
  type: 2
  packet {
    unknown1: -1
    switchstatus {
      unknown1: 6
      power: 0
      unknown3: 0
      unknown4: 0
      unknown5: 0
    }
  }
}

Unknown1 is definitely runtime of the plug in hours

Which leads me to believe that there might be an issue with the HA component side or that the devices just dont discover properly - I have Eufy initializing in HA but then nothing in the log.

@mjg59 - can you help at all?

Ok this is really strange - I upgraded lakeside to 11

but on restarting home assistant it installed 10 again!

2018-12-21 18:59:30 INFO (MainThread) [homeassistant.loader] Loaded eufy from homeassistant.components.eufy
2018-12-21 18:59:30 INFO (SyncWorker_4) [homeassistant.util.package] Attempting install of lakeside==0.10

I have just reinstalled 11 - not sure this will work

Looks like the latest source code for eufy.py hasnt made it though to the release yet - as I checked

lib/python3.6/site-packages/homeassistant/components/eufy.py and it said lakeside 10

wget the latest version of eufy.py into ~/homeassistant/lib/python3.6/site-packages/homeassistant/components fixed it

I’m currently running Hass.io on a rPI. Any idea how I can upgrade this?

Put it in custom_components

1 Like