diff --git a/src/mainobject.cpp b/src/mainobject.cpp index ce227f4..04cf1f5 100644 --- a/src/mainobject.cpp +++ b/src/mainobject.cpp @@ -90,8 +90,6 @@ PrimaryMainObject::PrimaryMainObject(QIODevice* microDevice, const QString& sett connect(µ, &Microcontroller::gotSensorState, &globalSensors, &SensorStore::sensorGotState); connect(&mqttSensorSource, &MqttSensorSource::stateChanged, &globalSensors, &SensorStore::sensorGotState); - sunSensorSource.run(); - globalItems.registerItemSource(&fixedItems); globalItems.registerItemSource(tcpServer); globalItems.registerItemSource(webServer); @@ -102,6 +100,8 @@ PrimaryMainObject::PrimaryMainObject(QIODevice* microDevice, const QString& sett loadFromDisk(settingsPath); + sunSensorSource.run(); + QJsonObject mqttJson = settings["Mqtt"].toObject(); mqttClient->start(mqttJson); mqttSensorSource.start(mqttClient, mqttJson);