Update copyrights

This commit is contained in:
andig 2022-01-29 12:51:09 +01:00
parent 3ecd38754f
commit f4c501c241
10 changed files with 29 additions and 23 deletions

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.
@ -66,12 +66,12 @@ func NewAlfenFromConfig(other map[string]interface{}) (api.Charger, error) {
return nil, err
}
return NewAlfen(cc.URI, cc.Device, cc.Comset, cc.Baudrate, cc.ID)
return NewAlfen(cc.URI, cc.ID)
}
// NewAlfen creates Alfen charger
func NewAlfen(uri, device, comset string, baudrate int, slaveID uint8) (api.Charger, error) {
conn, err := modbus.NewConnection(uri, device, comset, baudrate, modbus.Tcp, slaveID)
func NewAlfen(uri string, slaveID uint8) (api.Charger, error) {
conn, err := modbus.NewConnection(uri, "", "", 0, modbus.Tcp, slaveID)
if err != nil {
return nil, err
}

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.
@ -63,6 +63,8 @@ func NewAmtronFromConfig(other map[string]interface{}) (api.Charger, error) {
// NewAmtron creates Amtron charger
func NewAmtron(uri string, slaveID uint8) (api.Charger, error) {
uri = util.DefaultPort(uri, 502)
conn, err := modbus.NewConnection(uri, "", "", 0, modbus.Tcp, slaveID)
if err != nil {
return nil, err

View file

@ -51,6 +51,10 @@ func NewCfosPowerBrain(uri string, id uint8) (*CfosPowerBrain, error) {
return nil, err
}
if !sponsor.IsAuthorized() {
return nil, api.ErrSponsorRequired
}
log := util.NewLogger("cfos")
conn.Logger(log.TRACE)

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.

View file

@ -1,19 +1,8 @@
package charger
import (
"errors"
"fmt"
"time"
"github.com/evcc-io/evcc/api"
goe "github.com/evcc-io/evcc/charger/go-e"
"github.com/evcc-io/evcc/util"
"github.com/evcc-io/evcc/util/sponsor"
)
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.
@ -28,6 +17,17 @@ import (
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
import (
"errors"
"fmt"
"time"
"github.com/evcc-io/evcc/api"
goe "github.com/evcc-io/evcc/charger/go-e"
"github.com/evcc-io/evcc/util"
"github.com/evcc-io/evcc/util/sponsor"
)
// https://go-e.co/app/api.pdf
// https://github.com/goecharger/go-eCharger-API-v1/
// https://github.com/goecharger/go-eCharger-API-v2/

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.

View file

@ -2,7 +2,7 @@ package charger
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.

View file

@ -2,7 +2,7 @@ package vehicle
// LICENSE
// Copyright (c) 2019-2021 andig
// Copyright (c) 2019-2022 andig
// This module is NOT covered by the MIT license. All rights reserved.