Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a small Debian package for sml_server #137

Merged
merged 6 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
libsml (1.1.2) unstable; urgency=medium

* Added the libsml-utils package for sml_server

-- Joachim Zobel <jz-autosign@heute-morgen.de> Wed, 03 Jan 2024 06:13:18 +0100

libsml (1.1.1) unstable; urgency=medium

* Added armel as release architecture

-- Joachim Zobel <jz-2017@heute-morgen.de> Tue, 31 Oct 2023 12:01:50 +0100
-- Joachim Zobel <jz-autosign@heute-morgen.de> Tue, 31 Oct 2023 12:01:50 +0100

libsml (1.1.0) unstable; urgency=medium

Expand Down
11 changes: 10 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: libsml
Priority: optional
Maintainer: Joachim Zobel <jz-autosign@heute-morgen.de>
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
Expand All @@ -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.

1 change: 1 addition & 0 deletions debian/libsml-utils.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/sml_server /usr/bin
1 change: 1 addition & 0 deletions debian/libsml-utils.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sml_server.1
10 changes: 9 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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:

57 changes: 57 additions & 0 deletions debian/sml_server.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
% SML_SERVER(1) Volkszaehler project | User Commands
% Joachim Zobel <jz-2017@heute-mogen.de>

# 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
narc-Ontakac2 marked this conversation as resolved.
Show resolved Hide resolved
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.

2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"srcDir": "sml/src",
"flags": "-DSML_NO_UUID_LIB"
},
"version": "1.1.1",
"version": "1.1.2",
"frameworks": "arduino",
"platforms": "*"
}
2 changes: 1 addition & 1 deletion sml.pc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading