-
-
Notifications
You must be signed in to change notification settings - Fork 524
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
Config UI: add missing config sections / partial yaml inputs (BC) #13319
base: master
Are you sure you want to change the base?
Conversation
@naltatis ich brauche mal eine Idee. ModbusProxy ist eine Liste. Wie wollen wir hier mit Updates umgehen:
Meine Tendenz wäre per Element über numerischen Index. Passt das? |
@andig Im ersten Schritt (dieser PR) würde ich dir nur einen Yaml Block geben und keine Rücksicht auf die innere Struktur nehmen. Heißt, ein Update hat immer ein komplettes Neu-initialisieren zur Folge. Nichts auf Item-Ebene. Gleiches gilt für Messaging. Da ist die Struktur ja noch komplizierter, weil Messages und Services (Liste). Das ist natürlich nicht schön und wir müssen das früher oder später sauber als Struktur/Liste ausmodellieren. Aber ich sehe das hier erstmal als einen pragmatischen Zwischenschritt. |
Passt, das ist hässlich aber einfach. |
@naltatis die existierenden Site APIs, z.B: Vorschlag:
Wenn das passt müssen wir noch die Settings initial migrieren und dann nur noch aus der DB lesen. |
Ich habs jetzt |
Ich hab ein paar Anpassungen an der Migration gemacht. Nun startet es auch und kopiert die richtigen Daten. Allerdings funktioniert |
Wohl so ein ORM-Ding. Ich schaus an. An der Stelle müssen wir ja leider echt löschen- leer setzen reicht nicht. |
cmd/setup.go
Outdated
func configureModbusProxy(conf []globalconfig.ModbusProxy) error { | ||
// migrate settings | ||
if settings.Exists(keys.ModbusProxy) { | ||
if err := settings.Yaml(keys.ModbusProxy, &conf); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Der hier schlägt fehl, wenn ich evcc migrate
aufrufe und dann starte. In der DB steht unter dem Key der Wert []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was ja richtig ist- eine leere Liste von Modbus Proxies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jo, schlägt beim lesen trotzdem fehl. Kannst du mit der demo.yaml testen.
@andig die
Korrektur: Sie funktioniert, wenn es nichts zu löschen gibt, aber das ist ja nicht der Anwendungsfall hier. 😄 |
Ich hab |
@andig meine Todoliste hier ist jetzt leer. Wenn die Fehler aus dem Migrationscommand behoben sind können wir den mMn. reinnehmen. |
Panic auch behoben. Man muss es halt auch richtig machen :) Wir könnten das jetzt als |
... oder mutig zu nem Nightly machen. Wir haben die Änderungen ja so umgebaut, dass eigentlich nichts Breaking sein sollt |
Confirm. Löschen klappt jetzt wie erwartet. |
Replaces #11739
Goal
Later steps (seperate PRs)
BC
Todos
remove all ns conversions from UI@naltatistemp
in addition tosoc
@naltatisOut of scope:
movedirty
api to web socketmove site meters to global config, identified by type (grid, pv, battery, aux)show/update meter configuration when device fails during startupallow saving broken devices (RCT)→ moved out-of-scope tasks to epic #6029