TeslaLogger icon indicating copy to clipboard operation
TeslaLogger copied to clipboard

Accessing /commands/ fails with "You don´t have permission to access this ressource"

Open JanFellner opened this issue 8 months ago • 7 comments

The issue orgininates in trying to use teslalogger (running since 2 years) in combination with evcc to obtain SOC information for evcc. https://github.com/evcc-io/evcc/discussions/20280

Teslalogger has been setup as docker compose config on a synology NAS.

I can gather json data through http://192.168.111.99:5010/currentjson/1 and get valid data

Image

However when i try to access the /command/ i get a 403 forbidden

Image

I see nothing helpfull in the logs

31.03.2025 12:30:42 : #1[Thread Pool Worker:21]: PostCommand: wake_up - 
31.03.2025 12:30:42 : #1[Thread Pool Worker:21]: Use ProxyServer
31.03.2025 12:30:42 : #1[Thread Pool Worker:62]: Response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
<hr>
<address>Apache/2.4.38 (Debian) Server at teslalogger.de Port 4444</address>
</body></html>

I am using the subscription model to access the fleet api. Flags should have been properly set...

Image

JanFellner avatar Mar 31 '25 12:03 JanFellner

I have the same problem

michib29 avatar May 01 '25 08:05 michib29

@michib29 are you also using Macvlan for your docker containers?

JanFellner avatar May 01 '25 08:05 JanFellner

@michib29 are you also using Macvlan for your docker containers?

Is the same setting

michib29 avatar May 01 '25 16:05 michib29

Then the pitfall is very likely that teslalogger runs from the compose file in it´s own network (which is pretty sad not that easy to change or configure). The evcc which runs as macvlan then tries to access a mapped port on the host which is not possible in a macvlan scenario. I therefore added a second network to the teslalogger and the evcc container for that cross link communication as bridge network. That solved it for me.

JanFellner avatar May 02 '25 05:05 JanFellner

@michib29 are you also using Macvlan for your docker containers?

Sorry wrong information. My setting is the Standarddocker Config. I thing is a bridge-mode in Docker. The Problem is clear. I have again Teslalogger authorized at Tesla.

michib29 avatar May 04 '25 08:05 michib29

if you use FleetAPI, then wakeups and set_charging_amps are not allowed anymore, because they are very expensive.

bassmaster187 avatar May 05 '25 07:05 bassmaster187

if you use FleetAPI, then wakeups and set_charging_amps are not allowed anymore, because they are very expensive.

Does this mean that the charging port also cannot be opened via geofence?

michib29 avatar May 06 '25 07:05 michib29