update man page

update package descriptions
change log output
This commit is contained in:
Simon Stürz 2015-12-04 19:22:32 +01:00 committed by Michael Zanetti
parent faed9f1f6d
commit 34a5596f3e
8 changed files with 107 additions and 70 deletions

11
data/logrotate/guhd Normal file
View File

@ -0,0 +1,11 @@
/var/log/guhd.log {
weekly
rotate 5
size 200M
compress
delaycompress
missingok
notifempty
create 644 root root
}

88
debian/control vendored
View File

@ -15,12 +15,12 @@ Architecture: any
Section: misc Section: misc
Depends: guh (= ${binary:Version}), Depends: guh (= ${binary:Version}),
guh-plugins (= ${binary:Version}), guh-plugins (= ${binary:Version}),
Description: Server for home automation systems - meta package Description: An open source IoT server - meta package
guh is an open source home automation server, which allows to control guh is an open source IoT (Internet of Things) server,
a lot of different devices from many different manufacturers. With the which allows to control a lot of different devices from many different
powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
This meta package installs the guh daemon and the main plugins. for your environment.
Package: guhd Package: guhd
Architecture: any Architecture: any
@ -28,27 +28,31 @@ Depends: libqt5network5,
libqt5gui5, libqt5gui5,
libqt5sql5, libqt5sql5,
libqt5xml5, libqt5xml5,
logrotate,
libguh1 (= ${binary:Version}), libguh1 (= ${binary:Version}),
${shlibs:Depends}, ${shlibs:Depends},
${misc:Depends} ${misc:Depends}
Recommends: Recommends:
libqt5websockets5 libqt5websockets5,
Description: Server daemon for home automation systems libqt5bluetooth5
guh is an open source home automation server, which allows to control Description: An open source IoT server - daemon
a lot of different devices from many different manufacturers. With the guh is an open source IoT (Internet of Things) server,
powerful rule engine you are able to connect any device available in which allows to control a lot of different devices from many different
the system and create individual scenes and behaviors for your home. manufacturers. With the powerful rule engine you are able to connect any
device available in the system and create individual scenes and behaviors
for your environment.
Package: guh-dbg Package: guh-dbg
Priority: extra Priority: extra
Architecture: any Architecture: any
Section: debug Section: debug
Depends: guh (= ${binary:Version}), ${misc:Depends} Depends: guh (= ${binary:Version}), ${misc:Depends}
Description: server for home automation systems - debug symbols Description: An open source IoT server - debug symbols
guh is an open source home automation server, which allows to control guh is an open source IoT (Internet of Things) server,
a lot of different devices from many different manufacturers. With the which allows to control a lot of different devices from many different
powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
for your environment.
Package: guh-doc Package: guh-doc
Section: doc Section: doc
@ -56,10 +60,10 @@ Architecture: all
Depends: ${misc:Depends} Depends: ${misc:Depends}
Recommends: guh (= ${binary:Version}) Recommends: guh (= ${binary:Version})
Description: Documentation for the guh package (on-site) - documentation Description: Documentation for the guh package (on-site) - documentation
guh is an open source home automation server, which allows to control guh is an open source home automation server, which allows to control
a lot of different devices from many different manufacturers. With the a lot of different devices from many different manufacturers. With the
powerful rule engine you are able to connect any device available in powerful rule engine you are able to connect any device available in
the system and create individual scenes and behaviors for your home. the system and create individual scenes and behaviors for your home.
Package: guh-tests Package: guh-tests
Architecture: any Architecture: any
@ -67,10 +71,11 @@ Depends: guh (= ${binary:Version}),
${shlibs:Depends}, ${shlibs:Depends},
${misc:Depends} ${misc:Depends}
Description: Tests for the guh package Description: Tests for the guh package
guh is an open source home automation server, which allows to control guh is an open source IoT (Internet of Things) server,
a lot of different devices from many different manufacturers. With the which allows to control a lot of different devices from many different
powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
for your environment.
Package: libguh1 Package: libguh1
Section: libs Section: libs
@ -78,11 +83,12 @@ Architecture: any
Depends: ${shlibs:Depends}, Depends: ${shlibs:Depends},
${misc:Depends}, ${misc:Depends},
libqt5bluetooth5 libqt5bluetooth5
Description: Server for home automation systems - core library Description: An open source IoT server - core library
guh is an open source home automation server, which allows to control guh is an open source IoT (Internet of Things) server,
a lot of different devices from many different manufacturers. With the which allows to control a lot of different devices from many different
powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
for your environment.
Package: libguh1-dev Package: libguh1-dev
Section: libdevel Section: libdevel
@ -91,11 +97,12 @@ Depends: libguh1 (= ${binary:Version}),
${shlibs:Depends}, ${shlibs:Depends},
${misc:Depends}, ${misc:Depends},
python python
Description: Server for home automation systems - development files Description: An open source IoT server - development files
guh is an open source home automation server, which allows to control guh is an open source IoT (Internet of Things) server,
a lot of different devices from many different manufacturers. With the which allows to control a lot of different devices from many different
powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
for your environment.
Package: guh-plugins Package: guh-plugins
Section: libs Section: libs
@ -104,8 +111,9 @@ Depends: libguh1 (= ${binary:Version}),
guhd (= ${binary:Version}), guhd (= ${binary:Version}),
${shlibs:Depends}, ${shlibs:Depends},
${misc:Depends} ${misc:Depends}
Description: Plugins for guh server home automation systems Description: Plugins for guh IoT server
guh is an open source home automation server, which allows to control guh is an open source IoT (Internet of Things) server,
a lot of different devices from many different manufacturers. With the which allows to control a lot of different devices from many different
powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
for your environment.

