Skip to content
Merged

Fixes #3686

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
1 change: 1 addition & 0 deletions openwb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
20 changes: 0 additions & 20 deletions packages/helpermodules/data_migration/data_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
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

from control import data
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
Expand Down Expand Up @@ -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})