Fronius Solar API: fix battery mode for firmware >= 1.38 (#27711)
This commit is contained in:
parent
ea857537f2
commit
fabf42918d
1 changed files with 6 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ package plugin
|
|||
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
|
@ -13,6 +14,11 @@ import (
|
|||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// some servers send SHA256 instead of the RFC 7616 compliant SHA-256
|
||||
digest.Algs["SHA256"] = sha256.New
|
||||
}
|
||||
|
||||
// Auth is the authorization config
|
||||
type Auth struct {
|
||||
Type, User, Password, Token string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue