Remote Access: now experimental (#30551)

This commit is contained in:
Michael Geers 2026-06-06 09:45:59 +02:00 • committed by GitHub
parent 10001574c1
commit 4648f01fad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 16 deletions

View file

@ -322,8 +322,8 @@
</template>
</DeviceCard>
<DeviceCard
v-if="remote"
:title="$t('config.remote.title')"
v-if="experimental"
:title="`${$t('config.remote.title')} 🧪`"
editable
:unconfigured="isUnconfigured(remoteTags)"
data-testid="remote-access"

View file

@ -237,10 +237,7 @@ func runRoot(cmd *cobra.Command, args []string) {
go socketHub.Run(pipe.NewDropper(ignoreEmpty).Pipe(tee.Attach()), cache)
// remote access tunnel
var remoteAccess *remote.Remote
if remoteHost := os.Getenv("EVCC_REMOTE_ACCESS"); remoteHost != "" {
remoteAccess = remote.New(remoteHost, httpd.Router(), valueChan)
}
remoteAccess := remote.New(util.Getenv("EVCC_REMOTE_ACCESS", "api.evcc.cloud"), httpd.Router(), valueChan)
// signal ui listening
valueChan <- util.Param{Key: keys.StartupCompleted, Val: false}
@ -396,9 +393,7 @@ func runRoot(cmd *cobra.Command, args []string) {
}}
// publish remote access status
if remoteAccess != nil {
valueChan <- util.Param{Key: keys.Remote, Val: remoteAccess.ConfigStatus()}
}
valueChan <- util.Param{Key: keys.Remote, Val: remoteAccess.ConfigStatus()}
// publish system infos
valueChan <- util.Param{Key: keys.Version, Val: util.FormattedVersion()}

View file

@ -301,13 +301,10 @@ func (s *HTTPd) RegisterSystemHandler(site *core.Site, pub publisher, cache *uti
"deletesponsortoken": {"DELETE", "/sponsortoken", deleteSponsorTokenHandler(pub)},
"experimental": {"POST", "/experimental/{value:[01truefalse]+}", boolHandler(setExperimental(pub), getExperimental)},
"optimizer": {"POST", "/optimizer/{value:[01truefalse]+}", boolHandler(setOptimizer(pub), getOptimizer)},
}
if remoteAccess != nil {
routes["remote"] = route{"POST", "/remote/{value:[01truefalse]+}", boolHandler(remoteAccess.Enable, remoteAccess.Enabled)}
routes["remoteclients"] = route{"GET", "/remote/clients", remoteClientsHandler(remoteAccess)}
routes["createremoteclient"] = route{"POST", "/remote/clients", createRemoteClientHandler(remoteAccess)}
routes["deleteremoteclient"] = route{"DELETE", "/remote/clients", deleteRemoteClientHandler(remoteAccess)}
"remote": {"POST", "/remote/{value:[01truefalse]+}", boolHandler(remoteAccess.Enable, remoteAccess.Enabled)},
"remoteclients": {"GET", "/remote/clients", remoteClientsHandler(remoteAccess)},
"createremoteclient": {"POST", "/remote/clients", createRemoteClientHandler(remoteAccess)},
"deleteremoteclient": {"DELETE", "/remote/clients", deleteRemoteClientHandler(remoteAccess)},
}
// yaml handlers