2020-07-26 21:20:15 +02:00
2020-07-26 13:57:32 +02:00
2020-07-26 21:20:15 +02:00
2019-09-05 13:04:11 +02:00
2020-07-26 12:55:12 +02:00

lmwsip

Introduction

lmwsip is a python library for the lmw sip protocol.

Library

The lmwsip.py library contains the class LmwSip to connect to the LMW meetnet using de SIP protocol. The library contains documentation how to use it.

Tools

lmwsip-test

A small test program containing some functions to test the library.

siprun

A prgram to run SIP command files. See "siprun -H" for usage information.

hoek-h10.sip

A sample sip command file to request the waterlevel at hoek van holland from the last hour

Username password

All files contain "USER", "PASS". These values should be replaced by real credentials. Otherwise the connection fails.

Examples

Library

from lmwsip import LmwSip

lmwsip = LmwSip(ssl=True, host="sip-lmw.ad.rws.nl", port=443)
lmwsip.send("LI user,pass\r")
print("< [%s]" % (lmwsip.recv().strip('\r')))
lmwsip.send("TI LMW\r")
print("< [%s]" % (lmwsip.recv().strip('\r')))
lmwsip.send("LO\r")
print("< [%s]" % (lmwsip.recv().strip('\r')))

siprun

$ ./siprun -h sip-lmw.ad.rws.nl -s -p 443 hoek-h10.sip
> [LI USER,PASS]
< [! ]
> [TI LMW]
< [! 05-SEP-19 08:24:43]
> [WN LMW,HOEK,H10,-25:00,05-09-2019,08:10,DATA]
< [? 0211 Waarnemingen vallen buiten opslag range]
> [LO]
< [! ]
Description
No description provided
Readme MIT 168 KiB
0.9.9 Latest
2024-09-21 08:59:28 +00:00
Languages
Python 99.5%
Shell 0.5%