Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vaillant SG Ready charger #17845

Merged
merged 44 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
62ea9a1
Add SG Ready charger
andig Dec 14, 2024
f19a4b3
wip
andig Dec 14, 2024
86b82b8
wip
andig Dec 15, 2024
166c655
wip
andig Dec 16, 2024
0cb06b8
Add maxPower, make getMode optional
andig Dec 16, 2024
7db4c82
Apply suggestions from code review
andig Dec 16, 2024
6501c91
wip
andig Dec 16, 2024
4a5b986
wip
andig Dec 16, 2024
7834b4b
wip
andig Dec 16, 2024
b8fc43d
fix features
andig Dec 16, 2024
e0e8975
wip
andig Dec 16, 2024
d91f5d3
wip
andig Dec 16, 2024
12660cd
wip
andig Dec 16, 2024
6817e07
fix enable
andig Dec 16, 2024
2b52521
Add heating group
andig Dec 16, 2024
d9c3636
wip
andig Dec 16, 2024
830cc9a
wip
andig Dec 16, 2024
32499b6
Add tempsource
andig Dec 16, 2024
c265f19
wip
andig Dec 16, 2024
ee3dcac
wip
andig Dec 16, 2024
b4c3e85
Merge branch 'master' into feat/sgready
andig Dec 18, 2024
f91899f
Add Vaillant SG Ready charger
andig Dec 21, 2024
f47a042
wip
andig Dec 21, 2024
2643079
wip
andig Dec 21, 2024
dea7def
wip
andig Dec 21, 2024
9cade3b
wip
andig Dec 21, 2024
6a597a3
Merge branch 'feat/sgready' into feat/vaillant-sensonet
andig Dec 21, 2024
6c0c304
wip
andig Dec 21, 2024
dc65f5d
wip
andig Dec 21, 2024
75e43ad
wip
andig Dec 21, 2024
4702b96
Merge branch 'master' into feat/vaillant-sensonet
andig Dec 22, 2024
fd83066
wip
andig Dec 22, 2024
178f06d
Use heating only if setpoint defined
andig Dec 22, 2024
46e3978
wip
andig Dec 22, 2024
b0263e7
Redact
andig Dec 23, 2024
2a821bb
wip
andig Dec 25, 2024
0971c80
wip
andig Dec 27, 2024
b7479cd
wip
andig Dec 27, 2024
dc005b4
Better strategy
andig Dec 27, 2024
c28624d
wip
andig Dec 27, 2024
3442a8e
wip
andig Dec 27, 2024
986c2a7
wip
andig Dec 27, 2024
00eaac9
wip
andig Dec 27, 2024
1111473
Add hot water temp
andig Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
andig committed Dec 25, 2024
commit 2a821bbec0bda2b71bebd5cae3cf62e383cffdf4
14 changes: 6 additions & 8 deletions charger/vaillant.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import (
"context"

"github.com/WulfgarW/sensonet"

Check failure on line 23 in charger/vaillant.go

View workflow job for this annotation

GitHub Actions / Build

github.com/WulfgarW/sensonet@v0.0.2-0.20241223212731-a6f5f75e6bc3: replacement directory ../wsensonet does not exist

Check failure on line 23 in charger/vaillant.go

View workflow job for this annotation

GitHub Actions / Integration

github.com/WulfgarW/sensonet@v0.0.2-0.20241223212731-a6f5f75e6bc3: replacement directory ../wsensonet does not exist

Check failure on line 23 in charger/vaillant.go

View workflow job for this annotation

GitHub Actions / Test

github.com/WulfgarW/sensonet@v0.0.2-0.20241223212731-a6f5f75e6bc3: replacement directory ../wsensonet does not exist
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/util"
"github.com/evcc-io/evcc/util/request"
"golang.org/x/oauth2"
)

