diff --git a/openwb-install.sh b/openwb-install.sh index 5665357839..3fb6a141a8 100755 --- a/openwb-install.sh +++ b/openwb-install.sh @@ -139,6 +139,7 @@ systemctl start openwbRemoteSupport echo "installation finished, now starting openwb services..." systemctl start openwb2 +systemctl start openwb-simpleAPI echo "all done" echo "if you want to use this installation for development, add a password for user 'openwb'" diff --git a/packages/helpermodules/data_migration/data_migration.py b/packages/helpermodules/data_migration/data_migration.py index ec197a1fb7..40da4697bc 100644 --- a/packages/helpermodules/data_migration/data_migration.py +++ b/packages/helpermodules/data_migration/data_migration.py @@ -15,7 +15,6 @@ import pathlib import shutil import tarfile -from paho.mqtt.client import Client as MqttClient, MQTTMessage from threading import Thread from typing import Callable, Dict, List, Optional, Union @@ -23,7 +22,6 @@ from control.ev import ev from dataclass_utils import dataclass_from_dict import dataclass_utils -from helpermodules.broker import BrokerClient from helpermodules.data_migration.id_mapping import MapId from helpermodules.hardware_configuration import update_hardware_configuration from helpermodules.measurement_logging.process_log import get_totals @@ -639,21 +637,3 @@ def merge_list_of_records(self, key): reduce(self._merge_records_by(key), records) for _, records in groupby(sorted(lst, key=key_prop), key_prop) ] - - -class BrokerCphargepoints: - def get_configured_cp_ids(self) -> List: - self.all_received_topics = {} - BrokerClient("update-config", self.on_connect, self.on_message).start_finite_loop() - cp_ids = [] - for topic, payload in self.all_received_topics.items(): - cp_ids.append(get_index(topic)) - return cp_ids - - def on_connect(self, client: MqttClient, userdata, flags: dict, rc: int): - """ connect to broker and subscribe to set topics - """ - client.subscribe("openWB/chargepoint/+/config", 2) - - def on_message(self, client: MqttClient, userdata, msg: MQTTMessage): - self.all_received_topics.update({msg.topic: msg.payload})