Skip to content

Commit

Permalink
Merge branch 'master' into chore/sprout-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	util/format.go
  • Loading branch information
andig committed May 15, 2024
2 parents 17ab71b + c3b48b0 commit bad176b
Show file tree
Hide file tree
Showing 24 changed files with 1,398 additions and 858 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Expand Up @@ -16,7 +16,6 @@ linters:
enable:
- dogsled
- durationcheck
- exportloopref
- gci
- gofmt
- goimports
Expand All @@ -40,6 +39,7 @@ linters:
# fixme
# - bodyclose
# - exhaustive
# - exportloopref
# - gocritic
# - godot
# - gomoddirectives
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Energyflow/Visualization.vue
Expand Up @@ -202,7 +202,7 @@ export default {
return {
value,
hideIcon: this.hideLabelIcon(value, minWidth),
style: { width: this.widthTotal(value) },
style: { "flex-basis": this.widthTotal(value) },
[position]: true,
};
},
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Loadpoint.vue
Expand Up @@ -182,7 +182,7 @@ export default {
phaseRemaining: Number,
pvRemaining: Number,
pvAction: String,
smartCostLimit: Number,
smartCostLimit: { type: Number, default: 0 },
smartCostType: String,
smartCostActive: Boolean,
tariffGrid: Number,
Expand Down
2 changes: 0 additions & 2 deletions assets/js/components/Loadpoints.vue
Expand Up @@ -63,9 +63,7 @@ export default {
props: {
loadpoints: Array,
vehicles: Array,
smartCostLimit: Number,
smartCostType: String,
smartCostActive: Boolean,
tariffGrid: Number,
tariffCo2: Number,
currency: String,
Expand Down
3 changes: 0 additions & 3 deletions assets/js/components/Site.vue
Expand Up @@ -21,9 +21,7 @@
class="mt-1 mt-sm-2 flex-grow-1"
:loadpoints="loadpoints"
:vehicles="vehicleList"
:smartCostLimit="smartCostLimit"
:smartCostType="smartCostType"
:smartCostActive="smartCostActive"
:tariffGrid="tariffGrid"
:tariffCo2="tariffCo2"
:currency="currency"
Expand Down Expand Up @@ -97,7 +95,6 @@ export default {
uploadProgress: Number,
sponsor: String,
sponsorTokenExpires: Number,
smartCostLimit: Number,
smartCostType: String,
smartCostActive: Boolean,
},
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/SmartCostLimit.vue
Expand Up @@ -85,7 +85,7 @@ export default {
components: { TariffChart },
mixins: [formatter],
props: {
smartCostLimit: { type: Number, default: 0 },
smartCostLimit: Number,
smartCostType: String,
tariffGrid: Number,
currency: String,
Expand Down
15 changes: 10 additions & 5 deletions charger/solax.go
Expand Up @@ -48,6 +48,12 @@ const (
solaxRegActivePower = 0x000B // uint16 1W
solaxRegTotalEnergy = 0x0010 // uint32s 0.1kWh
solaxRegState = 0x001D // uint16

solaxCmdStop = 3
solaxCmdStart = 4

solaxModeStop = 0
solaxModeFast = 1
)

func init() {
Expand Down Expand Up @@ -140,18 +146,17 @@ func (wb *Solax) Enabled() (bool, error) {
return false, err
}

return binary.BigEndian.Uint16(b) != 0, nil
return binary.BigEndian.Uint16(b) != solaxModeStop, nil
}

// Enable implements the api.Charger interface
func (wb *Solax) Enable(enable bool) error {
var mode uint16 = 0 // "STOP"
var cmd uint16 = solaxCmdStop
if enable {
mode = 1 // "FAST"
cmd = solaxCmdStart
}

_, err := wb.conn.WriteSingleRegister(solaxRegDeviceMode, mode)

_, err := wb.conn.WriteSingleRegister(solaxRegCommandControl, cmd)
return err
}

Expand Down
5 changes: 5 additions & 0 deletions i18n/de.toml
Expand Up @@ -472,13 +472,18 @@ vehicle = "Fahrzeug"

[sessions.csv]
chargedenergy = "Energie (kWh)"
chargeduration = "Ladedauer"
co2perkwh = "CO₂/kWh"
created = "Startzeit"
finished = "Endzeit"
identifier = "Kennung"
loadpoint = "Ladepunkt"
meterstart = "Anfangszählerstand (kWh)"
meterstop = "Endzählerstand (kWh)"
odometer = "Kilometerstand (km)"
price = "Preis"
priceperkwh = "Preis/kWh"
solarpercentage = "Sonne (%)"
vehicle = "Fahrzeug"

[sessions.filter]
Expand Down
5 changes: 5 additions & 0 deletions i18n/en.toml
Expand Up @@ -471,13 +471,18 @@ vehicle = "Vehicle"

[sessions.csv]
chargedenergy = "Energy (kWh)"
chargeduration = "Duration"
co2perkwh = "CO₂/kWh"
created = "Created"
finished = "Finished"
identifier = "Identifier"
loadpoint = "Charging point"
meterstart = "Meter start (kWh)"
meterstop = "Meter stop (kWh)"
odometer = "Mileage (km)"
price = "Price"
priceperkwh = "Price/kWh"
solarpercentage = "Solar (%)"
vehicle = "Vehicle"

[sessions.filter]
Expand Down
10 changes: 10 additions & 0 deletions i18n/es.toml
Expand Up @@ -74,6 +74,16 @@ template = "Fabricante"
titleChoice = "¿Qué quieres añadir?"
validateSave = "Validar y guardar"

[config.options]

[config.options.endianness]
big = "big endian"
little = "little endian"

[config.options.schema]
http = "HTTP (sin cifrar)"
https = "HTTPS (cifrado)"

[config.pv]
titleAdd = "Añadir contador solar"
titleEdit = "Editar contador solar"
Expand Down
28 changes: 19 additions & 9 deletions i18n/fr.toml
Expand Up @@ -13,7 +13,7 @@ legendTitle = "Comment l'énergie solaire doit-elle être utilisée?"
legendTopAutostart = "démarre automatiquement"
legendTopName = "recharge soutenue par la batterie"
legendTopSubline = "sans interruption"
modalTitle = "Réglages de la batterie"
modalTitle = "Batterie domestique"

[batterySettings.bufferStart]
above = "lorsque chargé à plus que {soc}"
Expand Down Expand Up @@ -59,7 +59,7 @@ titleEdit = "Modifier compteur pour réseau"
[config.main]
addLoadpoint = "Ajouter un point de charge"
addPvBattery = "Ajouter du solaire ou une batterie"
addVehicle = "Ajouter le véhicule"
addVehicle = "Ajouter un véhicule"
edit = "éditer"
title = "Configuration"
unconfigured = "non configuré"
Expand All @@ -74,6 +74,16 @@ template = "Fabricant"
titleChoice = "Que voulez-vous ajouter ?"
validateSave = "Valider et enregistrer"

[config.options]

[config.options.endianness]
big = "gros-boutiste"
little = "petit-boutiste"

[config.options.schema]
http = "HTTP (non crypté)"
https = "HTTP (crypté)"

[config.pv]
titleAdd = "Ajouter un compteur pour le solaire"
titleEdit = "Modifier le compteur pour le solaire"
Expand All @@ -95,7 +105,7 @@ restartingDescription = "Veuillez patienter…"
restartingMessage = "Redémarrage d’evcc en cours."

[config.title]
description = "«Affiché sur l’écran principal et l’onglet du navigateur.»"
description = "Affiché sur l’écran principal et l’onglet du navigateur."
label = "Titre"
title = "Modifier le titre"

Expand Down Expand Up @@ -240,8 +250,8 @@ update = "Mise à jour automatique"

[loginModal]
cancel = "Annuler"
error = "«Connection échouée:»"
invalid = "«Mot de passe invalide.»"
error = "Connection échouée:"
invalid = "Mot de passe invalide."
login = "Identifiant"
password = "Mot de passe"
reset = "Réinitialiser le mot de passe ?"
Expand Down Expand Up @@ -390,7 +400,7 @@ detectionActive = "Détection du véhicule…"
fallbackName = "Véhicule"
moreActions = "Plus d'actions"
none = "Pas de véhicule"
notReachable = "«Impossible d’atteindre le véhicule. Essayez de redémarrer evcc.»"
notReachable = "Impossible d’atteindre le véhicule. Essayez de redémarrer evcc."
targetSoc = "Limite"
temp = "Temp."
tempLimit = "Temp. limite"
Expand Down Expand Up @@ -433,9 +443,9 @@ message = "Pas de connexion au serveur."
reload = "Recharger?"

[passwordModal]
description = "«Configurez un mot de passe pour protéger la configuration. L’utilisation de l’écran principal et toujours possible sans authentification.»"
description = "Configurez un mot de passe pour protéger la configuration. L’utilisation de l’écran principal et toujours possible sans authentification."
empty = "Le mot de passe ne doit pas être vide"
error = "«Erreur:»"
error = "Erreur:"
labelCurrent = "Mot de passe actuel"
labelNew = "Nouveau mot de passe"
labelRepeat = "Répétez le mot de passe"
Expand Down Expand Up @@ -495,7 +505,7 @@ allVehicles = "tous les véhicules"
filter = "Filtrer"

[settings]
title = "Réglages généraux"
title = "Interface utilisateur"

[settings.fullscreen]
enter = "Passer en plein écran"
Expand Down

0 comments on commit bad176b

Please sign in to comment.