hast du es mit make install installiert und gebootet, ansonsten den syslog Dienst neu starten solle auch genügen
Problem mit p4d: Läuft nicht auf PC mit Ubuntu
Es gibt 23 Antworten in diesem Thema, welches 5.145 mal aufgerufen wurde. Der letzte Beitrag () ist von Godot_x.
-
-
komischerweise finde ich keine logdatei vom p4d (/var/log/p4d existiert nicht)
/var/log/p4d.log
-
Da ich jetzt über das Web-Interface Zugriff habe und wohl auch Werte ausgelesen werden (Status Brauchwasser wird, z.B. angezeigt, ebenso wie die Fehlermeldungs-Liste) und nach einem Reboot auch die log-Datei da ist, gehe ich davon aus, dass nun die Installation ansich soweit passt...
Erst mal vielen Dank an alle Helfer!
Falls es jemandem hilft, hier meine Befehle der Installation unter Ubuntu 18.04:
Code
Alles anzeigen# Quelle: https://github.com/horchi/linux-p4d # Systemupdate apt -y update apt -y upgrade apt-get -y install build-essential pkg-config libssl-dev libjansson-dev libcurl4-openssl-dev libmariadb-dev uuid-dev libcap-dev libssl-dev libwebsockets-dev cmake mariadb-server mosquitto mosquitto-clients # Install libwebsockets cd /usr/src git clone https://github.com/warmcat/libwebsockets.git cd libwebsockets mkdir build cd build cmake .. make sudo make install ldconfig pkg-config --modversion libwebsockets # Install MariaDB sudo systemctl status mysql mysql -u root -Dmysql -p CREATE DATABASE p4 charset utf8; CREATE USER 'p4'@'localhost' IDENTIFIED BY 'p4'; GRANT ALL PRIVILEGES ON p4.* TO 'p4'@'localhost' IDENTIFIED BY 'p4'; flush privileges; quit; # Install Mosquitto systemctl start mosquitto systemctl enable mosquitto #Install p4d Dämon cd /usr/src/ git clone https://github.com/horchi/linux-p4d/ cd linux-p4d make clean all make install systemctl start p4d systemctl status p4d nano /etc/p4d/daemon.conf -> DbHost =localhost ändern in DbHost = 127.0.0.1 systemctl restart p4d System rebooten
-
Und der vollständigkeit halber hier noch das p4d.log:
Code
Alles anzeigenroot@Server-46-53:/var/log# cat /var/log/p4d.log Jul 4 16:31:53 Server-46-53 p4d: Read 5 option from /etc/p4d/daemon.conf Jul 4 16:31:53 Server-46-53 p4d: Dictionary '/etc/p4d/database.dat' loaded Jul 4 16:31:53 Server-46-53 p4d: Try conneting to database Jul 4 16:31:53 Server-46-53 p4d: SQL-Error in 'connecting to database' - Can't connect to MySQL server on '127.0.0.1' (115) (2002) Jul 4 16:31:53 Server-46-53 p4d: Fatal, lost connection to mysql server, aborting pending actions Jul 4 16:31:53 Server-46-53 p4d: Error, connecting to database at '127.0.0.1' on port (3306) failed Jul 4 16:31:53 Server-46-53 p4d: Error: Initial database connect failed Jul 4 16:31:53 Server-46-53 p4d: SQL-Error in 'connecting to database' - Can't connect to MySQL server on '127.0.0.1' (115) (2002) Jul 4 16:31:53 Server-46-53 p4d: Fatal, lost connection to mysql server, aborting pending actions Jul 4 16:31:53 Server-46-53 p4d: Error, connecting to database at '127.0.0.1' on port (3306) failed Jul 4 16:31:53 Server-46-53 p4d: Could not access database '127.0.0.1:3306' Jul 4 16:31:53 Server-46-53 p4d: Could not access database '127.0.0.1:3306' (tried to open errors) Jul 4 16:31:53 Server-46-53 p4d: Retrying in 10 seconds Jul 4 16:32:03 Server-46-53 p4d: Try conneting to database Jul 4 16:32:03 Server-46-53 p4d: SQL client character now 'utf8' Jul 4 16:32:03 Server-46-53 p4d: Skipping check of table 'information_schema.TABLES' Jul 4 16:32:03 Server-46-53 p4d: Info: Eloquence set to 0x0000 Jul 4 16:32:03 Server-46-53 p4d: Config of MQTT url changed from '' to 'tcp://localhost:1883', disconnecting Jul 4 16:32:03 Server-46-53 p4d: WebSocket Listener at port (1111) established Jul 4 16:32:03 Server-46-53 p4d: Init script value of 'SC:1' to 77,40 Jul 4 16:32:03 Server-46-53 p4d: Found script '/etc/p4d/scripts.d/example_sensor.sh' addr (1), unit '°C'; result was [{ "kind" : "value", "unit" : "°C", "value" : 77.4 }] Jul 4 16:32:03 Server-46-53 p4d: Init script value of 'SC:2' to 0,00 Jul 4 16:32:03 Server-46-53 p4d: Found script '/etc/p4d/scripts.d/example_switch.sh' addr (2), unit 'zst'; result was [{ "kind":"status","value":0 }] Jul 4 16:32:03 Server-46-53 p4d: p4d started Jul 4 16:32:03 Server-46-53 p4d: Scheduled aggregation for '05.07.2022 01:00:00' with interval of 15 minutes Jul 4 16:32:03 Server-46-53 p4d: State changed to 'Betriebsbereit' Jul 4 16:33:33 Server-46-53 p4d: Calculating consumption sice tankering by 4,00 kg / stoker hour Jul 4 16:33:44 Server-46-53 p4d: HTTP: Requested url (22) '/img/type/heating-.png' root@Server-46-53:/var/log#
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!