evcc icon indicating copy to clipboard operation
evcc copied to clipboard

TP-LINK Tapo can't auth

Open asubitz opened this issue 10 months ago β€’ 11 comments

Describe the bug

Image

Hi, when I try to connect to a tapo p110 plug from evcc ui, this is the error I am getting. It's the same if a try to add it via the yaml file.

Steps to reproduce

  1. add charger
  2. select the TP-Link Tapo P-Series Smart Plug "Manufacturer"
  3. Add IP, user and Password
  4. click on validate ...

Configuration details

sponsortoken: sponsortoken_value_here

# polling interval; avoid <30s to prevent warnings/unstable behavior
interval: 30s

mqtt:
  broker: 192.168.68.81:1883
  user: hasa
  password: "password"

site:
  title: STZ's House
  meters:
    grid: grid_mqtt
    pv: [pv_mqtt]
    battery: [bat_mqtt]

meters:
  # --- MQTT-based meters (Solar Assistant) ---------------------------------
  # These are example MQTT-based meters that read payloads from Solar Assistant's
  # MQTT broker. Replace the topic values below with the actual topics your
  # Solar Assistant instance publishes. The `jq` assumes the payload is a raw
  # number (e.g. "123") or JSON number; adjust if your payload uses a different
  # structure (e.g. {"power":123} -> jq: .power | tonumber).

  - name: grid_mqtt
    type: custom

    power:
      source: mqtt
      # example topic -- replace with your actual Solar Assistant topic
      topic: solar_assistant/inverter_1/grid_power/state
      # if payload is a plain number ("123") use:
      # jq: . | tonumber
      # if payload is JSON with field 'state' use:
      # jq: .state | tonumber
      scale: 1 # adjust scale if needed (e.g. -1 to invert sign)

  - name: pv_mqtt
    type: custom

    power:
      source: mqtt
      # example topic -- replace with your actual Solar Assistant topic
      topic: solar_assistant/inverter_1/pv_power/state
      # jq: . | tonumber
      scale: 1 # adjust scale if needed

  - name: bat_mqtt
    type: custom

    power:
      source: mqtt
      # example topic -- replace with your actual Solar Assistant topic
      topic: solar_assistant/total/battery_power/state
      # evcc expects positive when battery DISCHARGES to home. If your publisher
      # uses the opposite sign for charge/discharge, invert like below:
      # jq: (. | tonumber) * -1
      # jq: . | tonumber
      scale: -1 # adjust scale if needed
    soc:
      source: mqtt
      # actual topic used by Solar Assistant (observed via mosquitto_sub)
      topic: solar_assistant/total/battery_state_of_charge/state
      # common payload formats and jq examples:
      # - plain number ("88") : jq: . | tonumber
      # - string with percent ("88%") : jq: gsub("%"; "") | tonumber
      # - JSON object (e.g. {"state":88}) : jq: .state | tonumber
      # adjust the jq line below if your payload differs
      jq: . | tonumber

chargers:
  - name: go-e
    type: template
    template: go-e-v3
    host: 192.168.68.85
  - name: tplink-office-ac
    type: template
    template: tapo
    host: 192.168.68.59 # IP-Adresse oder Hostname
    user: ***@gmail.com
    password: "password"
  - name: tplink-br-ac
    type: template
    template: tapo
    host: 192.168.68.60 # IP-Adresse oder Hostname
    user: ***@gmail.com
    password: "password"

loadpoints:
  - title: Statie Go-E # display name for UI
    charger: go-e # charger
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 5m # threshold must be exceeded for this long
      threshold: 200 # maximum import power (W)

  - title: Office AC
    charger: tplink-office-ac # charger
    vehicle: dummy_car
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 5m # threshold must be exceeded for this long
      threshold: 100 # maximum import power (W)
    guardDuration: 2m # switch charger contactor not more often than this (default 10m)

  - title: Bedroom AC
    charger: tplink-br-ac # charger
    vehicle: dummy_car2
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 5m # threshold must be exceeded for this long
      threshold: 100 # maximum import power (W)
    guardDuration: 2m # switch charger contactor not more often than this (default 10m)

vehicles:
  - name: dummy_car
    type: template
    template: offline
    title: Office Ac # Wird in der BenutzeroberflΓ€che angezeigt (Optional)

  - name: dummy_car2
    type: template
    template: offline
    title: Bedroom Ac # Wird in der BenutzeroberflΓ€che angezeigt (Optional)

# tariffs are the fixed or variable tariffs
# cheap (tibber/awattar) can be used to define a tariff rate considered cheap enough for charging
tariffs:
  #hidroelectrica
  currency: RON # three letter ISO-4217 currency code (default EUR)
  grid:
    # either static grid price
    type: fixed
    price: 1.11 # RON/kWh
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.5 # RON/kWh

