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

VZLOGGER V0.8.3 without "oms" protocol #642

Closed escribana closed 7 months ago

escribana commented 8 months ago

Compiling by hand following https://wiki.volkszaehler.org/software/controller/vzlogger/installation_cpp-version VZLOGGER V0.8.3 does not include the "oms" protocol. "/usr/local/bin/vzlogger -h" gives .... following protocol types are supported: file Read from file or fifo exec Parse program output random Generate random values with a random walk fluksov2 Read from Flukso's onboard SPI fifo s0 S0-meter directly connected to RS232 d0 DLMS/IEC 62056-21 plaintext protocol sml Smart Message Language as used by EDL-21, eHz and SyM² w1therm W1-therm / 1wire temperature devices ....

Falling back to V0.8.1 "oms" is present: ... following protocol types are supported: file Read from file or fifo exec Parse program output random Generate random values with a random walk fluksov2 Read from Flukso's onboard SPI fifo s0 S0-meter directly connected to RS232 d0 DLMS/IEC 62056-21 plaintext protocol sml Smart Message Language as used by EDL-21, eHz and SyM² w1therm W1-therm / 1wire temperature devices oms OMS (M-BUS) protocol based devices ...

J-A-U commented 8 months ago

Is the protocol actually missing (not working) or just not shown in the list. As far as i understand the code, OMS is still activated by default.

escribana commented 8 months ago

It's definitively not working! I've got a status 78 ("ExecStart=/usr/local/bin/vzlogger -c /etc/vzlogger.conf (code=exited, status=78)") with ""protocol":"oms" in vzlogger.conf. Version 0.8.1 runs without objection using the very same config file.

r00t- commented 7 months ago

https://github.com/volkszaehler/vzlogger/blob/ec723ec71174566e93c92d6ab79bc9abfba44e6e/src/Meter.cpp#L71-L72

https://github.com/volkszaehler/vzlogger/blob/ec723ec71174566e93c92d6ab79bc9abfba44e6e/CMakeLists.txt#L56-L58

https://github.com/volkszaehler/vzlogger/blob/ec723ec71174566e93c92d6ab79bc9abfba44e6e/CMakeLists.txt#L94-L105

none of this code has changed since 2015.

how exactly did you build vzlogger? did cmake print any message(s) regarding OMS? what are the values of ENABLE_OMS and OMS_SUPPORT in your CMakeCache? did you cleanup between switching versions? (make clean-all or such)

J-A-U commented 7 months ago

Same problem with the new build from cloudsmith:

[...]
  following protocol types are supported:
        file            Read from file or fifo
        exec            Parse program output
        random          Generate random values with a random walk
        fluksov2        Read from Flukso's onboard SPI fifo
        s0              S0-meter directly connected to RS232
        d0              DLMS/IEC 62056-21 plaintext protocol
        sml             Smart Message Language as used by EDL-21, eHz and SyM²
        w1therm         W1-therm / 1wire temperature devices

[...]

Probably not related, but version information is sparse:

pi@pi:~ $ vzlogger -V
0.8.4
 based on git version: GIT-NOTFOUND
 last commit date:
J-A-U commented 7 months ago

I went for a run...

how exactly did you build vzlogger?

Like described in wiki.

git clone https://github.com/volkszaehler/vzlogger.git
cd vzlogger
mkdir build
cd build
cmake -DBUILD_TEST=off ..
make

did cmake print any message(s) regarding OMS?

No. Absolutely no reference to "oms".

cmakevzlogger.txt

what are the values of ENABLE_OMS and OMS_SUPPORT in your CMakeCache?

only

//enable support for OMS (M-Bus) based devices (def=yes)
ENABLE_OMS:BOOL=ON

did you cleanup between switching versions?

My run was from an empty build-directory.

J-A-U commented 7 months ago

Oh my... 😅

https://wiki.volkszaehler.org/software/controller/vzlogger/installation_cpp-version?s[]=building&s[]=oms#build_von_hand

Building OMS OMS erfordert openssl und libmbus >=0.8.0 z.B. von https://github.com/rscada/libmbus.git

git clone https://github.com/rscada/libmbus.git
cd libmbus
./build.sh
sudo make install

But, not enough time to confirm right now.

escribana commented 7 months ago

Same here:

how exactly did you build vzlogger?

git clone https://github.com/volkszaehler/vzlogger.git
cd vzlogger
mkdir build
cd build
cmake -DBUILD_TEST=off ..
make
sudo make install

did cmake print any message(s) regarding OMS?

No, not at all.

what are the values of ENABLE_OMS and OMS_SUPPORT in your CMakeCache?

//enable support for OMS (M-Bus) based devices (def=yes)
ENABLE_OMS:BOOL=ON

did you cleanup between switching versions? (make clean-all or such)

Yes, several times.

escribana commented 7 months ago

Sorry about completing and reopening! I will try https://github.com/rscada/libmbus.git as soon as possible.

r00t- commented 7 months ago

i didn't previously go as far as trying to install libmbus on my system, but that has always been a dependency, and is checked by the (unchanged) code: https://github.com/volkszaehler/vzlogger/blob/ec723ec71174566e93c92d6ab79bc9abfba44e6e/CMakeLists.txt#L98-L99 so if you can build "0.8.1" with OMS, then "0.8.3" should find it aswell. (it works fine for me with libmbus installed.)

what are the values of ENABLE_OMS and OMS_SUPPORT in your CMakeCache?

sorry, that's misleading, the value of OMS_SUPPORT is not actually listed in CMakeCache even when enabled.

or could it be that you used a binary of the older version and did not actually build it yourself? that was included in my question of "how did you build vzlogger", both the version with AND the version without oms support...

J-A-U commented 7 months ago

(it works fine for my with libmbus installed.)

Here as well. When i purge install.sh from the wiki, it might be less confusing.

escribana commented 7 months ago

Ok, V0.8.3 is working now! I made "vzlogger" 0.8.3 once again and voilá: "oms" is present. I don't know why. I followed the same procedure as before. Sorry for the noise.

narc-Ontakac2 commented 7 months ago

Same problem with the new build from cloudsmith

Unfortunately libmbus is not packaged. I'll keep that in mind, but unless someone insists it is important this might never happen.

narc-Ontakac2 commented 5 months ago

The Debian/Raspian packages for vzlogger 0.8.7 are build with OMS support. @escribana In case you are using vzlogger with OMS support now I would appreciate if you could give it a try.