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

Prepare for new Version #341

Merged
merged 89 commits into from
Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
f31532d
Add files via upload
f-kessler Sep 19, 2017
c52c76a
Delete expressAlarm.py
f-kessler Sep 19, 2017
5503ac0
Delete config.template.ini
f-kessler Sep 19, 2017
990ef0f
Delete poc.py
f-kessler Sep 19, 2017
3532a64
Delete testdata.txt
f-kessler Sep 19, 2017
e770937
Add files via upload
f-kessler Sep 19, 2017
fbc3e53
Delete testdata.txt
f-kessler Sep 19, 2017
9ffa872
Add files via upload
f-kessler Sep 19, 2017
81a146b
Add files via upload
f-kessler Sep 19, 2017
46a53dd
Add files via upload
f-kessler Sep 19, 2017
f171bda
Add files via upload
f-kessler Sep 19, 2017
70d7698
Update testdata.txt
f-kessler Sep 19, 2017
7fd88a4
Update config.template.ini
f-kessler Sep 19, 2017
55f5529
Update README.md
f-kessler Sep 19, 2017
4a89ed4
Merge branch 'develop' into dev-express-alarm
Schrolli91 Sep 19, 2017
f73e6f2
edit changelog
Schrolli91 Sep 19, 2017
6af6981
changes for codacy
Schrolli91 Sep 20, 2017
0ed8df0
add ExpressAlarm to logging
Schrolli91 Sep 20, 2017
ae03473
Update config.template.ini
f-kessler Sep 21, 2017
0fc12ab
Changed naming and description
f-kessler Sep 23, 2017
07f42e1
Changed naming
f-kessler Sep 23, 2017
d30eee5
Updated naming
f-kessler Sep 23, 2017
06d36b3
Changed EA to multicastAlarm
f-kessler Sep 23, 2017
bd733b6
changed logging to multicastAlarm
f-kessler Sep 24, 2017
736d0f9
Update CHANGELOG.md
Schrolli91 Sep 24, 2017
f6e4c8d
Update testdata.txt
Schrolli91 Sep 24, 2017
d45ff3b
Merge branch 'develop' into dev-express-alarm
Schrolli91 Sep 24, 2017
8069ded
enumerate() instead of range(len())
f-kessler Sep 25, 2017
00e4e52
Update multicastAlarm.py
f-kessler Sep 25, 2017
3aa0b38
edit changelog with link
Schrolli91 Sep 29, 2017
fed717a
Merge branch 'develop' into dev-express-alarm
Schrolli91 Oct 1, 2017
c54bd55
change to data-field at checks
Schrolli91 Oct 1, 2017
b6077d5
enumerate value correction
f-kessler Oct 2, 2017
166dd3e
changed data buffering and updating for alarms
f-kessler Oct 3, 2017
6bcba28
changed to send complete data to multicastAlarm for buffering
f-kessler Oct 3, 2017
9aa163d
text for multicastAlarm config updated
f-kessler Oct 3, 2017
b52d972
edit debug msg
Schrolli91 Oct 3, 2017
f701b6a
del typ and freq in adding routine
Schrolli91 Oct 3, 2017
9c446b0
del typ and freq in adding routine
Schrolli91 Oct 3, 2017
9aaa8aa
remove typ from adding
Schrolli91 Oct 3, 2017
3220088
update indexes after remove of typ from multiList
f-kessler Oct 3, 2017
63f2e58
edit multicastAlarm
Schrolli91 Oct 3, 2017
fa90ba1
Merge branch 'develop' into dev-express-alarm
Schrolli91 Oct 3, 2017
cb0fd53
insert history flag for netIdent
Schrolli91 Oct 3, 2017
0f13853
edit CL
Schrolli91 Oct 3, 2017
a74ef0f
fix indentation level
Schrolli91 Oct 3, 2017
cea2667
fix indentation level
Schrolli91 Oct 3, 2017
de6073e
fix indentation level
Schrolli91 Oct 3, 2017
03cd002
Merge branch 'develop' into dev-express-alarm
Schrolli91 Oct 3, 2017
5b9c8d7
fix indentation level
Schrolli91 Oct 3, 2017
fca69b9
add placeholder (unused var)
Schrolli91 Oct 3, 2017
578750a
fix global definition issue
Schrolli91 Oct 3, 2017
bcdac6e
exclude netIdent_ric from multicastAlarm
f-kessler Oct 5, 2017
b7141d9
fixed remove of old RICs and replacement of data for calling alarmHan…
f-kessler Oct 9, 2017
7abc398
edit readme
Schrolli91 Oct 21, 2017
2626a04
edit CL
Schrolli91 Oct 21, 2017
c49c76d
edit installer
Schrolli91 Oct 21, 2017
9e0e43e
edit travis config
Schrolli91 Oct 21, 2017
9cad78f
edit CL
Schrolli91 Oct 21, 2017
66d2b4a
Merge branch 'develop' into remove_beta
Schrolli91 Oct 21, 2017
44821bb
edit CL
Schrolli91 Oct 21, 2017
c144205
edit version
Schrolli91 Oct 21, 2017
50a2c70
edit CL
Schrolli91 Oct 21, 2017
fb82b18
edit CL
Schrolli91 Oct 21, 2017
9d06e38
edit CL
Schrolli91 Oct 21, 2017
3265c51
Merge pull request #324 from Schrolli91/remove_beta
Schrolli91 Oct 21, 2017
3b22750
Merge branch 'develop' into dev-express-alarm
Schrolli91 Oct 21, 2017
9c0c5e9
Merge branch 'develop' into dev_netHistory
Schrolli91 Oct 21, 2017
59b78a4
multi delimiter and text RICs
f-kessler Oct 23, 2017
dbebc75
Merge pull request #317 from Schrolli91/dev_netHistory
Schrolli91 Dec 9, 2017
e9b7cf1
Merge branch 'develop' into dev-express-alarm
Schrolli91 Dec 18, 2017
568ead7
Merge branch 'develop' into dev-express-alarm
Schrolli91 Dec 18, 2017
8493234
fix http request plugin bug
Schrolli91 Dec 19, 2017
1771c2e
edit CL
Schrolli91 Dec 19, 2017
0539e33
fix copy fail
Schrolli91 Dec 19, 2017
4646012
comment for FE in source
Schrolli91 Dec 19, 2017
335a051
Merge pull request #338 from Schrolli91/fix_fm2_desc
Schrolli91 Dec 19, 2017
2b90ebe
edit CL
Schrolli91 Dec 19, 2017
02d7ba2
Merge branch 'develop' into fix_http_req
Schrolli91 Dec 19, 2017
4811477
Merge pull request #307 from f-kessler/dev-express-alarm
Schrolli91 Dec 19, 2017
76253ac
fix travis build fail
Schrolli91 Dec 19, 2017
fe96367
Merge pull request #339 from Schrolli91/fix_travis_fail
Schrolli91 Dec 19, 2017
4f0caae
Merge pull request #337 from Schrolli91/fix_http_req
Schrolli91 Dec 20, 2017
9fd0765
multimon and sdr-rtl as submodule
Schrolli91 Dec 20, 2017
b96e099
rev sub's to last release version
Schrolli91 Dec 21, 2017
9a63c25
del submodules
Schrolli91 Dec 21, 2017
a9ac73a
del submodules
Schrolli91 Dec 21, 2017
decd446
prepare new Version 2.3
Schrolli91 Dec 21, 2017
cc81c30
Merge branch 'master' into new_version
Schrolli91 Dec 21, 2017
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
*.log
config.ini
log/

