[vz-users] vzlogger sendet nach einem Stromausfall keine Daten mehr an die Middleware
Thomas Höpfner
thomas at thhoe.de
Mi Okt 28 08:01:30 CET 2020
Hallo,
hast du schon ein reboot gemacht?
Nach den Absturz könnte beim Neustart ein Dienst etwas zu späht gestardet sein.
Mit freundlichen Grüßen,
Thomas
-----Ursprüngliche Nachricht-----
Von: vor dem Esche <vordemesche at t-online.de>
Gesendet: Dienstag 27 Oktober 2020 20:25
An: volkszaehler-users at lists.volkszaehler.org
Betreff: Re: [vz-users] vzlogger sendet nach einem Stromausfall keine Daten mehr an die Middleware
Aufgrund einer gefallenen Sicherung hatte der Raspberry keinen Strom mehr. Nach dem erneuten Booten funktioniert die Kommunikation zwischen vzlogger und der Datenbank nicht mehr.
Ich verwende optische Sensoren, die das blinken der LED am Zähler auswerten, 1Puls = 1 Wh
Bisher war meine Fehlersuche erfolglos:
* Das Frontend funktioniert. Ich kann die alten Daten sehen und auch manuell Daten in die Datenbank schreiben.
* Eine Überpüfung der Datenbank mit mysqlcheck zeigte keine Fehler, siehe ende der e-mail
* Die Sensoren arbeiten. Wenn ich die GPIO’s abfrage bekommen ich Nullen und Einsen zurück
* Das Logfile unten sagt auch das die Sensoren Signale liefern
* Die UUID’s sind nicht verändert zu vorher und funktionieren bei händischen Eintragen.
Bei der Installation handelte es sich um das Image 2019-07-07-volkszaehler_raspian_buster.img. Allerdings habe ich danach diverse Updates gemacht, unter anderem auch um direkt vom USB-Stick zu booten und um verschiedene Python Pakrte zu installieren.
Ich wäre für Hilfe sehr dankbar, da ich keinen Rat mehr habe und im Netz auch nicht passendes gefunden habe.
Mit besten Grüßen
Rainer vor dem Esche
Hier die vzlogger Version:
vzlogger -V
0.7.0
based on git version: heads/master-0-g12e74ddd43
last commit date: Sun, 2 Jun 2019 20:48:14 +0200
Hier die Statusmeldung vom vzlogger:
sudo systemctl status vzlogger
● vzlogger.service - vzlogger
Loaded: loaded (/etc/systemd/system/vzlogger.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-10-25 18:26:26 CET; 43min ago
Main PID: 6615 (vzlogger)
Tasks: 13 (limit: 2065)
CGroup: /system.slice/vzlogger.service
└─6615 /usr/local/bin/vzlogger -c /etc/vzlogger.conf
Oct 25 18:26:26 raspberrypi systemd[1]: Started vzlogger.
Hier die /etc/vzlogger.conf, die vor dem Stromausfall eiwandfrei funktionierte.
"retry": 1 , // http retry delay in seconds
"daemon": true,
"verbosity": 5, // log verbosity (0=log_alert, 1=log_error, 3=log_warning, 5=log_info, 10=log_debug, 15=log_finest
"log": "/home/pi/vzlogger.log",
"local": {
"enabled": false, // false, enable local HTTPd for serving live readings
"port": 8080,
"index": false,
"timeout": 0,
"buffer": 0
},
"meters": [
{
"enabled": true,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
{ "uuid": "145e1a60-116a-11eb-a84b-27d4c1a16326", //Haushaltszaehler Wirkleitung
"identifier": "Impulse",
"api": "volkszaehler",
"middleware": "http://127.0.0.1:8080", // " http://localhost/middleware.php"
"aggmode": "none",
"duplicates": 0
} ],
"protocol": "s0",
"gpio": 17,
"gpio_dir": -1,
"configureGPIO": true,
"resolution": 1000,
"send_zero": false,
"debounce_delay": 80 // max zeit ist 90ms <3,6E9/(400V+32A+3Phase+1000Pulse) gemessene Zeit 50ms
},
{
"enabled": true,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
{ "uuid": "609b5550-116a-11eb-a593-a17d56fbfa4f", //Blindleistung Haushaltszaeher
"identifier": "Impulse",
"api": "volkszaehler",
"middleware": "http://127.0.0.1:8080", // "http://127.0.0.1/middleware.php"
"aggmode": "none",
"duplicates": 0
} ],
"protocol": "s0",
"gpio": 18,
"gpio_dir": -1,
"configureGPIO": true,
"resolution": 1000,
"send_zero": false,
"debounce_delay": 80
},
{
"enabled": true,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
{ "uuid": "8265ea00-116a-11eb-9df8-31d16fb93dc3", //Wirkleistung Waermepumpe
"identifier": "Impulse",
"api": "volkszaehler",
"middleware": "http://127.0.0.1:8080", // "http://127.0.0.1/middleware.php"
"aggmode": "none",
"duplicates": 0
} ],
"protocol": "s0",
"gpio": 22,
"gpio_dir": -1,
"configureGPIO": true,
"resolution": 1000,
"send_zero": false,
"debounce_delay": 80
},
"enabled": true,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
{ "uuid": "9a230b40-116a-11eb-a992-eb29d65c376b", //Blindleistung Waermepumpe
"identifier": "Impulse",
"api": "volkszaehler",
"middleware": "http://127.0.0.1:8080", // "http://127.0.0.1/middleware.php"
"aggmode": "none",
"duplicates": 0
} ],
"protocol": "s0",
"gpio": 23,
"gpio_dir": -1,
"configureGPIO": true,
"resolution": 1000,
"send_zero": false,
"debounce_delay": 80
}
]
}
Anbei das Logfile:
[Oct 25 19:14:15][main] vzlogger v0.7.0 based on heads/master-0-g12e74ddd43 from Sun, 2 Jun 2019 20:48:14 +0200 started.
[Oct 25 19:14:15][mtr0] Creating new meter with protocol s0.
[Oct 25 19:14:15][mtr0] Meter configured, enabled.
[Oct 25 19:14:15] New meter initialized (protocol=s0)
[Oct 25 19:14:15] Configure channel.
[Oct 25 19:14:15][chn0] New channel initialized (uuid=...a16326 api=volkszaehler id=Impulse)
[Oct 25 19:14:15][mtr1] Creating new meter with protocol s0.
[Oct 25 19:14:15][mtr1] Meter configured, enabled.
[Oct 25 19:14:15] New meter initialized (protocol=s0)
[Oct 25 19:14:15] Configure channel.
[Oct 25 19:14:15][chn1] New channel initialized (uuid=...fbfa4f api=volkszaehler id=Impulse)
[Oct 25 19:14:15][mtr2] Creating new meter with protocol s0.
[Oct 25 19:14:15][mtr2] Meter configured, enabled.
[Oct 25 19:14:15] New meter initialized (protocol=s0)
[Oct 25 19:14:15] Configure channel.
[Oct 25 19:14:15][chn2] New channel initialized (uuid=...b93dc3 api=volkszaehler id=Impulse)
[Oct 25 19:14:15][mtr3] Creating new meter with protocol s0.
[Oct 25 19:14:15][mtr3] Meter configured, enabled.
[Oct 25 19:14:15] New meter initialized (protocol=s0)
[Oct 25 19:14:15] Configure channel.
[Oct 25 19:14:15][chn3] New channel initialized (uuid=...5c376b api=volkszaehler id=Impulse)
[Oct 25 19:14:15] Have 4 meters.
[Oct 25 19:14:15][main] log level is 15
[Oct 25 19:14:15][main] daemon=1, local=0
[Oct 25 19:14:15] Daemonize process...
[Oct 25 19:14:15] Opened logfile /home/pi/vzlogger.log
[Oct 25 19:14:15][push] No pushDataServer defined.
[Oct 25 19:14:15][] ===> Start meters
[Oct 25 19:14:15][s0] counter_thread created
[Oct 25 19:14:15][s0] Counter thread started with blocking hwif
[Oct 25 19:14:15][mtr0] Meter connection established
[Oct 25 19:14:15][mtr0] Meter thread started
[Oct 25 19:14:15][mtr0] Meter is opened. Starting channels.
[Oct 25 19:14:15][chn0] Logging thread started
[Oct 25 19:14:15][chn0] Start logging thread for volkszaehler-api. Running as daemon: yes
[Oct 25 19:14:15][chn0] Using default volkszaehler api.
[Oct 25 19:14:15][s0] counter_thread created
[Oct 25 19:14:15][mtr1] Meter connection established
[Oct 25 19:14:15][mtr0] Number of readers: 4
[Oct 25 19:14:15][mtr0] Config.daemon: 1
[Oct 25 19:14:15][mtr0] Config.local: 0
[Oct 25 19:14:15][mtr1] Meter thread started
[Oct 25 19:14:15][mtr1] Meter is opened. Starting channels.
[Oct 25 19:14:15][mtr1] Number of readers: 4
[Oct 25 19:14:15][mtr1] Config.daemon: 1
[Oct 25 19:14:15][mtr1] Config.local: 0
[Oct 25 19:14:15][chn1] Logging thread started
[Oct 25 19:14:15][chn1] Start logging thread for volkszaehler-api. Running as daemon: yes
[Oct 25 19:14:15][chn1] Using default volkszaehler api.
[Oct 25 19:14:15][s0] Counter thread started with blocking hwif
[Oct 25 19:14:15][s0] counter_thread created
[Oct 25 19:14:15][s0] Counter thread started with blocking hwif
[Oct 25 19:14:15][mtr2] Meter connection established
[Oct 25 19:14:15][mtr2] Meter thread started
[Oct 25 19:14:15][mtr2] Meter is opened. Starting channels.
[Oct 25 19:14:15][chn2] Logging thread started
[Oct 25 19:14:15][chn2] Start logging thread for volkszaehler-api. Running as daemon: yes
[Oct 25 19:14:15][chn2] Using default volkszaehler api.
[Oct 25 19:14:15][chn2] Using default volkszaehler api.
[Oct 25 19:14:15][mtr2] Number of readers: 4
[Oct 25 19:14:15][mtr2] Config.daemon: 1
[Oct 25 19:14:15][mtr2] Config.local: 0
[Oct 25 19:14:15][s0] counter_thread created
[Oct 25 19:14:15][mtr3] Meter connection established
[Oct 25 19:14:15][mtr3] Meter thread started
[Oct 25 19:14:15][mtr3] Number of readers: 4
[Oct 25 19:14:15][mtr3] Meter is opened. Starting channels.
[Oct 25 19:14:15][mtr3] Config.daemon: 1
[Oct 25 19:14:15][mtr3] Config.local: 0
[Oct 25 19:14:15][chn3] Logging thread started
[Oct 25 19:14:15][chn3] Start logging thread for volkszaehler-api. Running as daemon: yes
[Oct 25 19:14:15][] Startup done.
[Oct 25 19:14:15][s0] Counter thread started with blocking hwif
[Oct 25 19:14:15][chn3] Using default volkszaehler api.
[Oct 25 19:14:16][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:16][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:16][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:16][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:16][S0] MeterS0:HWIF_GPIO:first poll returned 1
[Oct 25 19:14:17][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:17][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:17][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:17][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:18][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:18][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:18][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:18][S0] MeterS0:HWIF_GPIO:first poll returned 0
[Oct 25 19:14:19][S0] MeterS0:HWIF_GPIO:first poll returned 0
/var/www/volkszaehler.org $ git log -n 1
commit 843fb56d96c9f1ae4d8348d03818f703b637e20d (HEAD -> master, origin/master, origin/HEAD)
Author: andig <cpuidle at gmx.de>
Date: Sun Jun 2 12:04:35 2019 +0200
Delete dbcopy.json
sudo mysqlcheck -A -C
mysql.column_stats Table is already up to date
mysql.columns_priv Table is already up to date
mysql.db Table is already up to date
mysql.event Table is already up to date
mysql.func Table is already up to date
mysql.gtid_slave_pos OK
mysql.help_category Table is already up to date
mysql.help_keyword Table is already up to date
mysql.help_relation Table is already up to date
mysql.help_topic Table is already up to date
mysql.host Table is already up to date
mysql.index_stats Table is already up to date
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.plugin Table is already up to date
mysql.proc Table is already up to date
mysql.procs_priv Table is already up to date
mysql.proxies_priv Table is already up to date
mysql.roles_mapping Table is already up to date
mysql.servers Table is already up to date
mysql.table_stats Table is already up to date
mysql.tables_priv Table is already up to date
mysql.time_zone Table is already up to date
mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry OK
mysql.user Table is already up to date
volkszaehler.aggregate OK
volkszaehler.data OK
volkszaehler.entities OK
volkszaehler.entities_in_aggregator OK
volkszaehler.properties OK
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20201028/3d2388a6/attachment-0001.html>
Mehr Informationen über die Mailingliste volkszaehler-users