func init() {
Expand Down Expand Up @@ -55,18 +56,15 @@

log := util.NewLogger("vaillant").Redact(cc.User, cc.Password)
client := request.NewClient(log)
clientCtx := context.WithValue(ctx, oauth2.HTTPClient, client)

identity, err := sensonet.NewIdentity(client, cc.Realm)
oc := sensonet.Oauth2ConfigForRealm(cc.Realm)
token, err := oc.PasswordCredentialsToken(clientCtx, cc.User, cc.Password)
if err != nil {
return nil, err
}

ts, err := identity.Login(cc.User, cc.Password)
if err != nil {
return nil, err
}

conn, err := sensonet.NewConnection(client, ts)
conn, err := sensonet.NewConnection(client, oc.TokenSource(clientCtx, token))
if err != nil {
return nil, err
}
Expand All @@ -89,7 +87,7 @@
set := func(mode int64) error {
switch mode {
case Normal:
_, err := conn.StopStrategybased(systemID, 0, &heatingPar, &hotwaterPar)
_, err := conn.StopStrategybased(systemID, &heatingPar, &hotwaterPar)
return err
case Boost:
strategy := sensonet.STRATEGY_HOTWATER_THEN_HEATING
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/BurntSushi/toml v1.4.0
github.com/Masterminds/sprig/v3 v3.3.0
github.com/PuerkitoBio/goquery v1.10.0
github.com/WulfgarW/sensonet v0.0.2-0.20241212184816-18cb23f466e6
github.com/WulfgarW/sensonet v0.0.2-0.20241223212731-a6f5f75e6bc3
github.com/andig/go-powerwall v0.2.1-0.20230808194509-dd70cdb6e140
github.com/andig/gosunspec v0.0.0-20240918203654-860ce51d602b
github.com/andig/mbserver v0.0.0-20230310211055-1d29cbb5820e
Expand Down Expand Up @@ -210,6 +210,4 @@ replace github.com/grid-x/modbus => github.com/evcc-io/modbus v0.0.0-20241027151

replace github.com/lorenzodonini/ocpp-go => github.com/evcc-io/ocpp-go v0.0.0-20240914122959-0d109e403130

// replace github.com/WulfgarW/sensonet => ../wsensonet

replace github.com/WulfgarW/sensonet => github.com/andig/sensonet-1 v0.0.2-0.20241221141704-b9d5353336c1
replace github.com/WulfgarW/sensonet => ../wsensonet
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX
github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/WulfgarW/sensonet v0.0.2-0.20241223212731-a6f5f75e6bc3 h1:SAOrJO8pVZpnH0gqqZGufhxqkkO9Rqar2DqY24htz4o=
github.com/WulfgarW/sensonet v0.0.2-0.20241223212731-a6f5f75e6bc3/go.mod h1:QZodMch+UskApzlhhGa5ydSY0v5knlF4uQ5WO78xrEs=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/ahmetb/go-linq/v3 v3.2.0 h1:BEuMfp+b59io8g5wYzNoFe9pWPalRklhlhbiU3hYZDE=
github.com/ahmetb/go-linq/v3 v3.2.0/go.mod h1:haQ3JfOeWK8HpVxMtHHEMPVgBKiYyQ+f1/kLZh/cj9U=
Expand All @@ -37,8 +39,6 @@ github.com/andig/gosunspec v0.0.0-20240918203654-860ce51d602b h1:81UMfM949I7StrR
github.com/andig/gosunspec v0.0.0-20240918203654-860ce51d602b/go.mod h1:c6P6szcR+ROkqZruOR4f6qbDKFjZX6OitPpj+yJ/r8k=
github.com/andig/mbserver v0.0.0-20230310211055-1d29cbb5820e h1:m/NTP3JWpR7M0ljLxiQU4fzR25jjhe1LDtxLMNcoNJQ=
github.com/andig/mbserver v0.0.0-20230310211055-1d29cbb5820e/go.mod h1:4VtYzTm//oUipwvO3yh0g/udTE7pYJM+U/kyAuFDsgM=
github.com/andig/sensonet-1 v0.0.2-0.20241221141704-b9d5353336c1 h1:l7vFbfYyhkGqlk91kySa3kqPJSE1eYWBAEm+X/v/Q00=
github.com/andig/sensonet-1 v0.0.2-0.20241221141704-b9d5353336c1/go.mod h1:txWeNF3TKSUNkaeQZXT//BiZPY4+xOZ4VXsFN+taQe4=
github.com/andig/yaml v0.0.0-20240531135838-1ff5761ab467 h1:JqIoHxsQSV39xaemvVRu3HOkSf5AbhQ1YEENJa2cL3Q=
github.com/andig/yaml v0.0.0-20240531135838-1ff5761ab467/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
Expand Down
Loading