\.project

\.pydevproject

\.settings/
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ sudo: required
branches:
only:
- master
- beta
- develop

before_script:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog


### __[2.3]__ - 22.12.2017
##### Added
- zuschaltbare POCSAG Multicast-Alarm Funktionalität [#307](https://github.com/Schrolli91/BOSWatch/pull/307)
- Flag in Config um nur letzte Net Ident oder gesamte Historie zu speichern [#317](https://github.com/Schrolli91/BOSWatch/pull/317)
##### Removed
- Beta Branch aus Readme, Installer und Travis-CI entfernt [#324](https://github.com/Schrolli91/BOSWatch/pull/324)
##### Fixed
- Bug in httpRequest Plugin (data Field wurde überschrieben) [#337](https://github.com/Schrolli91/BOSWatch/pull/337)
- Kommentar für FirEmergency Einstellung angepasst [#338](https://github.com/Schrolli91/BOSWatch/pull/338)


### __[v2.2.2]__ - 21.10.2017
##### Added
- Installations Script für Services [#316](https://github.com/Schrolli91/BOSWatch/pull/316)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
|Branch|Code Qualität|CI-Build|
|---|---|---|
|master|[![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)|
|beta|[![Codacy Badge](https://img.shields.io/codacy/grade/d512976554354a199555bd34ed179bb1/beta.svg)](https://www.codacy.com/app/Schrolli91/BOSWatch/dashboard?bid=4213030)|[![Build Status](https://travis-ci.org/Schrolli91/BOSWatch.svg?branch=beta)](https://travis-ci.org/Schrolli91/BOSWatch)|
|develop|[![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)|


Expand Down Expand Up @@ -52,6 +51,7 @@ unless you are developer you can use the develop-Branch - may be unstable!
- Ready for use BOSWatch as daemon
- possibility to start plugins asynchron
- NMA Error Handler
- multicastAlarm for transmission optimized networks


### Plugins
Expand Down
2 changes: 2 additions & 0 deletions boswatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@
# if given loglevel is debug:
if globalVars.config.getint("BOSWatch","loglevel") == 10:
configHandler.checkConfig("BOSWatch")
configHandler.checkConfig("multicastAlarm")
configHandler.checkConfig("Filters")
configHandler.checkConfig("FMS")
configHandler.checkConfig("ZVEI")
configHandler.checkConfig("POC")
Expand Down
20 changes: 20 additions & 0 deletions citest/config.httpRequest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ ricd = Unwetter
# Usually sent periodically, separated by comma
netIdent_ric = 0174760, 1398098


[multicastAlarm]
# Configure multicastAlarm if your POCSAG network uses an optimized transmission scheme for alarms with more than one RIC (often found in Swissphone networks).
# In this optimized transmission scheme, a POCSAG telegram with each RIC that needs to be alarmed will be send in a sequence. These telegrams are send without a text message. This sequence is directly followed by a telegram with a specific RIC and the text message that belongs to the sequnece send right before.
# A POCSAG pager (DME) can be configured to start an acoustic alarm if a specific RIC without text has been received. If afterwards the specific RIC with the text message will be received, the pager will show the message in it's display.
# multicastAlarm enables BOSwatch to process the all received RICs joined with the text message.
#
# enable multicastAlarm (0 - off | 1 - on)
multicastAlarm = 0

# time limit for alarms that do not belong to the multicastAlarm sequence in seconds
multicastAlarm_ignore_time = 15

# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence) (can be empty)
multicastAlarm_delimiter_ric =

# multicastAlarm RIC that is used to send the text message
multicastAlarm_ric =


[Filters]
# RegEX Filter Configuration
# http://www.regexr.com/ - RegEX Test Tool an Documentation
Expand Down
20 changes: 20 additions & 0 deletions citest/config.mysql.ini
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ ricd = Unwetter
# Usually sent periodically, separated by comma
netIdent_ric = 0174760, 1398098


[multicastAlarm]
# Configure multicastAlarm if your POCSAG network uses an optimized transmission scheme for alarms with more than one RIC (often found in Swissphone networks).
# In this optimized transmission scheme, a POCSAG telegram with each RIC that needs to be alarmed will be send in a sequence. These telegrams are send without a text message. This sequence is directly followed by a telegram with a specific RIC and the text message that belongs to the sequnece send right before.
# A POCSAG pager (DME) can be configured to start an acoustic alarm if a specific RIC without text has been received. If afterwards the specific RIC with the text message will be received, the pager will show the message in it's display.
# multicastAlarm enables BOSwatch to process the all received RICs joined with the text message.
#
# enable multicastAlarm (0 - off | 1 - on)
multicastAlarm = 0

# time limit for alarms that do not belong to the multicastAlarm sequence in seconds
multicastAlarm_ignore_time = 15

# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence) (can be empty)
multicastAlarm_delimiter_ric =

# multicastAlarm RIC that is used to send the text message
multicastAlarm_ric =


[Filters]
# RegEX Filter Configuration
# http://www.regexr.com/ - RegEX Test Tool an Documentation
Expand Down
18 changes: 17 additions & 1 deletion citest/testdata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ POCSAG512: Address: 1000003 Function: 3 Alpha: BOSWatch-Test: okay
POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test ÖÄÜß: okay
POCSAG512: Address: 1200001 Function: 1 Alpha: BOSWatch-Test öäü: okay

# witch csv
# with csv
POCSAG512: Address: 1234567 Function: 1 Alpha: BOSWatch-Test: with csv

# without csv
Expand Down Expand Up @@ -86,6 +86,22 @@ POCSAG1200: Address: 7777777 Function: 1 Alpha: BOSWatch-Test: denied
POCSAG1200: Address: 0000004 Function: 1 Alpha: BOSWatch-Test: out of filter start
POCSAG1200: Address: 9000000 Function: 1 Alpha: BOSWatch-Test: out of filter end

#Probealram
POCSAG1200: Address: 0871004 Function: 1 Alpha: Dies ist ein Probealarm!
## Multicast Alarm
POCSAG1200: Address: 0871002 Function: 0 Alpha: <EOT><FF>
POCSAG1200: Address: 0860001 Function: 0
POCSAG1200: Address: 0860002 Function: 0
POCSAG1200: Address: 0860003 Function: 0
POCSAG1200: Address: 0860004 Function: 0
POCSAG1200: Address: 0860005 Function: 0
POCSAG1200: Address: 0860006 Function: 0
POCSAG1200: Address: 0860007 Function: 0
POCSAG1200: Address: 0860008 Function: 0
POCSAG1200: Address: 0860009 Function: 0
POCSAG1200: Address: 0860010 Function: 0
POCSAG1200: Address: 0871003 Function: 0 Alpha: B2 Feuer Gebäude Pers in Gefahr. bla bla bla<NUL>

# regEx-Filter?


Expand Down
21 changes: 21 additions & 0 deletions config/config.template.ini
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,27 @@ ricd = Unwetter
# RIC for net identification
# Usually sent periodically, separated by comma
netIdent_ric = 0174760, 1398098
# you can hold one entry per netIdent_ric [0] or the whole history [1]
netIdent_history = 0


[multicastAlarm]
# Configure multicastAlarm if your POCSAG network uses an optimized transmission scheme for alarms with more than one RIC (often found in Swissphone networks).
# In this optimized transmission scheme, a POCSAG telegram with each RIC that needs to be alarmed will be send in a sequence. These telegrams are send without a text message. This sequence is directly followed by a telegram with a specific RIC and the text message that belongs to the sequnece send right before.
# A POCSAG pager (DME) can be configured to start an acoustic alarm if a specific RIC without text has been received. If afterwards the specific RIC with the text message will be received, the pager will show the message in it's display.
# multicastAlarm enables BOSwatch to process the all received RICs joined with the text message.
#
# enable multicastAlarm (0 - off | 1 - on)
multicastAlarm = 0

# time limit for alarms that do not belong to the multicastAlarm sequence in seconds
multicastAlarm_ignore_time = 15

# multicastAlarm delimiter RIC (usually used as a starting point for a alarm sequence) (can be empty)
multicastAlarm_delimiter_ric =

# multicastAlarm RIC that is used to send the text message
multicastAlarm_ric =


[Filters]
Expand Down
35 changes: 26 additions & 9 deletions includes/decoders/poc.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,40 @@ def decode(freq, decoded):

if re.search("[0-9]{7}", poc_id) and re.search("[1-4]{1}", poc_sub): #if POC is valid
if isAllowed(poc_id):

# check for double alarm
if doubleFilter.checkID("POC", poc_id+poc_sub, poc_text):
logging.info("POCSAG%s: %s %s %s ", bitrate, poc_id, poc_sub, poc_text)
data = {"ric":poc_id, "function":poc_sub, "msg":poc_text, "bitrate":bitrate, "description":poc_id}
# Add function as character a-d to dataset
data["functionChar"] = data["function"].replace("1", "a").replace("2", "b").replace("3", "c").replace("4", "d")

logging.info("POCSAG%s: %s %s %s ", data["bitrate"], data["ric"], data["function"], data["msg"])

# If enabled, look up description
if globalVars.config.getint("POC", "idDescribed"):
from includes import descriptionList
data["description"] = descriptionList.getDescription("POC", poc_id+data["functionChar"])
# processing the alarm
try:
from includes import alarmHandler
alarmHandler.processAlarmHandler("POC", freq, data)
except:
logging.error("processing alarm failed")
logging.debug("processing alarm failed", exc_info=True)
data["description"] = descriptionList.getDescription("POC", data["ric"]+data["functionChar"])

# multicastAlarm processing if enabled and a message without text or delimiter RIC or netIdent_ric received
if globalVars.config.getint("multicastAlarm", "multicastAlarm") and data["ric"] != globalVars.config.get("POC", "netIdent_ric") and (data["msg"] == "" or data["ric"] in globalVars.config.get("multicastAlarm", "multicastAlarm_delimiter_ric")):
logging.debug(" - multicastAlarm without msg")
from includes import multicastAlarm
multicastAlarm.newEntrymultiList(data)

# multicastAlarm processing if enabled and alarm message has been received
elif globalVars.config.getint("multicastAlarm", "multicastAlarm") and data["msg"] != "" and data["ric"] in globalVars.config.get("multicastAlarm", "multicastAlarm_ric"):
logging.debug(" - multicastAlarm with message")
from includes import multicastAlarm
multicastAlarm.multicastAlarmExec(freq, data)

else:
# processing the alarm
try:
from includes import alarmHandler
alarmHandler.processAlarmHandler("POC", freq, data)
except:
logging.error("processing alarm failed")
logging.debug("processing alarm failed", exc_info=True)
# in every time save old data for double alarm
doubleFilter.newEntry(poc_id+poc_sub, poc_text)
else:
Expand Down
4 changes: 2 additions & 2 deletions includes/globalVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"""

# version info
versionNr = "2.2.2"
versionNr = "2.3"
branch = "master"
buildDate = "21.10.2017"
buildDate = "22/12/2017"


# Global variables
Expand Down
63 changes: 63 additions & 0 deletions includes/multicastAlarm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

"""
multicastAlarm is the function to enable BOSwatch to work in networks that optimise the transmission of POCSAG telegrams

@author: Fabian Kessler

@requires: Configuration has to be set in the config.ini
"""

import logging # Global logger
import time # timestamp for multicastAlarm

from includes import globalVars # Global variables

#
# ListStructure [0..n] = (Data, TimeStamp)
#
multiList = []

def newEntrymultiList(data):
"""
add entry to multi alarm list and remove old entries

@return: nothing
"""
global multiList
timestamp = int(time.time())
# multicastAlarm processing if enabled and delimiter RIC has been received
if data['ric'] == globalVars.config.get("multicastAlarm", "multicastAlarm_delimiter_ric"):
multiList = []
logging.debug("delimiter RIC received - buffer cleared")
else:
multiList.append([data, timestamp])
logging.debug("Added %s to multiList", data['ric'])
# check for old entries in multiList
for (xData, xTimestamp) in multiList[:]:
if xTimestamp < timestamp-globalVars.config.getint("multicastAlarm", "multicastAlarm_ignore_time"):
multiList.remove([xData, xTimestamp])
logging.debug("RIC %s removed - %s sec. older than current timestamp", xData['ric'], xTimestamp-timestamp)


def multicastAlarmExec(freq, data):
"""
call alarmHandler for every entry in multiList

@return: nothing
"""
logging.debug("data before update from multiList: %s", data)
for (xData, _) in multiList:
#update data with values multiList
data['ric'] = xData['ric']
data['function'] = xData['function']
data['functionChar'] = xData['functionChar']
data['description'] = xData['description']
logging.debug("data after update from multiList: %s", data)
try:
from includes import alarmHandler
alarmHandler.processAlarmHandler("POC", freq, data)
except:
logging.error("processing alarm failed")
logging.debug("processing alarm failed", exc_info=True)
1 change: 0 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ for (( i=1; i<=$#; i=$i+2 )); do
-b|--branch)
case $arg2 in
dev|develop) echo " !!! WARNING: you are using the DEV BRANCH !!! "; branch=dev ;;
beta) echo " !!! WARNING: you are using the BETA BRANCH !!! "; branch=beta ;;
*) branch=master ;;
esac ;;

Expand Down
39 changes: 21 additions & 18 deletions plugins/MySQL/MySQL.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
from includes.helper import configHandler

def isSignal(poc_id):
"""
@type poc_id: string
@param poc_id: POCSAG Ric
"""
@type poc_id: string
@param poc_id: POCSAG Ric

@requires: Configuration has to be set in the config.ini
@requires: Configuration has to be set in the config.ini

@return: True if the Ric is Signal, other False
@exception: none
"""
# If RIC is Signal return True, else False
if globalVars.config.get("POC", "netIdent_ric"):
if poc_id in globalVars.config.get("POC", "netIdent_ric"):
logging.info("RIC %s is net ident", poc_id)
return True
else:
logging.info("RIC %s is no net ident", poc_id)
return False
@return: True if the Ric is Signal, other False
@exception: none
"""
# If RIC is Signal return True, else False
if globalVars.config.get("POC", "netIdent_ric"):
if poc_id in globalVars.config.get("POC", "netIdent_ric"):
logging.info("RIC %s is net ident", poc_id)
return True
else:
logging.info("RIC %s is no net ident", poc_id)
return False


##
Expand Down Expand Up @@ -111,11 +111,14 @@ def run(typ,freq,data):

elif typ == "POC":
if isSignal(data["ric"]):
cursor.execute("UPDATE "+globalVars.config.get("MySQL","tableSIG")+" SET time = NOW() WHERE ric = '"+data["ric"]+"';")
if cursor.rowcount == 0:
if globalVars.config.getint("POC","netIdent_histry"):
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');")
else:
cursor.execute("UPDATE "+globalVars.config.get("MySQL","tableSIG")+" SET time = NOW() WHERE ric = '"+data["ric"]+"';")
if cursor.rowcount == 0:
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tableSIG")+" (time,ric) VALUES (NOW(), '"+data["ric"]+"');")
else:
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (time, ric, function, functionChar, msg, bitrate, description) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"], data["functionChar"], data["msg"], data["bitrate"], data["description"]))
cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (time, ric, function, functionChar, msg, bitrate, description) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"], data["functionChar"], data["msg"], data["bitrate"], data["description"]))

else:
logging.warning("Invalid Typ: %s", typ)
Expand Down
2 changes: 1 addition & 1 deletion plugins/firEmergency/firEmergency.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
firEmergency-Plugin to dispatch ZVEI- and POCSAG - messages to firEmergency

firEmergency configuration:
- set input to "FMS32" at Port 5555
- set input to "Standartschnittstelle" at Port 5555

@autor: Smith-fms

Expand Down
Loading