BOSWatch/README.md

153 lines
6.4 KiB
Markdown
Raw Normal View History

|branch|quality|CI-Build|
|---|---|---|
2017-02-20 11:47:44 +01:00
|master-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/master.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763821)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=master)](https://travis-ci.org/Schrolli91/BOSWatch)|
|develop-branch|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/develop.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=3763820)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=develop)](https://travis-ci.org/Schrolli91/BOSWatch)|
2016-10-02 21:52:05 +02:00
2016-10-03 23:30:50 +02:00
**Achtung:** Die readme ist veraltet - Neue Informationen werden im Laufe der Zeit in das Github Wiki integriert!
**Attention:** This readme is outdated - New informations will be integrated in the Github Wiki!
2016-10-02 21:52:05 +02:00
2016-10-02 21:20:35 +02:00
![# BOSWatch](/boswatch.png)
2015-04-04 16:24:54 +02:00
:satellite: Python Script to receive and decode German BOS Information with rtl_fm and multimon-NG :satellite:
2015-04-03 16:21:06 +02:00
2015-04-08 20:50:46 +02:00
#### Notice:
The intercept of the German BOS radio is **strictly prohibited** and will be prosecuted. the use is **only authorized** personnel permitted.
The software was developed using the Multimon-NG code, a function in the real operation can not be guaranteed.
2015-04-05 22:22:06 +02:00
2015-04-07 20:18:11 +02:00
2015-04-04 22:58:10 +02:00
**Please** only use Code from **master**-Branch - thats **the only stable!**
unless you are developer you can use the develop-Branch - may be unstable!
2015-04-03 23:06:20 +02:00
### Features
2015-06-05 09:10:11 +02:00
##### Implemented features:
- FMS, ZVEI and POCSAG512/1200/2400 decoding and displaying
- Plugin support for easy functional extension
- Filtering double alarms with adjustable time and check width
2015-06-05 09:10:11 +02:00
- Filtering allowed, denied and range of POCSAG RIC´s
- Filtering data for each typ/plugin combination with RegEX
- All configurations in a seperate config file
2015-05-20 13:47:12 +02:00
- Data validation (plausibility test)
2015-06-25 17:40:09 +02:00
- Description look-up from csv-files
2015-06-05 09:10:11 +02:00
- Logfiles for better troubleshooting
- verbose/quiet mode for more/none information
2015-06-25 17:40:09 +02:00
- Ready for use BOSWatch as daemon
2015-10-12 22:03:04 +02:00
- possibility to start plugins asynchron
- NMA Error Handler
2015-04-28 11:34:13 +02:00
2015-06-05 09:10:11 +02:00
##### Features for the future:
- more plugins
2015-07-02 10:06:40 +02:00
- other Ideas per Issues please
2015-05-20 13:47:12 +02:00
###Plugins
If you want to code your own Plugin, see `plugins/README.md`.
2015-07-02 10:06:40 +02:00
2015-06-05 09:10:11 +02:00
##### Implemented plugins:
|Plugin|Function|FMS|ZVEI|POC|
|-----|---------|:-:|:--:|:-:|
|MySQL|insert data into MySQL database|:white_check_mark:|:white_check_mark:|:white_check_mark:|
|httpRequest|send a request with parameter to an URL|:white_check_mark:|:white_check_mark:|:white_check_mark:|
|eMail|send Mails with own text|:white_check_mark:|:white_check_mark:|:white_check_mark:|
|BosMon|send data to BosMon server|:white_check_mark:|:white_check_mark:|:white_check_mark:|
|firEmergency|send data to firEmergency server|:x:|:white_check_mark:|:white_check_mark:|
|jsonSocket|send data as jsonString to a socket server|:white_check_mark:|:white_check_mark:|:white_check_mark:|
2015-10-12 22:03:04 +02:00
|NMA|send data to Notify my Android|:white_check_mark:|:white_check_mark:|:white_check_mark:|
2015-06-05 08:45:11 +02:00
2015-06-05 09:10:11 +02:00
- for more Information to the plugins see `config.ini`
2015-05-20 13:47:12 +02:00
2015-05-20 13:50:05 +02:00
##### Plugins for the Future:
2015-06-05 08:45:11 +02:00
- Ideas per Issues please
2015-05-20 13:47:12 +02:00
2015-04-03 16:21:06 +02:00
### Configuration
##### boswatch.py
2015-06-05 09:10:11 +02:00
Take a look into the folder /config/
2015-05-21 07:51:43 +02:00
Rename `config.template.ini` to `config.ini`
2015-05-20 13:50:05 +02:00
In the Section `[BOSWatch]` you can set double_alarm_time etc.
In the Section `[Plugins]` you can activate or deactivate the Plugins
2015-06-05 09:10:11 +02:00
For each plugin that requires configurations, a own Section with his name is available
2015-06-05 09:10:11 +02:00
For the other functions see "Usage" below.
2015-05-28 09:18:21 +02:00
##### Filtering Functions (RegEX)
2015-06-05 09:10:11 +02:00
For the RegEX filter functions see Section `[Filters]`
http://www.regexr.com/ - RegEX test tool an documentation
2015-07-02 10:06:40 +02:00
2015-06-05 09:10:11 +02:00
No filter for a combination typ/plugin = all data will pass
2015-05-28 09:18:21 +02:00
2015-07-02 08:54:42 +02:00
Syntax: `INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;FREQUENZ;REGEX` (separator `;`)
- `TYP` = the data typ (FMS|ZVEI|POC)
- `DATAFIELD` = the field of the data array (see readme.md in plugin folder)
- `PLUGIN` = the name of the plugin to call with this filter (* for all)
- `FREQUENZ` = the frequenz to use the filter (for more SDR sticks (* for all))
- `REGEX` = the RegEX
2015-05-28 09:18:21 +02:00
2015-06-05 09:10:11 +02:00
only ZVEI to all plugins with 25### at 85.5MHz
2015-07-02 10:06:40 +02:00
`testfilter = ZVEI;zvei;*;85500000;25[0-9]{3}`
2015-05-28 09:18:21 +02:00
2015-06-05 09:10:11 +02:00
only POCSAG to MySQL with the text "ALARM:" in the message
2015-07-02 10:06:40 +02:00
`pocTest = POC;msg;MySQL;*;ALARM:`
##### Web frontend (obsolete)
2015-10-12 22:03:04 +02:00
old data in folder `/exampeAddOns/simpleWeb/`
2015-05-23 11:12:45 +02:00
2015-07-02 10:06:40 +02:00
~~Put the files in folder /wwww/ into your local webserver folder (f.e. /var/www/).
2015-06-05 09:10:11 +02:00
Now you must edit the "config.php" with your userdata to your local database.
2015-07-02 10:06:40 +02:00
Take a look into the parser.php for the parsing functions~~
2015-05-20 13:47:12 +02:00
2015-04-03 16:21:06 +02:00
### Usage
2015-04-08 08:24:02 +02:00
`sudo python boswatch.py -f 85.235M -a FMS ZVEI`
2015-06-05 09:10:11 +02:00
Starts boswatch at frequency 85.235 MHz with the demodulation functions FMS and ZVEI.
2015-05-20 13:50:05 +02:00
Parameter -f/--freq and -a/--demod are required!
2015-04-03 16:21:06 +02:00
2015-06-05 09:10:11 +02:00
Help to all usable parameters with `sudo python boswatch.py -h`
2015-04-03 16:35:34 +02:00
```
usage: boswatch.py [-h] -f FREQ [-d DEVICE] [-e ERROR] -a
{FMS,ZVEI,POC512,POC1200,POC2400}
[{FMS,ZVEI,POC512,POC1200,POC2400} ...] [-s SQUELCH] [-v]
optional arguments:
2015-05-20 13:47:12 +02:00
-h, --help show this help message and exit
-f FREQ, --freq FREQ Frequency you want to listen
2015-06-25 17:40:09 +02:00
-d DEVICE, --device DEVICE Device you want to use (Check with rtl_test)
2015-06-05 09:10:11 +02:00
-e ERROR, --error ERROR Frequency-Error of your device in PPM
-a {FMS,ZVEI,POC512,POC1200,POC2400} [{FMS,ZVEI,POC512,POC1200,POC2400} ...],
--demod {FMS,ZVEI,POC512,POC1200,POC2400} [{FMS,ZVEI,POC512,POC1200,POC2400} ...]
2015-06-25 17:40:09 +02:00
Demodulation functions
-s SQUELCH, --squelch SQUELCH level of squelch
-u, --usevarlog Use '/var/log/boswatch' for logfiles instead of subdir 'log' in BOSWatch directory
2015-06-05 09:10:11 +02:00
-v, --verbose Shows more information
-q, --quiet Shows no information. Only logfiles
```
2015-04-03 22:46:30 +02:00
2015-05-20 13:47:12 +02:00
### Installation
Please follow the instructions written down in the wiki:
https://github.com/Schrolli91/BOSWatch/wiki
You just need to download a single file since the installer manages the whole process except the installation of a webserver and a database.
2015-07-02 08:54:42 +02:00
If you want to use BOSWatch as a daemon, you have to set your
2015-06-25 17:40:09 +02:00
configuration in `service/boswatch.sh` and copy it to `/etc/init.d`.
Then you can start BOSWatch with `sudo /etc/init.d/boswatch.sh start`.
For configuration-details see `service/README.md`.
2015-05-20 13:47:12 +02:00
2015-04-03 23:06:20 +02:00
### Requirements
- RTL_SDR (rtl_fm)
- Multimon-NG
2015-05-16 08:41:23 +02:00
- Python Support
2015-06-05 09:10:11 +02:00
- MySQL Connector for Python (for MySQL-plugin)
Thanks to smith_fms and McBo from Funkmeldesystem.de - Forum for Inspiration and Groundwork!
2015-07-02 10:06:40 +02:00
### Code your own Plugin
2015-07-07 14:08:46 +02:00
See `plugins/README.md`