[vz-users] s0-an-usb VZlogger Log und Conf

Peter p_pienkny at web.de
Mi Mär 9 17:14:00 CET 2022


Habe jetzt hoffentlich alles richtig gemacht, so schauts jetz aus:

[Mar 09 08:31:23][main] vzlogger v0.8.0 based on heads/master-0-g033de9dc7d
from Wed, 10 Feb 2021 14:44:17 +0100 started.
[Mar 09 08:31:24][mqtt] MqttClient::MqttClient called
[Mar 09 08:31:24][mqtt] using libmosquitto 1.5.7
[Mar 09 08:31:24][mqtt] ~MqttClient called
[Mar 09 08:31:24][mqtt] mqtt client not configured. stopped.
[Mar 09 08:31:24][mtr0] Creating new meter with protocol sml.
[Mar 09 08:31:24][mtr0] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=sml)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24][chn0] New channel initialized (uuid=...0ced10
api=volkszaehler id=power)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24][chn1] New channel initialized (uuid=...42a90c
api=volkszaehler id=counter)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24][chn2] New channel initialized (uuid=...104b48
api=volkszaehler id=1-0:1.8.0)
[Mar 09 08:31:24][mtr1] Creating new meter with protocol s0.
[Mar 09 08:31:24][mtr1] Meter configured, enabled.
[Mar 09 08:31:24]       New meter initialized (protocol=s0)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24][chn3] New channel initialized (uuid=...e29a11
api=volkszaehler id=Power)
[Mar 09 08:31:24][mtr2] Creating new meter with protocol d0.
[Mar 09 08:31:24][mtr2] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=d0)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24][chn4] New channel initialized (uuid=...ee api=volkszaehler
id=1-0:1.8.1)
[Mar 09 08:31:24][mtr3] Creating new meter with protocol random.
[Mar 09 08:31:24][mtr3] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=random)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24]       Identifier is not set. Set it to default value
'NilIdentifier'.
[Mar 09 08:31:24][chn5] New channel initialized (uuid=...1e5a66
api=volkszaehler id=NilIdentifier)
[Mar 09 08:31:24][mtr4] Creating new meter with protocol file.
[Mar 09 08:31:24][mtr4] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=file)
[Mar 09 08:31:24][mtr5] Creating new meter with protocol exec.
[Mar 09 08:31:24][mtr5] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=exec)
[Mar 09 08:31:24][mtr6] Creating new meter with protocol fluksov2.
[Mar 09 08:31:24][mtr6] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=fluksov2)
[Mar 09 08:31:24]       Configure channel.
[Mar 09 08:31:24][chn6] New channel initialized (uuid=...53edec
api=volkszaehler id=sensor0/power)
[Mar 09 08:31:24][mtr7] Creating new meter with protocol w1therm.
[Mar 09 08:31:24][mtr7] Meter configured, disabled.
[Mar 09 08:31:24]       New meter initialized (protocol=w1therm)
[Mar 09 08:31:24]       Have 8 meters.
[Mar 09 08:31:24][main] log level is 15
[Mar 09 08:31:24][main] daemon=1, local=0
[Mar 09 08:31:24]       Daemonize process...
[Mar 09 08:31:24]       Opened logfile /var/log/vzlogger.log
[Mar 09 08:31:24][push] pushdata_thread created.
[Mar 09 08:31:24][]     ===> Start meters
[Mar 09 08:31:24][mtr0] Meter for protocol 'sml' is disabled. Skipping.
[Mar 09 08:31:24][push] Start push_data_thread
[Mar 09 08:31:24][s0]   counter_thread created
[Mar 09 08:31:24][mtr1] Meter connection established
[Mar 09 08:31:24][mtr1] Meter thread started
[Mar 09 08:31:24][mtr1] Meter is opened. Starting channels.
[Mar 09 08:31:24][s0]   Counter thread started with blocking hwif
[Mar 09 08:31:24][mtr1] Number of readers: 4
[Mar 09 08:31:24][mtr1] Config.daemon: 1
[Mar 09 08:31:24][mtr1] Config.local: 0
[Mar 09 08:31:24][chn3] Logging thread started
[Mar 09 08:31:24][mtr2] Meter for protocol 'd0' is disabled. Skipping.
[Mar 09 08:31:24][mtr3] Meter for protocol 'random' is disabled. Skipping.
[Mar 09 08:31:24][mtr4] Meter for protocol 'file' is disabled. Skipping.
[Mar 09 08:31:24][mtr5] Meter for protocol 'exec' is disabled. Skipping.
[Mar 09 08:31:24][mtr6] Meter for protocol 'fluksov2' is disabled. Skipping.
[Mar 09 08:31:24][mtr7] Meter for protocol 'w1t' is disabled. Skipping.
[Mar 09 08:31:24][]     Startup done.
[Mar 09 08:31:24][chn3] Start logging thread for volkszaehler-api. Running
as daemon: yes
[Mar 09 08:31:24][chn3] Using default volkszaehler api.
[Mar 09 08:31:29][push] waitAndSendOnceToAll empty dataMap (timeout?)
[Mar 09 08:31:34][push] waitAndSendOnceToAll empty dataMap (timeout?)
[Mar 09 16:13:31][push] waitAndSendOnceToAll empty dataMap (timeout?)
[Mar 09 16:13:36][push] waitAndSendOnceToAll empty dataMap (timeout?)
[Mar 09 16:13:41][push] waitAndSendOnceToAll empty dataMap (timeout?)

Jetzt noch die vzlogger.conf :

/**
 * vzlogger configuration
 *
 * Use properly encoded JSON with javascript comments
 *
 * Take a look at the wiki for detailed information:
 * http://wiki.volkszaehler.org/software/controller/vzlogger#configuration
 *
 * For an online configuration editor refer to:
 * http://volkszaehler.github.io/vzlogger/
 */

{
    // General settings
    "daemon": true,        // run periodically
    "verbosity": 15,         // log verbosity (0=log_alert, 1=log_error,
3=log_warning, 5=log_info, 10=log_debug, 15=log_finest)
    "log": "/var/log/vzlogger.log", // log file, optional
    "retry": 30,            // http retry delay in seconds

    // Build-in HTTP server
    "local": {
        "enabled": false,   // enable local HTTPd for serving live readings
        "port": 8081,       // TCP port for local HTTPd
        "index": true,      // provide index listing of available channels
if no UUID was requested
        "timeout": 30,      // timeout for long polling comet requests in
seconds (0 disables comet)
        "buffer": 300        // HTTPd buffer configuration for serving
readings, default -1
                            //   >0: number of seconds of readings to serve
                            //   <0: number of tuples to server per channel
(e.g. -3 will serve 3 tuples)
    },

    // realtime notification settings
    "push": [
        {
            "url": "http://127.0.0.1:5582"  // notification destination,
e.g. frontend push-server
        }
    ],

    // mqtt client support (if ENABLE_MQTT set at cmake generation)
    "mqtt": {
        "enabled": false,  // enable mqtt client. needs host and port as
well
        "host": "test.mosquitto.org", // mqtt server addr
        "port": 1883, // 1883 for unencrypted, 8883 enc, 8884 enc cert
needed,
        "cafile": "", // optional file with server CA
        "capath": "", // optional path for server CAs. see mosquitto.conf.
Specify only cafile or capath
        "certfile": "", // optional file for your client certificate (e.g.
client.crt)
        "keyfile": "", // optional path for your client certficate private
key (e.g. client.key)
        "keypass": "", // optional password for your private key
        "keepalive": 30, // optional keepalive in seconds.
        "topic": "vzlogger/data", // optional topic dont use $ at start and
no / at end
        "user": "", // optional user name for the mqtt server
        "pass": "", // optional password for the mqtt server
        "retain": false, // optional use retain message flag
        "rawAndAgg": false, // optional publish raw values even if agg mode
is used
        "qos": 0, // optional quality of service, default is 0
        "timestamp": false // optional whether to include a timestamp in the
payload
    },


    // Meter configuration
    "meters": [
        {
            // Example SML meter

            "enabled": false,               // disabled meters will be
ignored (default)
            "allowskip": false,                  // errors when opening
meter may be ignored if enabled
            "protocol": "sml",              // meter protocol, see 'vzlogger
-h' for full list
            "device": "/dev/ttyUSB1",       // meter device
//          "host": "http://my.ddns.net::7331",   // uri if meter not
locally connected using <device>

            "aggtime": 10,                  // aggregate meter readings and
send middleware update after <aggtime> seconds

            "channels": [{
                "api": "volkszaehler",      // middleware api, default
volkszaehler
                "uuid": "fde8f1d0-c5d0-11e0-856e-f9e4360ced10",
                "middleware": "http://localhost/middleware.php",
                "identifier": "power"       // OBIS identifier (alias for
'1-0:1.7.ff')
                                            //   see 'vzlogger -h' for
available aliases
                                            //   see 'vzlogger -v20' for
available identifiers for attached meters
            }, {
                "uuid": "a8da012a-9eb4-49ed-b7f3-38c95142a90c",
                "middleware": "http://localhost/middleware.php",
                "identifier": "counter",    // OBIS identifier
                "duplicates": 10            // duplicate handling, default 0
(send duplicate values)
                                            //   >0: send duplicate values
only each <duplicates> seconds
                                            // Activate only for abs.
counter values (Zaehlerstaende) and not for impulses
            }, {
                "uuid": "d5c6db0f-533e-498d-a85a-be972c104b48",
                "middleware": "http://localhost/middleware.php",
                "identifier": "1-0:1.8.0"   // OBIS identifier
            }]
        },
        {
            // Example S0 meter

            "enabled": true,               // disabled meters will be
ignored (default)
            "allowskip": true,                  // errors when opening meter
may be ignored if enabled
            "protocol": "s0",               // meter protocol, see 'vzlogger
-h' for full list
            "device": "/dev/ttyUSB0",       // meter device

            "aggtime": -1,                 // aggregate meter readings and
send middleware update after <aggtime> seconds
            "aggfixedinterval": false,       // round timestamps to nearest
<aggtime> before sending to middleware

            "channel": {
                "identifier": "Power",    // s0 meter knows "Impulse" and
"Power"
                "uuid": "3e663c00-9e4e-11ec-a91e-5fdcf5e29a11",
                "middleware": "http://localhost/middleware.php",
                "aggmode": "None"            // aggregation mode: aggregate
meter readings during <aggtime> interval
                                            //   "SUM": add readings (use
for s0 impulses)
                                            //   "MAX": maximum value (use
for meters sending absolute readings)
                                            //   "AVG": average value (use
for meters sending current usage)
            }
        },
        {
            // Example D0 meter

            "enabled": false,               // disabled meters will be
ignored (default)
            "allowskip": false,                  // errors when opening
meter may be ignored if enabled
            "protocol": "d0",               // meter protocol, see 'vzlogger
-h' for full list
            "device": "/dev/ttyUSB0",       // meter device
            "dump_file": "/var/log/d0.txt", // detailed log file for all
received/transmitted data (optional)

            "parity": "7E1",                // Serial parity, 7E1 or 8N1
            "baudrate": 9600,               // Serial baud rate, typically
9600 or 300

            // optional D0 interface settings
//          "pullseq": "2F3F210D0A",        // Pull sequence in 'hex'
//          "ackseq": "063030300d0a",       // optional (default: keine
Antwortsequenz auf Zaehlerantwort) kann entweder feste hex-Sequenz sein
(z.B. 063035300d0a für mode C mit 9600bd oder 063030300d0a = 300bd) oder
kann auf "auto" gesetzt werden, damit die Sequenz autom. berechnet wird und
autom. auf die max. Baudrate umgeschaltet wird (baudrate_read wird dann
ignoriert)
//          "read_timeout": 10,             // optional read timeout,
default 10s. Data reading is considered finished if no state change after
that timeout
//          "baudrate_change_delay": 400,   // optional, default none. Delay
value in ms after ACKSEQ send before baudrate change
//          "baudrate_read": 300,           // Baudratenumschaltung auf
gewünschte Baudrate, abhängig von Zählerantwort

//          "aggtime": 20,                  // aggregate meter readings and
send middleware update after <aggtime> seconds
            "interval": 0,                  // Wartezeit in Sekunden bis
neue Werte in die middleware übertragen werden

            "channel": {
                "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
                "middleware": "http://localhost/middleware.php",
                "identifier": "1-0:1.8.1"  // OBIS identifier
//              "aggmode": "MAX"            // aggregation mode: aggregate
meter readings during <aggtime> interval
            }
        },

        // examples for non-device protocols
        {
            "enabled": false,               // disabled meters will be
ignored
            "allowskip": false,                  // errors when opening
meter may be ignored if enabled

            "protocol": "random",
            "interval": 2,
            "max": 40.0,                    // has to be double!
            "min": -5.0,                    // has to be double!
            "channel": {
                "uuid": "bac2e840-f72c-11e0-bedf-3f850c1e5a66",
                "middleware": "http://localhost/middleware.php"
            }
        },
        {
            "enabled": false,               // disabled meters will be
ignored
            "allowskip": false,                  // errors when opening
meter may be ignored if enabled

            "protocol": "file",
            "path": "/proc/loadavg",
//          "format": "$i $v $t",           // a format string for parsing
complex logfiles
                                            // arbitrary text and
whitespaces are allowed, see 'scanf()'
                                            // at least $v has to be used
                                            // $i => identifier, $v =>
value, $t => timestamp
            "rewind": true,                 // reset file pointer each
interval to the beginning of the file
            "interval": 2                   // if ommitted, we will try to
listen on changes with inotify
        },
        {
            "enabled": false,               // disabled meters will be
ignored
            "allowskip": false,                  // if enabled, errors when
opening meter will lead to meter being ignored
            "protocol": "exec",
            "command": "python /path/to/yourscript.py", // is the command
line as you'll type it in the shell - remember to test your command from the
root directory
            //          "format": "$i $v $t",           // a format string
for parsing complex logfiles
                                                        // arbitrary text
and whitespaces are allowed, see 'scanf()'
                                                        // at least $v has
to be used
                                                        // $i => identifier,
$v => value, $t => timestamp
            "interval": 2
        },

        // examples for Flukso-based sensors
        {
            "enabled": false,               // disabled meters will be
ignored
            "allowskip": false,                  // errors when opening
meter may be ignored if enabled

            "protocol": "fluksov2",
            "fifo": "/var/spid/delta/out",
            "channel": {
                "uuid": "3b4da450-42a8-11e1-8b8d-c526d853edec",
                "middleware": "http://localhost/middleware.php",
                "identifier": "sensor0/power" // or "sensor2/consumption"
            }
        },

        // example for 1wire temp sensors
        {
            "enabled": false,
            "allowskip": true,
            "protocol": "w1therm"
        }
    ]
}

Ich sehe jetzt nicht, daß die S0 gestartet wurde.

MfG

Peter 

-----Ursprüngliche Nachricht-----
Von: volkszaehler-users
[mailto:volkszaehler-users-bounces at demo.volkszaehler.org] Im Auftrag von
Daniel Lauckner
Gesendet: Dienstag, 8. März 2022 21:45
An: volkszaehler.org - users
Betreff: Re: [vz-users] s0-an-usb

Hallo,


am Dienstag, 8. März 2022 um 15:15 hat Peter geschrieben:
> [Mar 08 15:04:39]       Process not  daemonized...

> Ich hab mal die Log copiert, vielleicht kannst du da was sehen.

Bei daemon:false wird nix geloggt. Muss auf true gestellt sein.


mfg Daniel




Mehr Informationen über die Mailingliste volkszaehler-users