volkszaehler / vzlogger

Logging utility for various meters & sensors
http://wiki.volkszaehler.org/software/controller/vzlogger
GNU General Public License v3.0
145 stars 123 forks source link

CMake Error: Unknown argument -ENABLE_MQTT=on #599

Closed alkomm closed 1 year ago

alkomm commented 1 year ago

I followed the regular documentation (https://wiki.volkszaehler.org/software/controller/vzlogger/installation_cpp-version) for installing vzlogger, but unfortunately, I'm getting this error immediately when I try to install MQTT:

88 Tests 0 Failures 0 Ignored
OK
make[1]: Leaving directory '/home/USER/vzlogger/libs/libsml/test'
~/vzlogger/libs ~/vzlogger
~/vzlogger

building and installing vzlogger
~/vzlogger/build ~/vzlogger

building vzlogger
CMake Error: Unknown argument -ENABLE_MQTT=on
CMake Error: Run 'cmake --help' for all supported options.

my command:

./install.sh vzlogger libjson libsml mqtt

i'm on raspberry pi 4, with ubuntu server.

do somebody have an idea? what im doing wrong?

J-A-U commented 1 year ago

Please execute in shell and post the result here. cd ~/vzlogger git log -n 1

alkomm commented 1 year ago

sure.

commit 0e2576d0fe6ab3cff8db18239e0d5a46409a3fa8 (HEAD -> master, origin/master, origin/HEAD)
Author: J-A-U <J-A-U@users.noreply.github.com>
Date:   Fri Jun 23 13:11:07 2023 +0200

    Revert "Evaluate the "duplicates" parameter for influxdb api" (#595)
J-A-U commented 1 year ago

I can't replicate the failure over here on Raspbian.

Give it a try and run ./install.sh vzlogger. If I'm not confused MQTT will still be included.

alkomm commented 1 year ago

hi @J-A-U im not using raspbian, it is the normal ubuntu 22.04.2 LTS server from the official site.

yes the normal install ./install.sh works great. But im not sure if mqtt will be included.

grafik

does this mean its included?

if so, how can i test that vzlogger use mqtt? i already added config in /etc/vzlogger.conf

but its not working.

Edit:

my config looks like this:

{
  "retry": 0,
  "verbosity": 15,
  "log": "/var/log/vzlogger/vzlogger.log",
  "local": {
    "enabled": false,
    "port": 8081,
    "index": true,
    "timeout": 0,
    "buffer": 0
  },
  "mqtt": {
    "enabled": true,
    "host": "<ip address>",
    "port": 1883,
    "id": "vzlogger",
    "cafile": "",
    "capath": "",
    "certfile": "",
    "keyfile": "",
    "keypass": "",
    "keepalive": 30,
    "topic": "vzlogger/data",
    "id": "",
    "user": "vzlogger",
    "pass": "<secret>",
    "retain": false,
    "rawAndAgg": false,
    "qos": 0,
    "timestamp": true
  },
  "meters": [
    {
      "enabled": true,
      "allowskip": false,
      "interval": -1,
      "aggtime": -1,
      "aggfixedinterval": false,
      "channels": [
        {
          "uuid": "<uuid>",
          "identifier": "1.8.0",
          "api": "volkszaehler",
          "middleware": "<middleware>",
          "aggmode": "none",
          "duplicates": 0
        },
        {
          "uuid": "<uuid>",
          "identifier": "2.8.0",
          "api": "volkszaehler",
          "middleware": "<middleware>",
          "aggmode": "none",
          "duplicates": 0
        }
      ],
      "protocol": "d0",
      "device": "/dev/ttyUSB0",
      "pullseq": "2F3F210D0A",
      "baudrate": 300,
      "parity": "7e1",
      "read_timeout": 10
    }
  ]
}

the middleware is getting data, but mqtt not. (i removed sensitive data)

in the log there is also no 1883 mention. (so no connection try)

J-A-U commented 1 year ago

im not using raspbian,

I got that. Mentioned it to be clear.

it is the normal ubuntu 22.04.2 LTS server from the official site.

Which i can't test here.

does this mean its included?

I think so. You can run the build again. It won't do anything because nothing changed. But in the texts i had clear indication MQTT was included.

but its not working.

That's not a helpful description. Clues from the logfile?

alkomm commented 1 year ago

okay, there is nothing in the logfile, but i checked now with the mqtt explorer, if something comes in mqtt. the last data is in there.

Perfect! thank you! it was actually the normal ./install.sh after restart it worked for me.