2
debian/copyright vendored
View File

@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Author: Michael Zanetti <michael_zanetti@gmx.net> Author: Michael Zanetti <michael_zanetti@gmx.net>
Simon Stürz <stuerz.simon@gmail.com> Simon Stürz <stuerz.simon@gmail.com>
Download: http://www.github.com/guh Download: http://www.github.com/guh/guh
License: GPL-2+ License: GPL-2+
On Debian systems, the complete text of the GNU General On Debian systems, the complete text of the GNU General

25
debian/guhd.1 vendored
View File

@ -1,16 +1,17 @@
.\" Manpage for guhd. .\" Manpage for guhd.
.\" Contact simon.stuerz@guh.guru to correct errors or typos. .\" Contact simon.stuerz@guh.guru to correct errors or typos.
.TH man 1 "August 2015" "1.2" "guhd man page" .TH man 1 "December 2015" "1.3" "guhd man page"
.SH NAME .SH NAME
guhd \- Server for home automation systems guhd \- An open source IoT (Internet of Things) server
.SH SYNOPSIS .SH SYNOPSIS
.B guhd .B guhd
[\fIOPTION\fR] [\fIOPTION\fR]
.SH DESCRIPTION .SH DESCRIPTION
guh (/[guːh]/) is an open source home automation server, which allows to guh (/[guːh]/) is an open source IoT (Internet of Things) server,
control a lot of different devices from many different manufacturers. which allows to control a lot of different devices from many different
With the powerful rule engine you are able to connect any device available in manufacturers. With the powerful rule engine you are able to connect any
the system and create individual scenes and behaviors for your home. device available in the system and create individual scenes and behaviors
for your environment.
.SH OPTIONS .SH OPTIONS
.TP .TP
\fB\-h\fR, \fB\-\-help\fR \fB\-h\fR, \fB\-\-help\fR
@ -29,7 +30,7 @@ categories will be printed unless they are explicitly muted with "NoWarnings".
.RS .RS
.TP .TP
\fBMain\ debug\ categories:\fR \fBMain\ debug\ categories:\fR
.IP \fIApplication\fR\ (default\ enabled) .IP \fIApplication\fR\ (default\ enabled)
Print the debug messages from the core application. Print the debug messages from the core application.
.IP \fIConnection\fR\ (default\ enabled) .IP \fIConnection\fR\ (default\ enabled)
Print the debug messages from the TCP connections in guh. Print the debug messages from the TCP connections in guh.
@ -37,11 +38,13 @@ Print the debug messages from the TCP connections in guh.
Print the debug messages from the device manager. Print the debug messages from the device manager.
.IP \fIHardware\fR\ (default\ disabled) .IP \fIHardware\fR\ (default\ disabled)
Print the debug messages from hardware resources in guh. Print the debug messages from hardware resources in guh.
.IP \fIJsonRpc\fR\ (default\ disabled) .IP \fIJsonRpc\fR\ (default\ enabled)
Print the debug messages from JSON-RPC API. Print the debug messages from JSON-RPC API.
.IP \fILogEngine\fR\ (default\ disabled) .IP \fILogEngine\fR\ (default\ disabled)
Print the debug messages from logging engine. Print the debug messages from logging engine.
.IP \fIRest\fR\ (default\ disbaled) .IP \fIOAuth2\fR\ (default\ disabled)
Print the debug messages of the OAuth2 resource.
.IP \fIRest\fR\ (default\ enabled)
Print the debug messages from REST API. Print the debug messages from REST API.
.IP \fIRuleEngine\fR\ (default\ enabled) .IP \fIRuleEngine\fR\ (default\ enabled)
Print the debug messages from the rule engine. Print the debug messages from the rule engine.
@ -66,8 +69,8 @@ $ guhd -n -d Hardware
.TP .TP
To start guhd in the foreground, disable debug messages from the DeviceManager To start guhd in the foreground, disable debug messages from the DeviceManager
and enable debug messages for JsonRpc and LogEngine: and enable debug messages for JsonRpc and LogEngine:
.IP .IP
$ guhd -n -d NoDeviceManager JsonRpc LogEngine $ guhd -n -d NoDeviceManager -d JsonRpc -d LogEngine
.SH FILES .SH FILES
.TP .TP
The settings of the guh server can be found in \fI/etc/guh/guhd.conf\fR The settings of the guh server can be found in \fI/etc/guh/guhd.conf\fR

