Skip to content
Snippets Groups Projects
Commit 22d02b9e authored by Peter Altenbernd's avatar Peter Altenbernd
Browse files

Serielle Schnittstelle raus. Buxfix Name Stromzähler. Reale Demands.

parent 5ec67300
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ Server::Server(QString TCPhostName, QObject *parent) : ...@@ -37,7 +37,7 @@ Server::Server(QString TCPhostName, QObject *parent) :
// serielle Schnittstelle ansehen und starten: // serielle Schnittstelle ansehen und starten:
startSerial(); // startSerial();
// Sensoren: // Sensoren:
// temparature // temparature
...@@ -69,21 +69,21 @@ Server::Server(QString TCPhostName, QObject *parent) : ...@@ -69,21 +69,21 @@ Server::Server(QString TCPhostName, QObject *parent) :
// Kamin;2;1; Off;22.5;18.5;07:15;23:00 // Kamin;2;1; Off;22.5;18.5;07:15;23:00
// Bad unten: // Bad unten:
SHactuator *sBath300 = new SHactuator(NodeIDBadUnten, 300, SHactuator::SensorType::Switch, "http://192.168.178.93"); SHactuator *sBath300 = new SHactuator(NodeIDBadUnten, 320, SHactuator::SensorType::Switch, "http://192.168.178.93");
HeatControl *controlBath300 = new HeatControl(t_bath, sBath300, 22.5, 18.5, QTime(7,10), QTime(21,0)); HeatControl *controlBath300 = new HeatControl(t_bath, sBath300, 22.5, 18.5, QTime(7,10), QTime(21,0));
// Arbeitszimmer // Arbeitszimmer
SHactuator *sWrom750 = new SHactuator(NodeIdSolarheatWR, 750, SHactuator::SensorType::Switch, "http://192.168.178.24"); SHactuator *sWrom750 = new SHactuator(NodeIdSolarheatWR, 745, SHactuator::SensorType::Switch, "http://192.168.178.24");
HeatControl * controlWRom750 = new HeatControl(t_wrom, sWrom750, 22.5, 18.5, QTime(7,10), QTime(21,0)); HeatControl * controlWRom750 = new HeatControl(t_wrom, sWrom750, 22.5, 18.5, QTime(7,10), QTime(21,0));
// Wohn- und Esszimmer // Wohn- und Esszimmer
SHactuator *sLRom1000 = new SHactuator(NodeIdSolarheat, 1000, SHactuator::SensorType::Switch, "http://192.168.178.68"); SHactuator *sLRom1000 = new SHactuator(NodeIdSolarheat, 1115, SHactuator::SensorType::Switch, "http://192.168.178.68");
HeatControl *controlKamn1000 = new HeatControl(t_lrom, sLRom1000, 22.5, 18.5, QTime(7,12), QTime(23,0)); HeatControl *controlKamn1000 = new HeatControl(t_lrom, sLRom1000, 22.5, 18.5, QTime(7,12), QTime(23,0));
SHactuator *sWall900 = new SHactuator(NodeIDWallLR, 900, SHactuator::SensorType::Switch, "http://192.168.178.30"); SHactuator *sWall900 = new SHactuator(NodeIDWallLR, 910, SHactuator::SensorType::Switch, "http://192.168.178.30");
HeatControl *controlWall900 = new HeatControl(t_lrom, sWall900, 22.5, 18.5, QTime(7,14), QTime(23,0)); HeatControl *controlWall900 = new HeatControl(t_lrom, sWall900, 22.5, 18.5, QTime(7,14), QTime(23,0));
SHactuator *sWall450 = new SHactuator(NodeIDWallM, 450, SHactuator::SensorType::Switch, "http://192.168.178.96"); SHactuator *sWall450 = new SHactuator(NodeIDWallM, 455, SHactuator::SensorType::Switch, "http://192.168.178.96");
HeatControl *controlWall450 = new HeatControl(t_lrom, sWall450, 22.5, 18.5, QTime(7,16), QTime(23,0)); HeatControl *controlWall450 = new HeatControl(t_lrom, sWall450, 22.5, 18.5, QTime(7,16), QTime(23,0));
SHactuator *sFlor150 = new SHactuator(NodeIdSolarheatFloor, 150, SHactuator::SensorType::Switch, "http://192.168.178.63"); SHactuator *sFlor150 = new SHactuator(NodeIdSolarheatFloor, 155, SHactuator::SensorType::Switch, "http://192.168.178.63");
HeatControl *controlFlor150 = new HeatControl(t_lrom, sFlor150, 22.5, 18.5, QTime(7,16), QTime(23,0)); HeatControl *controlFlor150 = new HeatControl(t_lrom, sFlor150, 22.5, 18.5, QTime(7,16), QTime(23,0));
// Heißwasser: // Heißwasser:
...@@ -232,7 +232,7 @@ void Server::sendToClient(const QJsonObject & jsonObj) ...@@ -232,7 +232,7 @@ void Server::sendToClient(const QJsonObject & jsonObj)
#ifdef OLD
/* /*
* *
*/ */
...@@ -295,7 +295,7 @@ void Server::startSerial() { ...@@ -295,7 +295,7 @@ void Server::startSerial() {
// SHsensor::displayMem("Server::startSerial ENDE"); // SHsensor::displayMem("Server::startSerial ENDE");
} }
#endif // OLD
...@@ -481,7 +481,7 @@ void Server::onReadyReadSensorValueTCP() ...@@ -481,7 +481,7 @@ void Server::onReadyReadSensorValueTCP()
#ifdef OLD
/* /*
* *
*/ */
...@@ -520,6 +520,8 @@ void Server::onReadyReadSensorValueSerial() ...@@ -520,6 +520,8 @@ void Server::onReadyReadSensorValueSerial()
// SHsensor::displayMem("Server::onReadyReadSensorValueSerial ENDE"); // SHsensor::displayMem("Server::onReadyReadSensorValueSerial ENDE");
} }
#endif // OLD
/* /*
......
...@@ -28,7 +28,7 @@ private: ...@@ -28,7 +28,7 @@ private:
QTcpSocket m_gatewayTCPsocket; QTcpSocket m_gatewayTCPsocket;
// Serielle Schnittstelle zu angeschlossenem Gateway (USB) // Serielle Schnittstelle zu angeschlossenem Gateway (USB)
QSerialPort *m_serial = nullptr; // QSerialPort *m_serial = nullptr;
// HTTP Requests für Tasmota // HTTP Requests für Tasmota
QNetworkAccessManager * m_tasmota; // -> To send us a request. QNetworkAccessManager * m_tasmota; // -> To send us a request.
...@@ -42,7 +42,7 @@ private: ...@@ -42,7 +42,7 @@ private:
void startWebSocketServer(); void startWebSocketServer();
void sendToClient(const QJsonObject &jsonObj); void sendToClient(const QJsonObject &jsonObj);
void startSerial(); // void startSerial();
// Peters Zauber-Steuerung // Peters Zauber-Steuerung
...@@ -55,7 +55,7 @@ private: ...@@ -55,7 +55,7 @@ private:
private slots: private slots:
void onReadyReadSensorValueTCP(); // TCP Socket interface to Smart Home Gateway void onReadyReadSensorValueTCP(); // TCP Socket interface to Smart Home Gateway
void onReadyReadSensorValueSerial(); // Serial interface to Smart Home Gateway // void onReadyReadSensorValueSerial(); // Serial interface to Smart Home Gateway
void showSensorValues(); void showSensorValues();
void tasmotaReply(QNetworkReply *reply); // HTTP Requests für Tasmota void tasmotaReply(QNetworkReply *reply); // HTTP Requests für Tasmota
......
...@@ -675,25 +675,26 @@ QString SHsensor::getValue(int nid, int sid) ...@@ -675,25 +675,26 @@ QString SHsensor::getValue(int nid, int sid)
QString SHsensor::name(int nid) QString SHsensor::name(int nid)
{ {
static QString N[SHNodeIdSize] = { static QString N[SHNodeIdSize] = {
"Gateway", "Gateway",
"HW_40", // Heißwasser Stufe 1 "HW_40", // Heißwasser Stufe 1
"Kamin", // große Heizung im Wohnzimmer, Stufe 2 gibt es nicht mehr "Kamin", // große Heizung im Wohnzimmer, Stufe 2 gibt es nicht mehr
"Sonne", // Lichtsensor "Sonne", // Lichtsensor
"HW_60", // Heißwasser Stufe 2 "HW_60", // Heißwasser Stufe 2
"Tür", // Fußboden-Heizung im Wohnzimmer "Tür", // Fußboden-Heizung im Wohnzimmer
"Klima", // Klimaanlage "Klima", // Klimaanlage
"Arbeit", // Heizung im Arbeitszimmer "Arbeit", // Heizung im Arbeitszimmer
"Wasch", // Waschmaschine "Wasch", // Waschmaschine
"Wohn", // Thermometer im Wohnzimmer "Wohn", // Thermometer im Wohnzimmer
"Repeater2", // Repeater "Repeater2", // Repeater
"eCar", // E-Auto "eCar", // E-Auto
"T-Bad", // Thermometer Bad "T-Bad", // Thermometer Bad
"Büro", // Thermometer im Arbeitszimmer "Büro", // Thermometer im Arbeitszimmer
"WandLR", // Wohnzimmer-Wand links+rechts "WandLR", // Wohnzimmer-Wand links+rechts
"WandM", // Wohnzimmer-Wand mitte "WandM", // Wohnzimmer-Wand mitte
"Bad", // Heizung Bad unten "Bad", // Heizung Bad unten
"Dummy" // zum Testen neuer Knoten -- immer ganz hinten "Strom", // Zentraler Strommesser
}; "Dummy" // zum Testen neuer Knoten -- immer ganz hinten
};
if (nid < 0 or nid >= SHNodeIdSize) if (nid < 0 or nid >= SHNodeIdSize)
return "#ERR-NAME#"; return "#ERR-NAME#";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment