diff --git a/debian/changelog b/debian/changelog index 2b49807..7f4a0a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ +libsml (1.1.2) unstable; urgency=medium + + * Added the libsml-utils package for sml_server + + -- Joachim Zobel Wed, 03 Jan 2024 06:13:18 +0100 + libsml (1.1.1) unstable; urgency=medium * Added armel as release architecture - -- Joachim Zobel Tue, 31 Oct 2023 12:01:50 +0100 + -- Joachim Zobel Tue, 31 Oct 2023 12:01:50 +0100 libsml (1.1.0) unstable; urgency=medium diff --git a/debian/control b/debian/control index 1708def..ccf589e 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: libsml Priority: optional Maintainer: Joachim Zobel -Build-Depends: debhelper (>= 13~), uuid-dev (>= 2.16), dh-exec +Build-Depends: debhelper (>= 13~), uuid-dev (>= 2.16), dh-exec, pandoc Standards-Version: 4.6.2 Rules-Requires-Root: no Section: libs @@ -24,9 +24,18 @@ Description: Header files for libSML Package: libsml1 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: libsml-utils Multi-Arch: same Description: Library for the Smart Messaging Language (SML) libSML is a library which implements the Smart Messaging Language (SML) protocol specified by VDE's Forum Netztechnik/Netzbetrieb (FNN). It can be utilized to communicate to FNN specified Smart Meters or Smart Meter components (EDL/MUC). + +Package: libsml-utils +Architecture: any +Depends: libsml1, ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: foreign +Description: Small tool for testing and debugging libsml + sml_server was originally intended as an example but is quite useful by itself. + diff --git a/debian/libsml-utils.install b/debian/libsml-utils.install new file mode 100644 index 0000000..35709f0 --- /dev/null +++ b/debian/libsml-utils.install @@ -0,0 +1 @@ +examples/sml_server /usr/bin diff --git a/debian/libsml-utils.manpages b/debian/libsml-utils.manpages new file mode 100644 index 0000000..b1d74ff --- /dev/null +++ b/debian/libsml-utils.manpages @@ -0,0 +1 @@ +sml_server.1 diff --git a/debian/rules b/debian/rules index 44a3cb8..b97c678 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,15 @@ execute_before_dh_auto_build: sed -i 's#"version":.*#"version": "${VERSION}",#' library.json sed -i 's#Version:.*#Version: ${VERSION}#' sml.pc +execute_after_dh_auto_build: + pandoc -o sml_server.1 -s -t man debian/sml_server.1.md + +execute_after_dh_clean: + rm -f sml_server.1 + +override_dh_auto_install: + %: dh $@ -override_dh_auto_install: + diff --git a/debian/sml_server.1.md b/debian/sml_server.1.md new file mode 100644 index 0000000..b1e3f34 --- /dev/null +++ b/debian/sml_server.1.md @@ -0,0 +1,57 @@ +% SML_SERVER(1) Volkszaehler project | User Commands +% Joachim Zobel + +# NAME + +sml_server - makes libsml functionality available on the command line + +# SYNOPSIS + +**sml_server** [**-v**] [**-h**] [**-s**] _device_|_file_ + +# DESCRIPTION + +The sml_server reads binary SML data from the given device or file. If a - is +given, stdin is used. This data is then displayed in human readable form. + +**-v** +: This enables verbose output. + +**-h** +: This shows the help. + +**-s** +: will print the first sml message and then exit (single) + +# EXAMPLES + +Assuming there is a meter connected to ttyUSB0 you can display the transmitted +data. + +~~~ +$ sml_server /dev/ttyUSB0 +129-129:199.130.3*255#ISK# +1-0:0.0.9*255#06 49 53 4b 01 0b cb 28 e6 1d # +1-0:1.8.0*255#10973297.0#Wh +1-0:1.8.1*255#10973297.0#Wh +1-0:1.8.2*255#0.0#Wh +1-0:16.7.0*255#144#W +... +~~~ + +# NOTE + +The sml_server is intended as a tool for development and testing and as an +example. It was not developed for production use. + +# COPYRIGHT + +The sml_server program is Copyright (C) Juri Glass, Mathias Runge, Nadim El +Sayed and others. + +# SEE ALSO + +[libsml-testing](https://github.com/devZer0/libsml-testing) +is a collection of test data from real life smart meters. It also has +usage examples. + diff --git a/examples/Makefile b/examples/Makefile index fcb2a51..fb01735 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,7 +1,7 @@ UNAME := $(shell uname) CFLAGS += -I../sml/include/ -g -std=c99 -Wall -Wextra -pedantic OBJS = sml_server.o -LIBSML = ../sml/lib/libsml.a +LIBSML = ../sml/lib/libsml.so.1 INSTALL = /usr/bin/install prefix = /usr/local exec_prefix = ${prefix} diff --git a/library.json b/library.json index f203327..755f785 100644 --- a/library.json +++ b/library.json @@ -12,7 +12,7 @@ "srcDir": "sml/src", "flags": "-DSML_NO_UUID_LIB" }, - "version": "1.1.1", + "version": "1.1.2", "frameworks": "arduino", "platforms": "*" } diff --git a/sml.pc b/sml.pc index d20a792..3f348fa 100644 --- a/sml.pc +++ b/sml.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: libSML Description: Library for the Smart Messaging Language (SML) -Version: 1.1.1 +Version: 1.1.2 URL: http://github.com/volkszaehler/libsml Requires: uuid >= 2.16 Libs: -L${libdir} -lsml