1
debian/guhd.install vendored
View File

@ -1,3 +1,4 @@
usr/bin/guhd usr/bin/guhd
data/init/* /etc/init.d data/init/* /etc/init.d
data/config/guhd.conf /etc/guh/ data/config/guhd.conf /etc/guh/
data/logrotate/guhd /etc/logrotate.d/

View File

@ -161,7 +161,7 @@ QString GuhSettings::logPath()
if (organisationName == "guh-test") { if (organisationName == "guh-test") {
logPath = "/tmp/" + organisationName + "/guhd-test.sqlite"; logPath = "/tmp/" + organisationName + "/guhd-test.sqlite";
} else if (GuhSettings::isRoot()) { } else if (GuhSettings::isRoot()) {
logPath = "/var/log/guh/guhd.sqlite"; logPath = "/var/log/guhd.sqlite";
} else { } else {
logPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.sqlite"; logPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.sqlite";
} }
@ -178,7 +178,7 @@ QString GuhSettings::consoleLogPath()
if (organisationName == "guh-test") { if (organisationName == "guh-test") {
consoleLogPath = "/tmp/" + organisationName + "/guhd-test.logs"; consoleLogPath = "/tmp/" + organisationName + "/guhd-test.logs";
} else if (GuhSettings::isRoot()) { } else if (GuhSettings::isRoot()) {
consoleLogPath = "/var/log/guh/guhd.log"; consoleLogPath = "/var/log/guhd.log";
} else { } else {
consoleLogPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.log"; consoleLogPath = QDir::homePath() + "/.config/" + organisationName + "/guhd.log";
} }

View File

@ -557,8 +557,6 @@ RuleEngine *GuhCore::ruleEngine() const
GuhCore::GuhCore(QObject *parent) : GuhCore::GuhCore(QObject *parent) :
QObject(parent) QObject(parent)
{ {
qCDebug(dcApplication) << "guh version:" << GUH_VERSION_STRING << "starting up.";
m_logger = new LogEngine(this); m_logger = new LogEngine(this);
qCDebug(dcApplication) << "Creating Device Manager"; qCDebug(dcApplication) << "Creating Device Manager";
@ -568,6 +566,7 @@ GuhCore::GuhCore(QObject *parent) :
m_ruleEngine = new RuleEngine(this); m_ruleEngine = new RuleEngine(this);
qCDebug(dcApplication) << "Creating Server Manager";
m_serverManager = new ServerManager(this); m_serverManager = new ServerManager(this);
connect(m_deviceManager, &DeviceManager::eventTriggered, this, &GuhCore::gotEvent); connect(m_deviceManager, &DeviceManager::eventTriggered, this, &GuhCore::gotEvent);

View File

@ -107,8 +107,8 @@ int main(int argc, char *argv[])
s_loggingFilters.insert("LogEngine", false); s_loggingFilters.insert("LogEngine", false);
s_loggingFilters.insert("TcpServer", false); s_loggingFilters.insert("TcpServer", false);
s_loggingFilters.insert("WebServer", true); s_loggingFilters.insert("WebServer", true);
s_loggingFilters.insert("WebSocketServer", false); s_loggingFilters.insert("WebSocketServer", true);
s_loggingFilters.insert("JsonRpc", false); s_loggingFilters.insert("JsonRpc", true);
s_loggingFilters.insert("Rest", true); s_loggingFilters.insert("Rest", true);
s_loggingFilters.insert("OAuth2", false); s_loggingFilters.insert("OAuth2", false);
@ -120,8 +120,11 @@ int main(int argc, char *argv[])
QCommandLineParser parser; QCommandLineParser parser;
parser.addHelpOption(); parser.addHelpOption();
parser.addVersionOption(); parser.addVersionOption();
QString applicationDescription = QString("\nguh ( /[guːh]/ ) is an open source home automation server, which allows to\n" QString applicationDescription = QString("\nguh ( /[guːh]/ ) is an open source IoT (Internet of Things) server, \n"
"control a lot of different devices from many different manufacturers.\n\n" "which allows to control a lot of different devices from many different. \n"
"manufacturers. With the powerful rule engine you are able to connect any \n"
"device available in the system and create individual scenes and behaviors \n"
"for your environment.\n\n"
"guhd %1 (C) 2014-2015 guh\n" "guhd %1 (C) 2014-2015 guh\n"
"Released under the GNU GENERAL PUBLIC LICENSE Version 2.\n\n" "Released under the GNU GENERAL PUBLIC LICENSE Version 2.\n\n"
"API version: %2\n").arg(GUH_VERSION_STRING).arg(JSON_PROTOCOL_VERSION); "API version: %2\n").arg(GUH_VERSION_STRING).arg(JSON_PROTOCOL_VERSION);
@ -147,7 +150,9 @@ int main(int argc, char *argv[])
debugDescription += "\n- " + filterName + " (" + (s_loggingFilters.value(filterName) ? "yes" : "no") + ")"; debugDescription += "\n- " + filterName + " (" + (s_loggingFilters.value(filterName) ? "yes" : "no") + ")";
} }
QCommandLineOption debugOption(QStringList() << "d" << "debug", debugDescription, "[No]DebugCategory"); QCommandLineOption allOption(QStringList() << "p" << "print-all", "Enables all debug categories. This parameter overrides all debug category parameters.");
parser.addOption(allOption);
QCommandLineOption debugOption(QStringList() << "d" << "debug-category", debugDescription, "[No]DebugCategory");
parser.addOption(debugOption); parser.addOption(debugOption);
parser.process(application); parser.process(application);
@ -158,14 +163,20 @@ int main(int argc, char *argv[])
} }
// check debug area // check debug area
foreach (QString debugArea, parser.values(debugOption)) { if (!parser.isSet(allOption)) {
bool enable = !debugArea.startsWith("No"); foreach (QString debugArea, parser.values(debugOption)) {
debugArea.remove(QRegExp("^No")); bool enable = !debugArea.startsWith("No");
if (s_loggingFilters.contains(debugArea)) { debugArea.remove(QRegExp("^No"));
s_loggingFilters[debugArea] = enable; if (s_loggingFilters.contains(debugArea)) {
} else { s_loggingFilters[debugArea] = enable;
qCWarning(dcApplication) << "No such debug category:" << debugArea; } else {
qCWarning(dcApplication) << "No such debug category:" << debugArea;
}
} }
} else {
foreach (const QString &debugArea, s_loggingFilters.keys())
s_loggingFilters[debugArea] = true;
} }
QLoggingCategory::installFilter(loggingCategoryFilter); QLoggingCategory::installFilter(loggingCategoryFilter);
@ -174,9 +185,13 @@ int main(int argc, char *argv[])
// inform about userid // inform about userid
int userId = getuid(); int userId = getuid();
if (userId != 0) { if (userId != 0) {
qCDebug(dcApplication) << "guhd started with user ID" << userId; qCDebug(dcApplication) << "=====================================";
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started with user ID" << userId;
qCDebug(dcApplication) << "=====================================";
} else { } else {
qCDebug(dcApplication) << "guhd started as root."; qCDebug(dcApplication) << "=====================================";
qCDebug(dcApplication) << "guhd" << GUH_VERSION_STRING << "started as root.";
qCDebug(dcApplication) << "=====================================";
} }
// create core instance // create core instance