diff --git a/charger/mystrom.go b/charger/mystrom.go index f25a038f3..570d996e4 100644 --- a/charger/mystrom.go +++ b/charger/mystrom.go @@ -69,7 +69,7 @@ func (c *MyStrom) Enable(enable bool) error { c.reportG = provider.Cached(c.Report, c.cache) onoff := map[bool]int{false: 0, true: 1} - return c.Request(fmt.Sprintf("relay/state=%d", onoff[enable])) + return c.Request(fmt.Sprintf("relay?state=%d", onoff[enable])) } // MaxCurrent implements the api.Charger interface diff --git a/meter/mystrom/mystrom.go b/meter/mystrom/mystrom.go index b4514dac5..32db988a4 100644 --- a/meter/mystrom/mystrom.go +++ b/meter/mystrom/mystrom.go @@ -2,6 +2,7 @@ package mystrom import ( "fmt" + "strings" "github.com/evcc-io/evcc/api" "github.com/evcc-io/evcc/util" @@ -20,7 +21,7 @@ type Connection struct { func NewConnection(uri string) *Connection { return &Connection{ - uri: uri, + uri: util.DefaultScheme(strings.TrimSuffix(uri, "/"), "http"), Helper: request.NewHelper(util.NewLogger("mystrom")), } }