Log details

[~] # docker logs --tail 100 evcc        
[site  ] INFO 2026/01/05 10:17:58     feed-in:   pricestatic
[site  ] INFO 2026/01/05 10:17:58     co2:       βœ—
[site  ] INFO 2026/01/05 10:17:58     solar:     βœ—
[lp-1  ] INFO 2026/01/05 10:17:58 loadpoint 1:
[lp-1  ] INFO 2026/01/05 10:17:58   mode:        off
[lp-1  ] INFO 2026/01/05 10:17:58   charger:     power βœ“ energy βœ“ currents βœ“ phases βœ“ wakeup βœ—
[lp-1  ] INFO 2026/01/05 10:17:58   meters:      charge βœ“
[lp-1  ] INFO 2026/01/05 10:17:58     charge:    power βœ“ energy βœ“ currents βœ“
[lp-1  ] INFO 2026/01/05 10:17:58 car connected
[lp-1  ] INFO 2026/01/05 10:17:59 vehicle updated: unknown -> M3 tessie
[lp-1  ] INFO 2026/01/05 10:22:29 car disconnected
[lp-1  ] INFO 2026/01/05 10:22:29 vehicle updated: M3 tessie -> unknown
[lp-1  ] WARN 2026/01/05 10:22:29 charger out of sync: expected disabled, got enabled
[lp-1  ] INFO 2026/01/05 12:31:44 vehicle updated: unknown -> M3 tessie
[main  ] INFO 2026/01/05 12:49:15 evcc 0.300.2
[main  ] INFO 2026/01/05 12:49:15 OCPP local:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/01/05 12:49:15 UI local:      http://127.0.0.1:7070
[main  ] FATAL 2026/01/05 12:49:15 configfile failed reading config file: While parsing config: yaml: line 72: did not find expected '-' indicator
[main  ] FATAL 2026/01/05 12:49:15 will attempt restart in: 15m0s
[main  ] INFO 2026/01/06 11:41:44 evcc 0.300.2
[main  ] INFO 2026/01/06 11:41:44 OCPP local:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/01/06 11:41:44 UI local:      http://127.0.0.1:7070
[main  ] FATAL 2026/01/06 11:41:44 configfile failed reading config file: While parsing config: yaml: line 72: did not find expected '-' indicator
[main  ] FATAL 2026/01/06 11:41:44 will attempt restart in: 15m0s
[main  ] INFO 2026/01/06 11:43:05 evcc 0.300.2
[main  ] INFO 2026/01/06 11:43:05 using config file: /etc/evcc.yaml
[main  ] INFO 2026/01/06 11:43:06 using sqlite database: /root/.evcc/evcc.db?_pragma=busy_timeout(5000)
[mqtt  ] INFO 2026/01/06 11:43:06 connecting evcc-193503087 at tcp://192.168.68.81:1883
[main  ] INFO 2026/01/06 11:43:06 OCPP local:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/01/06 11:43:06 UI local:      http://127.0.0.1:7070
[site  ] WARN 2026/01/06 11:43:09 vehicle 'Office Ac' does not support automatic detection
[site  ] WARN 2026/01/06 11:43:09 vehicle 'Bedroom Ac' does not support automatic detection
[site  ] INFO 2026/01/06 11:43:09 site config:
[site  ] INFO 2026/01/06 11:43:09   meters:      grid βœ“ pv βœ“ battery βœ“
[site  ] INFO 2026/01/06 11:43:09     grid:      power βœ“ energy βœ— currents βœ—
[site  ] INFO 2026/01/06 11:43:09     pv 1:      power βœ“ energy βœ— currents βœ—
[site  ] INFO 2026/01/06 11:43:09     battery 1: power βœ“ energy βœ— currents βœ— soc βœ“ capacity βœ—
[site  ] INFO 2026/01/06 11:43:09   vehicles:
[site  ] INFO 2026/01/06 11:43:09     vehicle 1: range βœ— finish βœ— status βœ— climate βœ— wakeup βœ—
[site  ] INFO 2026/01/06 11:43:09     vehicle 2: range βœ— finish βœ— status βœ— climate βœ— wakeup βœ—
[site  ] INFO 2026/01/06 11:43:09     vehicle 3: range βœ“ finish βœ— status βœ“ climate βœ“ wakeup βœ“
[site  ] INFO 2026/01/06 11:43:09   tariffs:
[site  ] INFO 2026/01/06 11:43:09     grid:      pricestatic
[site  ] INFO 2026/01/06 11:43:09     feed-in:   pricestatic
[site  ] INFO 2026/01/06 11:43:09     co2:       βœ—
[site  ] INFO 2026/01/06 11:43:09     solar:     βœ—
[lp-1  ] INFO 2026/01/06 11:43:09 loadpoint 1:
[lp-1  ] INFO 2026/01/06 11:43:09   mode:        off
[lp-1  ] INFO 2026/01/06 11:43:09   charger:     power βœ“ energy βœ“ currents βœ“ phases βœ“ wakeup βœ—
[lp-1  ] INFO 2026/01/06 11:43:09   meters:      charge βœ“
[lp-1  ] INFO 2026/01/06 11:43:09     charge:    power βœ“ energy βœ“ currents βœ“
[lp-1  ] INFO 2026/01/06 11:43:10 car connected
[lp-1  ] INFO 2026/01/06 11:43:10 vehicle updated: unknown -> M3 tessie
[main  ] INFO 2026/01/06 11:44:51 evcc 0.300.2
[main  ] INFO 2026/01/06 11:44:51 using config file: /etc/evcc.yaml
[main  ] INFO 2026/01/06 11:44:51 using sqlite database: /root/.evcc/evcc.db?_pragma=busy_timeout(5000)
[mqtt  ] INFO 2026/01/06 11:44:51 connecting evcc-1516063477 at tcp://192.168.68.81:1883
[main  ] INFO 2026/01/06 11:44:51 OCPP local:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/01/06 11:44:51 UI local:      http://127.0.0.1:7070
[main  ] FATAL 2026/01/06 11:44:52 charger [tplink-office-ac] cannot create charger 'tplink-office-ac': cannot create charger type 'template:tapo': cannot create charger type 'tapo': login failed: passthrough handshake failed: request failed: Communication error (1003)
loadpoint [lp-2] charger: not found: tplink-office-ac
[main  ] FATAL 2026/01/06 11:44:52 will attempt restart in: 15m0s
[main  ] INFO 2026/01/06 11:45:37 evcc 0.300.2
[main  ] INFO 2026/01/06 11:45:37 using config file: /etc/evcc.yaml
[main  ] INFO 2026/01/06 11:45:37 using sqlite database: /root/.evcc/evcc.db?_pragma=busy_timeout(5000)
[mqtt  ] INFO 2026/01/06 11:45:37 connecting evcc-1698693291 at tcp://192.168.68.81:1883
[main  ] INFO 2026/01/06 11:45:37 OCPP local:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/01/06 11:45:37 UI local:      http://127.0.0.1:7070
[main  ] FATAL 2026/01/06 11:45:38 charger [tplink-br-ac] cannot create charger 'tplink-br-ac': cannot create charger type 'template:tapo': cannot create charger type 'tapo': login failed: passthrough handshake failed: request failed: Communication error (1003)
loadpoint [lp-2] charger: not found: tplink-office-ac
[main  ] FATAL 2026/01/06 11:45:38 will attempt restart in: 15m0s
[main  ] INFO 2026/01/06 11:55:48 evcc 0.300.2
[main  ] INFO 2026/01/06 11:55:48 using config file: /etc/evcc.yaml
[main  ] INFO 2026/01/06 11:55:48 using sqlite database: /root/.evcc/evcc.db?_pragma=busy_timeout(5000)
[mqtt  ] INFO 2026/01/06 11:55:50 connecting evcc-1100858497 at tcp://192.168.68.81:1883
[main  ] INFO 2026/01/06 11:55:50 OCPP local:    ws://127.0.0.1:8887/<stationId>
[main  ] INFO 2026/01/06 11:55:50 UI local:      http://127.0.0.1:7070
[site  ] WARN 2026/01/06 11:55:52 vehicle 'Office Ac' does not support automatic detection
[site  ] WARN 2026/01/06 11:55:52 vehicle 'Bedroom Ac' does not support automatic detection
[site  ] INFO 2026/01/06 11:55:52 site config:
[site  ] INFO 2026/01/06 11:55:52   meters:      grid βœ“ pv βœ“ battery βœ“
[site  ] INFO 2026/01/06 11:55:52     grid:      power βœ“ energy βœ— currents βœ—
[site  ] INFO 2026/01/06 11:55:52     pv 1:      power βœ“ energy βœ— currents βœ—
[site  ] INFO 2026/01/06 11:55:52     battery 1: power βœ“ energy βœ— currents βœ— soc βœ“ capacity βœ—
[site  ] INFO 2026/01/06 11:55:52   vehicles:
[site  ] INFO 2026/01/06 11:55:52     vehicle 1: range βœ— finish βœ— status βœ— climate βœ— wakeup βœ—
[site  ] INFO 2026/01/06 11:55:52     vehicle 2: range βœ— finish βœ— status βœ— climate βœ— wakeup βœ—
[site  ] INFO 2026/01/06 11:55:52     vehicle 3: range βœ“ finish βœ— status βœ“ climate βœ“ wakeup βœ“
[site  ] INFO 2026/01/06 11:55:52   tariffs:
[site  ] INFO 2026/01/06 11:55:52     grid:      pricestatic
[site  ] INFO 2026/01/06 11:55:52     feed-in:   pricestatic
[site  ] INFO 2026/01/06 11:55:52     co2:       βœ—
[site  ] INFO 2026/01/06 11:55:52     solar:     βœ—
[lp-1  ] INFO 2026/01/06 11:55:52 loadpoint 1:
[lp-1  ] INFO 2026/01/06 11:55:52   mode:        off
[lp-1  ] INFO 2026/01/06 11:55:52   charger:     power βœ“ energy βœ“ currents βœ“ phases βœ“ wakeup βœ—
[lp-1  ] INFO 2026/01/06 11:55:52   meters:      charge βœ“
[lp-1  ] INFO 2026/01/06 11:55:52     charge:    power βœ“ energy βœ“ currents βœ“
[lp-1  ] INFO 2026/01/06 11:55:52 car connected
[lp-1  ] INFO 2026/01/06 11:55:52 vehicle updated: unknown -> M3 tessie
[~] #

What type of operating system or environment does evcc run on?

Linux

External automation

  • [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • [x] I have verified that the issue is reproducible with the latest nightly build

Version

0.300.2

asubitz avatar Jan 06 '26 11:01 asubitz

evcc-20260106-120717-debug.log

log file from evcc ui - btw, I'm running in docker container, not linux.

asubitz avatar Jan 06 '26 11:01 asubitz

[main ] FATAL 2026/01/06 11:41:44 configfile failed reading config file: While parsing config: yaml: line 72: did not find expected '-' indicator

andig avatar Jan 06 '26 11:01 andig

that was another issue which I fixed, if you look at the config file, there is no longer an extra '-' at line 72. :)

"Request failed with status code 400. cannot create charger type 'template:tapo': cannot create charger type 'tapo': login failed: passthrough handshake failed: request failed: Communication error (1003). POST http://192.168.68.110:7070/api/config/test/charger"

Image

this error is in the ui and not in the logs of the app.

So @andig can you please reopen the issue, as it is not completed as you have market it

asubitz avatar Jan 06 '26 13:01 asubitz

/cc @thierolm

andig avatar Jan 06 '26 13:01 andig

Also had problems with my Tapo P115 in Home Assistant after automatic FW update to version 1.4.0. I don't use Tapo in EVCC but I think it's the same problem: After the FW update to 1.4.0 (changelog says something about Security improvements) you need to enable Third party services in Tapo App (again). This solved it in Home Assistant for me. See also: https://github.com/home-assistant/core/issues/156522

