Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 31 additions & 0 deletions packages/helpermodules/update_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2016,3 +2016,34 @@ def upgrade(topic: str, payload) -> Optional[dict]:
return {topic: dataclass_utils.asdict(LoadmanagementLimit(None, None))}
self._loop_all_received_topics(upgrade)
self.__update_topic("openWB/system/datastore_version", 77)

def upgrade_datastore_77(self) -> None:
def upgrade(topic: str, payload) -> Optional[dict]:
# add "official" flag to selected backup cloud
if re.search("openWB/system/backup_cloud/config", topic) is not None:
configuration_payload = decode_payload(payload)
if configuration_payload.get("type") == "nextcloud":
configuration_payload.update({"official": True})
return {topic: configuration_payload}
# add "official" flag to selected electricity tariff provider
if re.search("openWB/optional/et/provider", topic) is not None:
configuration_payload = decode_payload(payload)
official_providers = ["awattar", "energycharts", "rabot", "tibber", "voltego"]
if configuration_payload.get("type") in official_providers:
configuration_payload.update({"official": True})
return {topic: configuration_payload}
# add "official" flag to selected monitoring module
if re.search("openWB/optional/monitoring/config", topic) is not None:
configuration_payload = decode_payload(payload)
if configuration_payload.get("type") == "zabbix":
configuration_payload.update({"official": True})
return {topic: configuration_payload}
# add "official" flag to selected vehicle modules
if re.search("openWB/vehicle/[0-9]+/soc_module/config", topic) is not None:
configuration_payload = decode_payload(payload)
official_vehicle_modules = ["http", "json", "manual", "mqtt", "tronity"]
if configuration_payload.get("type") in official_vehicle_modules:
configuration_payload.update({"official": True})
return {topic: configuration_payload}
self._loop_all_received_topics(upgrade)
self.__update_topic("openWB/system/datastore_version", 78)
2 changes: 2 additions & 0 deletions packages/modules/backup_clouds/nextcloud/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class NextcloudBackupCloud:
def __init__(self,
name: str = "NextCloud",
type: str = "nextcloud",
official: bool = True,
configuration: NextcloudBackupCloudConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or NextcloudBackupCloudConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/backup_clouds/nfs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class NfsBackupCloud:
def __init__(self,
name: str = "Nfs",
type: str = "nfs",
official: bool = False,
configuration: NfsBackupCloudConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or NfsBackupCloudConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/backup_clouds/onedrive/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class OneDriveBackupCloud:
def __init__(self,
name: str = "OneDrive",
type: str = "onedrive",
official: bool = False,
configuration: OneDriveBackupCloudConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or OneDriveBackupCloudConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/backup_clouds/samba/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class SambaBackupCloud:
def __init__(self,
name: str = "Samba",
type: str = "samba",
official: bool = False,
configuration: SambaBackupCloudConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or SambaBackupCloudConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/awattar/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class AwattarTariff:
def __init__(self,
name: str = "aWATTar Hourly",
type: str = "awattar",
official: bool = True,
configuration: AwattarTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or AwattarTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/energycharts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class EnergyChartsTariff:
def __init__(self,
name: str = "Energy-Charts",
type: str = "energycharts",
official: bool = True,
configuration: EnergyChartsTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or EnergyChartsTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/fixed_hours/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ class FixedHoursTariff:
def __init__(self,
name: str = "Feste Tarifstunden (z.b. §14a EnWG Modul3)",
type: str = "fixed_hours",
official: bool = False,
configuration: FixedHoursTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or FixedHoursTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/octopusenergy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class OctopusEnergyTariff:
def __init__(self,
name: str = "Octopus Energy Deutschland",
type: str = "octopusenergy",
official: bool = False,
configuration: OctopusEnergyTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or OctopusEnergyTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/ostrom/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class OstromTariff:
def __init__(self,
name: str = "ostrom",
type: str = "ostrom",
official: bool = False,
configuration: OstromTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or OstromTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/rabot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class RabotTariff:
def __init__(self,
name: str = "Rabot",
type: str = "rabot",
official: bool = True,
configuration: RabotTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or RabotTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/tibber/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ class TibberTariff:
def __init__(self,
name: str = "Tibber",
type: str = "tibber",
official: bool = True,
configuration: TibberTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or TibberTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/electricity_tariffs/voltego/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class VoltegoTariff:
def __init__(self,
name: str = "Voltego",
type: str = "voltego",
official: bool = True,
configuration: VoltegoTariffConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or VoltegoTariffConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/monitoring/zabbix/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class Zabbix:
def __init__(self,
name: str = "openWB (Zabbix)",
type: str = "zabbix",
official: bool = True,
configuration: ZabbixConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or ZabbixConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/aiways/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class AiwaysVehicleSoc:
def __init__(self,
name: str = "Aiways",
type: str = "aiways",
official: bool = False,
configuration: AiwaysVehicleSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or AiwaysVehicleSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/bmwbc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class BMWbc:
def __init__(self,
name: str = "BMW & Mini ",
type: str = "bmwbc",
official: bool = False,
configuration: BMWbcConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or BMWbcConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/evcc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class EVCCVehicleSoc:
def __init__(self,
name: str = "EVCC",
type: str = "evcc",
official: bool = False,
configuration: EVCCVehicleSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or EVCCVehicleSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/evnotify/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class EVNotify:
def __init__(self,
name: str = "EVNotify",
type: str = "evnotify",
official: bool = False,
configuration: EVNotifyConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or EVNotifyConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/http/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class HttpSocSetup():
def __init__(self,
name: str = "HTTP SOC Module",
type: str = "http",
official: bool = True,
configuration: HttpSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or HttpSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/json/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class JsonSocSetup():
def __init__(self,
name: str = "JSON",
type: str = "json",
official: bool = True,
configuration: JsonSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or JsonSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/kia/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ class KIA:
def __init__(self,
name: str = "KIA / Hyundai (experimental)",
type: str = "kia",
official: bool = False,
configuration: KIAConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or KIAConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/manual/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class ManualSoc:
def __init__(self,
name: str = "Manueller SoC",
type: str = "manual",
official: bool = True,
configuration: ManualSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or ManualSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/mqtt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class MqttSocSetup:
def __init__(self,
name: str = "MQTT",
type: str = "mqtt",
official: bool = True,
configuration: MqttSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or MqttSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/ovms/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class OVMS:
def __init__(self,
name: str = "OVMS",
type: str = "ovms",
official: bool = False,
configuration: OVMSConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or OVMSConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/polestar/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class Polestar2:
def __init__(self,
name: str = "Polestar2",
type: str = "polestar",
official: bool = False,
configuration: Polestar2Configuration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or Polestar2Configuration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/psa/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class PSA:
def __init__(self,
name: str = "PSA (nicht mehr verwenden)",
type: str = "psa",
official: bool = False,
configuration: PSAConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or PSAConfiguration()
3 changes: 2 additions & 1 deletion packages/modules/vehicles/psacc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class PSACCVehicleSoc(JsonSocSetup):
def __init__(self,
name: str = "PSA Car Controller",
type: str = "psacc",
official: bool = False,
configuration: PSACCVehicleSocConfiguration = None) -> None:
super().__init__(name=name, type=type,
super().__init__(name=name, type=type, official=official,
configuration=configuration or PSACCVehicleSocConfiguration())
2 changes: 2 additions & 0 deletions packages/modules/vehicles/renault/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class Renault:
def __init__(self,
name: str = "Renault",
type: str = "renault",
official: bool = False,
configuration: RenaultConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or RenaultConfiguration()
4 changes: 3 additions & 1 deletion packages/modules/vehicles/skodaconnect/config-disabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def __init__(self,
user_id: Optional[str] = None, # show in UI
password: Optional[str] = None, # show in UI
vin: Optional[str] = None, # show in UI
refresh_token: Optional[dict] = None # DON'T show in UI!
refresh_token: Optional[dict] = None # DON'T show in UI!
):
self.user_id = user_id
self.password = password
Expand All @@ -18,7 +18,9 @@ class SkodaConnect:
def __init__(self,
name: str = "SkodaConnect",
type: str = "skodaconnect",
official: bool = False,
configuration: SkodaConnectConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or SkodaConnectConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/smarthello/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class SmartHello:
def __init__(self,
name: str = "Smart Hello (#1, #3)",
type: str = "smarthello",
official: bool = False,
configuration: SmartHelloConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or SmartHelloConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/tesla/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class TeslaSoc:
def __init__(self,
name: str = "Tesla",
type: str = "tesla",
official: bool = False,
configuration: TeslaSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or TeslaSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/tronity/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class TronityVehicleSoc:
def __init__(self,
name: str = "Tronity",
type: str = "tronity",
official: bool = True,
configuration: TronityVehicleSocConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or TronityVehicleSocConfiguration()
2 changes: 2 additions & 0 deletions packages/modules/vehicles/vwid/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class VWId:
def __init__(self,
name: str = "VWId",
type: str = "vwid",
official: bool = False,
configuration: VWIdConfiguration = None) -> None:
self.name = name
self.type = type
self.official = official
self.configuration = configuration or VWIdConfiguration()
2 changes: 1 addition & 1 deletion runs/atreboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ chmod 666 "$LOGFILE"
# check for python dependencies
if ((hasInet == 1)); then
echo "install required python packages with 'pip3'..."
if pip3 install -r "${OPENWBBASEDIR}/requirements.txt"; then
if pip3 install --upgrade --only-binary :all: -r "${OPENWBBASEDIR}/requirements.txt"; then
echo "done"
else
echo "failed!"
Expand Down