diff --git a/server.cpp b/server.cpp index 85f5b9d4d886cad92f21e602086c4583e510ffc3..73b42d8aa9dddcc4f3cb7a6840b34e343cea73c0 100644 --- a/server.cpp +++ b/server.cpp @@ -37,7 +37,7 @@ Server::Server(QString TCPhostName, QObject *parent) : // serielle Schnittstelle ansehen und starten: - startSerial(); + // startSerial(); // Sensoren: // temparature @@ -69,21 +69,21 @@ Server::Server(QString TCPhostName, QObject *parent) : // Kamin;2;1; Off;22.5;18.5;07:15;23:00 // 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)); // 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)); // 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)); - 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)); - 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)); - 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)); // Heißwasser: @@ -232,7 +232,7 @@ void Server::sendToClient(const QJsonObject & jsonObj) - +#ifdef OLD /* * */ @@ -295,7 +295,7 @@ void Server::startSerial() { // SHsensor::displayMem("Server::startSerial ENDE"); } - +#endif // OLD @@ -481,7 +481,7 @@ void Server::onReadyReadSensorValueTCP() - +#ifdef OLD /* * */ @@ -520,6 +520,8 @@ void Server::onReadyReadSensorValueSerial() // SHsensor::displayMem("Server::onReadyReadSensorValueSerial ENDE"); } +#endif // OLD + /* diff --git a/server.h b/server.h index bbefe841fe3f131103d77c6ad8df9b03a6a2e873..24abb6d7d99dcdc7218b5913bfe760e5ed11869a 100644 --- a/server.h +++ b/server.h @@ -28,7 +28,7 @@ private: QTcpSocket m_gatewayTCPsocket; // Serielle Schnittstelle zu angeschlossenem Gateway (USB) - QSerialPort *m_serial = nullptr; + // QSerialPort *m_serial = nullptr; // HTTP Requests für Tasmota QNetworkAccessManager * m_tasmota; // -> To send us a request. @@ -42,7 +42,7 @@ private: void startWebSocketServer(); void sendToClient(const QJsonObject &jsonObj); - void startSerial(); + // void startSerial(); // Peters Zauber-Steuerung @@ -55,7 +55,7 @@ private: private slots: 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 tasmotaReply(QNetworkReply *reply); // HTTP Requests für Tasmota diff --git a/shsensor.cpp b/shsensor.cpp index f6c037b7e5995cc2fc1cfbf21f14da1ea7e8e29a..d3fa5993dc09126b9f99a09a48c280a2091eea21 100644 --- a/shsensor.cpp +++ b/shsensor.cpp @@ -675,25 +675,26 @@ QString SHsensor::getValue(int nid, int sid) QString SHsensor::name(int nid) { static QString N[SHNodeIdSize] = { - "Gateway", - "HW_40", // Heißwasser Stufe 1 - "Kamin", // große Heizung im Wohnzimmer, Stufe 2 gibt es nicht mehr - "Sonne", // Lichtsensor - "HW_60", // Heißwasser Stufe 2 - "Tür", // Fußboden-Heizung im Wohnzimmer - "Klima", // Klimaanlage - "Arbeit", // Heizung im Arbeitszimmer - "Wasch", // Waschmaschine - "Wohn", // Thermometer im Wohnzimmer - "Repeater2", // Repeater - "eCar", // E-Auto - "T-Bad", // Thermometer Bad - "Büro", // Thermometer im Arbeitszimmer - "WandLR", // Wohnzimmer-Wand links+rechts - "WandM", // Wohnzimmer-Wand mitte - "Bad", // Heizung Bad unten - "Dummy" // zum Testen neuer Knoten -- immer ganz hinten - }; + "Gateway", + "HW_40", // Heißwasser Stufe 1 + "Kamin", // große Heizung im Wohnzimmer, Stufe 2 gibt es nicht mehr + "Sonne", // Lichtsensor + "HW_60", // Heißwasser Stufe 2 + "Tür", // Fußboden-Heizung im Wohnzimmer + "Klima", // Klimaanlage + "Arbeit", // Heizung im Arbeitszimmer + "Wasch", // Waschmaschine + "Wohn", // Thermometer im Wohnzimmer + "Repeater2", // Repeater + "eCar", // E-Auto + "T-Bad", // Thermometer Bad + "Büro", // Thermometer im Arbeitszimmer + "WandLR", // Wohnzimmer-Wand links+rechts + "WandM", // Wohnzimmer-Wand mitte + "Bad", // Heizung Bad unten + "Strom", // Zentraler Strommesser + "Dummy" // zum Testen neuer Knoten -- immer ganz hinten + }; if (nid < 0 or nid >= SHNodeIdSize) return "#ERR-NAME#";