sutixp avatar Jan 07 '26 15:01 sutixp

Note this is documented:

Third-party compatibility must be enabled in the Tapo app to allow evcc to control the device!

andig avatar Jan 07 '26 15:01 andig

Also had problems with my Tapo P115 in Home Assistant after automatic FW update to version 1.4.0. I don't use Tapo in EVCC but I think it's the same problem: After the FW update to 1.4.0 (changelog says something about Security improvements) you need to enable Third party services in Tapo App (again). This solved it in Home Assistant for me. See also: https://github.com/home-assistant/core/issues/156522

Hi, I already have them enabled and it doesn't work: image

asubitz avatar Jan 07 '26 15:01 asubitz

Note this is documented:

Third-party compatibility must be enabled in the Tapo app to allow evcc to control the device!

Please see my last screenshot, I already have them enabled. So nothing changed, it still doesn't work.

asubitz avatar Jan 07 '26 15:01 asubitz

I just tried to add one of my Tapo P115 and it's working fine

Image

Try to disable and enable Third Party Compatibility as others also had to do here: https://github.com/home-assistant/core/issues/156522

sutixp avatar Jan 07 '26 16:01 sutixp

I just tried to add one of my Tapo P115 and it's working fine

Image Try to disable and enable Third Party Compatibility as others also had to do here: [https://github.com/home-assistant/core/issues/156522](url)

Can you try now? I've just tried and still doesn't work on my end, I get the same error:

Image

asubitz avatar Jan 09 '26 11:01 asubitz

I tried again. First I disabled Third-party compatibility in Tapo app. Then I get the same message as you have: Image

Then I enabled Third-party compatibility in Tapo app and everything is fine: Image

sutixp avatar Jan 09 '26 14:01 sutixp