EEbus: add ski suggestion service (#26878)

This commit is contained in:
andig 2026-01-21 15:48:55 +01:00 • committed by GitHub
parent 2f5f2f1e9f
commit 7229bbe0fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

25
server/eebus/service.go Normal file
View file

@ -0,0 +1,25 @@
package eebus
import (
"encoding/json"
"net/http"
"github.com/evcc-io/evcc/server/service"
)
func init() {
mux := http.NewServeMux()
mux.HandleFunc("GET /services", getServices)
service.Register("eebus", mux)
}
func getServices(w http.ResponseWriter, req *http.Request) {
var res []string
if Instance != nil {
for _, s := range Instance.RemoteServices() {
res = append(res, s.Ski)
}
}
json.NewEncoder(w).Encode(res)
}

View file

@ -269,6 +269,7 @@ params:
help:
en: Usually found on the web interface of the wallbox
de: Üblicherweise im Web Interface der Wallbox zu finden
service: eebus/services
- name: uri
private: true
description: