Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SHserver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Altenbernd
SHserver
Commits
22d02b9e
You need to sign in or sign up before continuing.
Commit
22d02b9e
authored
Apr 11, 2024
by
Peter Altenbernd
Browse files
Options
Downloads
Patches
Plain Diff
Serielle Schnittstelle raus. Buxfix Name Stromzähler. Reale Demands.
parent
5ec67300
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
server.cpp
+12
-10
12 additions, 10 deletions
server.cpp
server.h
+3
-3
3 additions, 3 deletions
server.h
shsensor.cpp
+20
-19
20 additions, 19 deletions
shsensor.cpp
with
35 additions
and
32 deletions
server.cpp
+
12
−
10
View file @
22d02b9e
...
...
@@ -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
,
3
0
0
,
SHactuator
::
SensorType
::
Switch
,
"http://192.168.178.93"
);
SHactuator
*
sBath300
=
new
SHactuator
(
NodeIDBadUnten
,
3
2
0
,
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
,
75
0
,
SHactuator
::
SensorType
::
Switch
,
"http://192.168.178.24"
);
SHactuator
*
sWrom750
=
new
SHactuator
(
NodeIdSolarheatWR
,
7
4
5
,
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
,
1
000
,
SHactuator
::
SensorType
::
Switch
,
"http://192.168.178.68"
);
SHactuator
*
sLRom1000
=
new
SHactuator
(
NodeIdSolarheat
,
1
115
,
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
,
9
0
0
,
SHactuator
::
SensorType
::
Switch
,
"http://192.168.178.30"
);
SHactuator
*
sWall900
=
new
SHactuator
(
NodeIDWallLR
,
9
1
0
,
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
,
45
0
,
SHactuator
::
SensorType
::
Switch
,
"http://192.168.178.96"
);
SHactuator
*
sWall450
=
new
SHactuator
(
NodeIDWallM
,
45
5
,
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
,
15
0
,
SHactuator
::
SensorType
::
Switch
,
"http://192.168.178.63"
);
SHactuator
*
sFlor150
=
new
SHactuator
(
NodeIdSolarheatFloor
,
15
5
,
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
/*
...
...
This diff is collapsed.
Click to expand it.
server.h
+
3
−
3
View file @
22d02b9e
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
shsensor.cpp
+
20
−
19
View file @
22d02b9e
...
...
@@ -692,6 +692,7 @@ QString SHsensor::name(int nid)
"WandLR"
,
// Wohnzimmer-Wand links+rechts
"WandM"
,
// Wohnzimmer-Wand mitte
"Bad"
,
// Heizung Bad unten
"Strom"
,
// Zentraler Strommesser
"Dummy"
// zum Testen neuer Knoten -- immer ganz hinten
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment