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 site config api (BC) #9812

Merged
merged 87 commits into from
Jan 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
6f3a105
Add site config api
andig Sep 9, 2023
4f6e17c
wip
andig Sep 9, 2023
b4af4bd
Full get api
andig Sep 10, 2023
34e3af4
Merge branch 'master' into feature/site-api
naltatis Sep 13, 2023
f4bbd95
unify header, refactor for more generic device handling
naltatis Sep 13, 2023
bac1227
config overview layout
naltatis Sep 18, 2023
d627273
add/edit meter modal
naltatis Sep 19, 2023
16400c4
better fields
naltatis Sep 19, 2023
16081cd
BMW/Mini: add regions support (#9865)
andig Sep 13, 2023
a7897dd
SunSpec: add simple battery inverter template (#9864)
premultiply Sep 14, 2023
efe423a
Translations update from Hosted Weblate (#9744)
weblate Sep 14, 2023
a2a32bc
FoxESS: cleanup templates (#9561)
premultiply Sep 14, 2023
44a3866
Unify Phoenix charger implementations (#9729)
premultiply Sep 14, 2023
1a80401
chore: spelling
andig Sep 15, 2023
b751932
Ford: fix status HTTP 403
andig Sep 15, 2023
603b916
Ocpp: fix out of sync when vehicle stopped the transaction (#9897)
andig Sep 16, 2023
39a0d59
Fix phase dependent min/max power estimate (#9895)
naltatis Sep 16, 2023
f12439b
Config UI: localized number input (#9846)
naltatis Sep 16, 2023
f0cf32a
Fix power map for slimmelezer DSMR (#9908)
olafz Sep 16, 2023
3ab9dad
Dynamically add/remove vehicles (#9903)
andig Sep 17, 2023
9021809
Vehicle: add cloud switch
andig Sep 17, 2023
5119779
Charging plan: fix co2 notice (#9918)
naltatis Sep 17, 2023
e31253c
chore: upgrade dependencies
andig Sep 17, 2023
6904a3f
Update README.md
andig Sep 17, 2023
33f2306
Update README.md
andig Sep 17, 2023
f5bd0e7
EEbus: let loadpoint rewrite currents on connection (#9921)
andig Sep 17, 2023
0bd6053
Mercedes: sunset BYOC api (#9923)
andig Sep 17, 2023
9ebf41e
DaheimLaden: add more setup info (#9922)
VolkerK62 Sep 17, 2023
fb617b0
Modbus: don't render rtu: false for Modbus TCP (#9915)
andig Sep 17, 2023
f838ac6
BMW: improve regions abstraction
andig Sep 17, 2023
8b06c7e
Fix loadpoint not setting charging charger to enabled (#9932)
GrimmiMeloni Sep 17, 2023
f41236d
Easee: do not treat completed charge as disabled state (#9866)
GrimmiMeloni Sep 17, 2023
3d40280
chore: replace carbon deprecations
andig Sep 17, 2023
5f24b09
fix warning residualpower in combination with battery (#9126)
VolkerK62 Sep 18, 2023
1b3d211
better fields
naltatis Sep 19, 2023
0960d5d
merge
naltatis Sep 19, 2023
3ac0f8d
save grid meter to site
naltatis Sep 20, 2023
97b0a52
add/remove pv and battery
naltatis Sep 20, 2023
63547b9
no explicit persist
naltatis Sep 20, 2023
89d5470
Merge branch 'master' into feature/site-api
naltatis Sep 27, 2023
28b903d
modbus: first step
naltatis Sep 28, 2023
043f95c
dirty and restart
naltatis Sep 28, 2023
8123838
add modbus template
naltatis Sep 29, 2023
a9e9abf
lint
naltatis Sep 29, 2023
680102a
Add retrieving device status
andig Oct 1, 2023
e272a73
modbus settings; add typescript options
naltatis Oct 11, 2023
5fe47c6
prettier
naltatis Oct 11, 2023
fe33ad3
test merged
naltatis Oct 11, 2023
0cc5145
show test results; wip
naltatis Oct 13, 2023
89550b6
Use merged config for update
andig Oct 13, 2023
3f4115c
Fix validation for non-nil error
andig Oct 14, 2023
d8871e3
Merge branch 'master' into feature/site-api
naltatis Oct 25, 2023
d92d387
show values per device
naltatis Oct 25, 2023
71b7531
Prevent concurrent access of otto
andig Oct 28, 2023
25fc70a
Fix js for good
andig Oct 31, 2023
0464df3
Revert "Fix js for good"
andig Oct 31, 2023
2f17a89
Revert "Prevent concurrent access of otto"
andig Oct 31, 2023
b8a3728
Revert "Revert "Fix js for good""
andig Oct 31, 2023
261fb62
Fix js crashes
andig Oct 31, 2023
3760b09
contrast
naltatis Oct 31, 2023
851eefa
device status in modals
naltatis Nov 1, 2023
742f88b
general settings to config screen
naltatis Nov 1, 2023
1db7596
Merge branch 'master' into feature/site-api
naltatis Dec 4, 2023
d1a56b1
Merge branch 'master' into feature/site-api
naltatis Dec 6, 2023
94de914
fix tests
naltatis Dec 6, 2023
20af22c
edit site title; general settings; ui; bugfixes
naltatis Dec 6, 2023
0c62130
toml
naltatis Dec 6, 2023
0a6c911
design update
naltatis Dec 8, 2023
81d58df
design update
naltatis Dec 8, 2023
71ac426
debounce save button; fixes #10976
naltatis Dec 13, 2023
4285e3d
Merge branch 'master' into feature/site-api
naltatis Dec 13, 2023
1d9c59a
Merge branch 'master' into feature/site-api
naltatis Dec 20, 2023
3993a94
ui fixes; fix modbus form data
naltatis Dec 20, 2023
9aef983
add meter e2e tests
naltatis Dec 20, 2023
2a9bdd3
playwright speed
naltatis Dec 20, 2023
ec54599
revert
naltatis Dec 20, 2023
50b2188
add site title e2e test
naltatis Dec 20, 2023
a73e7c3
wip
andig Jan 20, 2024
4bccf4c
wip
andig Jan 20, 2024
ac679b7
wip
andig Jan 20, 2024
dc27902
merge; small ui adjustments
naltatis Jan 20, 2024
13e3f13
small fixes
naltatis Jan 24, 2024
27b76a0
Merge branch 'master' into feature/site-api
naltatis Jan 24, 2024
c007ebe
Make sure meters are complete
andig Jan 27, 2024
0bc1b4e
wip
andig Jan 27, 2024
942305e
add e2e test for db meter
naltatis Jan 27, 2024
5befd60
Protect grid meter
andig Jan 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
Prevent concurrent access of otto
  • Loading branch information
andig committed Oct 28, 2023
commit 71b753166e6939e585d7f3412f7939be955afdca
9 changes: 9 additions & 0 deletions provider/javascript.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package provider

import (
"sync"

"github.com/evcc-io/evcc/provider/javascript"
"github.com/evcc-io/evcc/util"
"github.com/robertkrimen/otto"
Expand All @@ -9,6 +11,7 @@ import (

// Javascript implements Javascript request provider
type Javascript struct {
mu sync.Mutex // otto is not thread safe
vm *otto.Otto
script string
in []inputTransformation
Expand Down Expand Up @@ -106,6 +109,9 @@ func (p *Javascript) BoolGetter() func() (bool, error) {
}

func (p *Javascript) handleGetter() (any, error) {
p.mu.Lock()
defer p.mu.Unlock()

if err := transformInputs(p.in, p.setParam); err != nil {
return nil, err
}
Expand All @@ -114,6 +120,9 @@ func (p *Javascript) handleGetter() (any, error) {
}

func (p *Javascript) handleSetter(param string, val any) error {
p.mu.Lock()
defer p.mu.Unlock()

if err := p.setParam(param, val); err != nil {
return err
}
Expand Down
Loading