Schrolli91 / BOSWatch

Python Script to process input data from rtl_fm and multimon-NG - multiple Plugin support
https://bwcc.boswatch.de
GNU General Public License v2.0
133 stars 59 forks source link

Error PPM beim starten #472

Closed samazaphikel closed 4 years ago

samazaphikel commented 4 years ago

Bei Fragen und Problemen zu BOSWatch oder Plugins bitte unten gennante Informationen angeben:

Hallo,

ich habe gerade versucht BosWatch auf einem Raspberry zu starten.

sudo python boswatch.py -f 168.600M -a POC512 Ich bekomme diese Ausgabe in der Konsole

     ____  ____  ______       __      __       __
    / __ )/ __ \/ ___/ |     / /___ _/ /______/ /_
   / __  / / / /\__ \| | /| / / __ `/ __/ ___/ __ \
  / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / /
 /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/
            German BOS Information Script
          by Bastian Schroll, Jens Herrmann

SW Version:     2.5.1
Branch:         master
Build Date:     28.04.2020

Frequency:   ####M
Device-ID:   0
Error in PPM:    0
Active Demods:   1
- POC512
Squelch: 0
Gain: 100

Wie bekomme ich nun das richtig ans laufen?

Smith-fms commented 4 years ago

sieht eigentlich gut aus.

Welcher SDR Stick und poste mal was die Ausgabe ergibt, wenn du folgende Befehlszeile verwendest:

sudo python boswatch.py -f ####M -a POC512 -v

Je nach Stick musst du das -e flag entsprechend nutzen. Den Wert kannst du mit kalibrate versuchen zu ermitteln. Link zu einem Turorial: https://pysselilivet.blogspot.com/2019/08/sdr-calibrate-with-kalibrate-rtl.html

flothi commented 4 years ago

Das läuft an sich schon, error ppm heißt nicht, dass ein Fehler vorliegt. Das ist eher die Abweichung des Sticks von Nominal- zu Realfrequenz

flothi commented 4 years ago

Nachtrag: Alarmiert wird üblicherweise im Oberband

hias911 commented 4 years ago

Wie setzte ich das mit -e flag um???

Smith-fms commented 4 years ago

Das läuft an sich schon, error ppm heißt nicht, dass ein Fehler vorliegt. Das ist eher die Abweichung des Sticks von Nominal- zu Realfrequenz

Jetzt hab ich erst verstanden, worauf er sich bezogen hat. :) Danke @flothi, ich hab das eher als selbstverständlich angenommen.

Also, passende Frequenz raus suchen und nochmal probieren. Und sollte nichts, also gar nichts kommen, bleibt der Schritt mit der Error Correction. Dieser hält einen, je nach Stick, vom decodieren ab.

Smith-fms commented 4 years ago

Wie setzte ich das mit -e flag um???

Was genau meinst du?

Du ermittelst die Abweichung in PPM anhand der Anleitung. Es sollte dann ein Wert raus kommen (dieser ist abhängig vom Stick) welcher dann mit -e <WERT> / Beispiel -e 30 angegeben wird.

hias911 commented 4 years ago

Ja das hab ich bekomme 28 PPM angezeigt.

Aber wie oder wo korrigiere ich den Wert bei BOSWatch?

Smith-fms commented 4 years ago

Hab ich bereits schrieben.

-e 28 hinter die Frequenz oder ans ende.

hias911 commented 4 years ago

Super Danke

hias911 commented 4 years ago

Kannst du mir beim Thema Whatsapp helfen siehe #470

Smith-fms commented 4 years ago

nope, nutze ich nicht.

samazaphikel commented 4 years ago

Huch, so viele Antworten. Damit hatte ich jetzt nicht gerechnet. Ich gehe das mal Stückweise durch.

Welcher SDR Stick Habe den hier geholt: https://www.amazon.de/gp/product/B01GDN1T4S/

poste mal was die Ausgabe ergibt, wenn du folgende Befehlszeile verwendest:

sudo python boswatch.py -f ####M -a POC512 -v
pi@raspberrypi:/opt/boswatch$ sudo python boswatch.py -f ####M -a POC512 -v
26.08.2020 20:43:56 - boswatch        [DEBUG   ] BOSWatch has started
26.08.2020 20:43:56 - boswatch        [DEBUG   ] Logfiles cleared
26.08.2020 20:43:56 - boswatch        [DEBUG   ] SW Version:    2.5.1
26.08.2020 20:43:56 - boswatch        [DEBUG   ] Branch:                master
26.08.2020 20:43:56 - boswatch        [DEBUG   ] Build Date:    28.04.2020
26.08.2020 20:43:56 - boswatch        [DEBUG   ] Python Vers:   2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0]
26.08.2020 20:43:56 - boswatch        [DEBUG   ] BOSWatch given arguments
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Frequency: 168600000
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Device: 0
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - PPM Error: 0
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Squelch: 0
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Gain: 100
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Demod: POC512
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Use /var/log: False
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Verbose Mode: True
26.08.2020 20:43:56 - boswatch        [DEBUG   ]  - Quiet Mode: False
     ____  ____  ______       __      __       __
    / __ )/ __ \/ ___/ |     / /___ _/ /______/ /_
   / __  / / / /\__ \| | /| / / __ `/ __/ ___/ __ \
  / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / /
 /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/
            German BOS Information Script
          by Bastian Schroll, Jens Herrmann

SW Version:     2.5.1
Branch:         master
Build Date:     28.04.2020

Frequency:   ####M
Device-ID:   0
Error in PPM:    0
Active Demods:   1
- POC512
Squelch: 0
Gain: 100
Verbose Mode!

26.08.2020 20:43:56 - boswatch        [DEBUG   ] reading config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [BOSWatch] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - loglevel = 10
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - backupcount = 7
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - processalarmasync = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - useregexfilter = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - doublefilter_ignore_entries = 10
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - doublefilter_ignore_time = 5
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - doublefilter_check_msg = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - writemultimonraw = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [multicastAlarm] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - multicastalarm = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - multicastalarm_ignore_time = 15
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - multicastalarm_delimiter_ric =
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - multicastalarm_ric =
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [Filters] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [FMS] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - iddescribed = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - checkcrc = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [ZVEI] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - iddescribed = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [POC] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - allow_ric =
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - deny_ric = 123456
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - filter_range_start = 0000000
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - filter_range_end = 9999999
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - iddescribed = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - onlysubric = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - rica = Feuer
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - ricb = TH
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - ricc = AGT
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - ricd = Unwetter
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - netident_ric = 0174760, 1398098
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - netident_history = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - geo_enable = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - geo_format = #C(\d{2})(\d{5}),(\d{2})(\d{5})#
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - geo_order = LON, lon, LAT, lat
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [Plugins] from config file
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - mysql = 1
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - httprequest = 1
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - email = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - bosmon = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - firemergency = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - jsonsocket = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - sms = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - sms77 = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - ffagent = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - pushover = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - telegram = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - yowsup = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - hue = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - divera = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - gpiocontrol = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ]  - template = 0
26.08.2020 20:43:56 - configHandler   [DEBUG   ] read [Filters] from config file
26.08.2020 20:43:56 - boswatch        [DEBUG   ] set loglevel of fileHandler to: 10
26.08.2020 20:43:56 - boswatch        [DEBUG   ] set backupCount of fileHandler to: 7
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] loading plugins
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Search in plugin folder
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] hue
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Pushover
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] SMS
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Divera
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [ENABLED ] httpRequest
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] template
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] BosMon
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] firEmergency
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] jsonSocket
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] FFAgent
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [ENABLED ] MySQL
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] gpiocontrol
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] yowsup
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] eMail
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Sms77
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Telegram
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] load plugin: httpRequest
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] call httpRequest.onLoad()
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] load plugin: MySQL
26.08.2020 20:43:56 - pluginLoader    [DEBUG   ] call MySQL.onLoad()
26.08.2020 20:43:56 - boswatch        [DEBUG   ] starting rtl_fm
26.08.2020 20:43:59 - checkSubprocesses [DEBUG   ]
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
usb_claim_interface error -6
Failed to open rtlsdr device #0.

26.08.2020 20:43:59 - boswatch        [CRITICAL] cannot start rtl_fm
26.08.2020 20:43:59 - boswatch        [DEBUG   ] cannot start rtl_fm
Traceback (most recent call last):
  File "boswatch.py", line 308, in <module>
    checkSubprocesses.checkRTL()
  File "/opt/boswatch/includes/checkSubprocesses.py", line 27, in checkRTL
    raise OSError("starting rtl_fm returns an error")
OSError: starting rtl_fm returns an error
26.08.2020 20:43:59 - boswatch        [WARNING ] SystemExit received
26.08.2020 20:43:59 - boswatch        [DEBUG   ] BOSWatch shuting down
26.08.2020 20:43:59 - boswatch        [DEBUG   ] terminate rtl_fm (2567)
26.08.2020 20:43:59 - boswatch        [DEBUG   ] rtl_fm terminated
26.08.2020 20:43:59 - boswatch        [DEBUG   ] exiting BOSWatch
26.08.2020 20:43:59 - boswatch        [DEBUG   ] close Logging
26.08.2020 20:43:59 - boswatch        [INFO    ] BOSWatch exit()

Und die Kalibrierung:

sudo kal -c 53
Found 1 device(s):
  0:  Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 270833.002142 Hz
[R82XX] PLL not locked!
kal: Calculating clock frequency offset.
Using GSM-900 channel 53 (945.6MHz)
Tuned to 945.600000MHz (reported tuner error: 0Hz)
average         [min, max]      (range, stddev)
- 134Hz         [-165, -107]    (58, 15.867527)
overruns: 0
not found: 0
average absolute error: 0.141 ppm
Smith-fms commented 4 years ago

usb_claim_interface error -6 Hattest du den Pi neu gestartet seit der Installtion? Wenn nicht, dann einmal ein sudo reboot und das sollte ohne ein Problem laufen, da bei der Installation das ganze eigentlich auf der Blacklist laufen sollte und der Stick durch das System zu nutzen sein sollte. Auch weil er in deinem ersten Post ja lief. Error werden immer sofort, auch ohne -v flag angezeigt. average absolute error: 0.141 ppm Damit brauchst du dann kein -e flag setzen. Die Änderung auf das Oberband sollte dann reichen.

samazaphikel commented 4 years ago

Auch nach dem reboot bei der kalibrierung den Error

pi@raspberrypi:~$ sudo kal -c 5
Found 1 device(s):
  0:  Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Exact sample rate is: 270833.002142 Hz
[R82XX] PLL not locked!
kal: Calculating clock frequency offset.
Using GSM-900 channel 5 (936.0MHz)
Tuned to 936.000000MHz (reported tuner error: 0Hz)
average         [min, max]      (range, stddev)
- 656Hz         [-687, -630]    (57, 15.198152)
overruns: 0
not found: 0
average absolute error: 0.701 ppm

Nur diesesmal auf Kanal 5 gemacht, da der jetzt der stärkste ist.

samazaphikel commented 4 years ago

Ohne weitere Kalibrierung, ich empfange etwas mit sudo python boswatch.py -f ####M -a POC1200, ob es auch das richtige ist wird sich noch zeigen

Allerdings mit MySQL Fehler

[ERROR ] cannot connect to MySQL

Ich habe die Zugangsdaten nzu MySQL geprüft, die sind definitiv richtig. Ich habe 1 zu 1 die aus der config.ini genommen und damit einen user angelegt, über Commandozeile kann ich mich mitmysql -u boswatch -p und dem Password rooteinloggen. In der config.ini steht:

dbserver = localhost dbport = 3306 dbuser = boswatch dbpassword = root database = boswatch

hat jemand eine Idee, woran das liegen könnte?

flothi commented 4 years ago

Ohne weitere Kalibrierung, ich empfange etwas mit sudo python boswatch.py -f ####M -a POC1200, ob es auch das richtige ist wird sich noch zeigen

Allerdings mit MySQL Fehler

[ERROR ] cannot connect to MySQL hat jemand eine Idee, woran das liegen könnte?

Starte mal mit der Option -v und poste ein paar mehr Infos

samazaphikel commented 4 years ago

Hi,

Hier die Ausgabe dazu, habe das gerade etwas abgeschnitten. Kam mehrmals MySQL fehler dazu

   ____  ____  ______       __      __       __
    / __ )/ __ \/ ___/ |     / /___ _/ /______/ /_
   / __  / / / /\__ \| | /| / / __ `/ __/ ___/ __ \
  / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / /
 /_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/
            German BOS Information Script
          by Bastian Schroll, Jens Herrmann

SW Version:     2.5.1
Branch:         master
Build Date:     28.04.2020

Frequency:   ####M
Device-ID:   0
Error in PPM:    0
Active Demods:   1
- POC1200
Squelch: 0
Gain: 100
Verbose Mode!

27.08.2020 22:14:42 - boswatch        [DEBUG   ] reading config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [BOSWatch] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - loglevel = 10
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - backupcount = 7
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - processalarmasync = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - useregexfilter = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - doublefilter_ignore_entries = 10
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - doublefilter_ignore_time = 5
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - doublefilter_check_msg = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - writemultimonraw = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [multicastAlarm] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - multicastalarm = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - multicastalarm_ignore_time = 15
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - multicastalarm_delimiter_ric =
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - multicastalarm_ric =
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [Filters] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [FMS] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - iddescribed = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - checkcrc = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [ZVEI] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - iddescribed = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [POC] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - allow_ric =
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - deny_ric = 123456
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - filter_range_start = 0000000
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - filter_range_end = 9999999
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - iddescribed = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - onlysubric = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - rica = Feuer
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - ricb = TH
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - ricc = AGT
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - ricd = Unwetter
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - netident_ric = 0174760, 1398098
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - netident_history = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - geo_enable = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - geo_format = #C(\d{2})(\d{5}),(\d{2})(\d{5})#
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - geo_order = LON, lon, LAT, lat
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [Plugins] from config file
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - mysql = 1
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - httprequest = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - email = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - bosmon = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - firemergency = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - jsonsocket = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - sms = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - sms77 = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - ffagent = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - pushover = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - telegram = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - yowsup = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - hue = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - divera = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - gpiocontrol = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ]  - template = 0
27.08.2020 22:14:42 - configHandler   [DEBUG   ] read [Filters] from config file
27.08.2020 22:14:42 - boswatch        [DEBUG   ] set loglevel of fileHandler to: 10
27.08.2020 22:14:42 - boswatch        [DEBUG   ] set backupCount of fileHandler to: 7
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] loading plugins
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Search in plugin folder
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] hue
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Pushover
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] SMS
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Divera
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] httpRequest
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] template
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] BosMon
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] firEmergency
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] jsonSocket
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] FFAgent
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [ENABLED ] MySQL
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] gpiocontrol
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] yowsup
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] eMail
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Sms77
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] Plugin [DISABLED] Telegram
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] load plugin: MySQL
27.08.2020 22:14:42 - pluginLoader    [DEBUG   ] call MySQL.onLoad()
27.08.2020 22:14:42 - boswatch        [DEBUG   ] starting rtl_fm
27.08.2020 22:14:45 - boswatch        [DEBUG   ] starting multimon-ng
27.08.2020 22:14:48 - boswatch        [DEBUG   ] start decoding
27.08.2020 22:15:45 - decoder         [DEBUG   ] received POCSAG
27.08.2020 22:15:45 - poc             [DEBUG   ] POCSAG Bitrate: 1200
27.08.2020 22:15:45 - poc             [INFO    ] RIC 1104008 in between filter range
27.08.2020 22:15:45 - doubleFilter    [DEBUG   ] checkID: 11040081 (<STX>)
27.08.2020 22:15:45 - poc             [INFO    ] POCSAG1200: 1104008 1 <STX>
27.08.2020 22:15:45 - alarmHandler    [DEBUG   ] [  ALARM  ]
27.08.2020 22:15:45 - alarmHandler    [DEBUG   ] call Plugin: MySQL
27.08.2020 22:15:45 - configHandler   [DEBUG   ] read [MySQL] from config file
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - dbserver = localhost
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - dbport = 3306
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - dbuser = boswatch
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - dbpassword = ***
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - database = boswatch
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - tablefms = bos_fms
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - tablezvei = bos_zvei
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - tablepoc = bos_pocsag
27.08.2020 22:15:45 - configHandler   [DEBUG   ]  - tablesig = bos_signal
27.08.2020 22:15:45 - MySQL           [DEBUG   ] connect to MySQL
27.08.2020 22:15:45 - MySQL           [ERROR   ] cannot connect to MySQL
27.08.2020 22:15:45 - MySQL           [DEBUG   ] cannot connect to MySQL
Traceback (most recent call last):
  File "/opt/boswatch/plugins/MySQL/MySQL.py", line 94, in run
    connection = mysql.connector.connect(host = globalVars.config.get("MySQL","dbserver"), port = globalVars.config.get("MySQL","dbport"), user = globalVars.config.get("MySQL","dbuser"), passwd = globalVars.config.get("MySQL","dbpassword"), db = globalVars.config.get("MySQL","database"), charset = 'utf8mb4', collation = 'utf8mb4_general_ci')
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/__init__.py", line 44, in Connect
    return MySQLConnection(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 107, in __init__
    self.connect(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 341, in connect
    self.config(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/connection.py", line 220, in config
    collation)[0]
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/constants.py", line 742, in get_charset_info
    raise ProgrammingError("Character set '%s' unknown." % (charset))
ProgrammingError: Character set 'utf8mb4' unknown.
27.08.2020 22:15:45 - MySQL           [DEBUG   ] close MySQL
27.08.2020 22:15:45 - alarmHandler    [DEBUG   ] return from: MySQL
27.08.2020 22:15:45 - alarmHandler    [DEBUG   ] [END ALARM]
27.08.2020 22:15:45 - doubleFilter    [DEBUG   ] Added 11040081 to doubleList
27.08.2020 22:15:46 - decoder         [DEBUG   ] received POCSAG
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG Bitrate: 1200
27.08.2020 22:15:46 - poc             [INFO    ] RIC 0000000 out of filter range
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG1200: 0000000 is not allowed
27.08.2020 22:15:46 - decoder         [DEBUG   ] received POCSAG
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG Bitrate: 1200
27.08.2020 22:15:46 - poc             [INFO    ] RIC 0000000 out of filter range
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG1200: 0000000 is not allowed
27.08.2020 22:15:46 - decoder         [DEBUG   ] received POCSAG
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG Bitrate: 1200
27.08.2020 22:15:46 - poc             [INFO    ] RIC 0000000 out of filter range
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG1200: 0000000 is not allowed
27.08.2020 22:15:46 - decoder         [DEBUG   ] received POCSAG
27.08.2020 22:15:46 - poc             [DEBUG   ] POCSAG Bitrate: 1200
27.08.2020 22:15:46 - poc             [INFO    ] RIC 0000001 in between filter range
27.08.2020 22:15:46 - doubleFilter    [DEBUG   ] checkID: 00000011 ()
27.08.2020 22:15:46 - poc             [INFO    ] POCSAG1200: 0000001 1
27.08.2020 22:15:46 - alarmHandler    [DEBUG   ] [  ALARM  ]
flothi commented 4 years ago

ProgrammingError: Character set 'utf8mb4' unknown.

Das ist der Fehler - die Daten scheinen richtig eingegeben zu sein.

samazaphikel commented 4 years ago

Ja, ich habe gerade eine Vermutung... Auf dem aktuellen Raspberry Image ist ein MariaDB Server und der kommt wohl mit utf8mb4 nicht klar.

Ich habe gerade die passende Zeile in der MySQL.py angepasst, nun geht es.

`connection = mysql.connector.connect(host = globalVars.config.get("MySQL","dbserver"), port = globalVars.config.get("MySQL","dbport"), user = globalVars.config.get("MySQL","dbuser"), passwd = globalVars.config.get("MySQL","dbpassword"), db = globalVars.config.get("MySQL","database"), charset = 'utf8mb4', collation = 'utf8mb4_general_ci')`

Es hat nicht jemand zufällig ein passendes Raspberry PI Image mit passenden Paketen und installation fertig, dass auch zum Download steht?

flothi commented 4 years ago

https://github.com/Schrolli91/BOSWatch/issues/445#issuecomment-617350172

Schau mal, ob der Hinweis hilft.

Grundsätzlich kann MariaDB das: https://mariadb.com/kb/en/supported-character-sets-and-collations/

samazaphikel commented 4 years ago

#445 (comment)

Schau mal, ob der Hinweis hilft.

Grundsätzlich kann MariaDB das: https://mariadb.com/kb/en/supported-character-sets-and-collations/

Mein Edit hat sich überschnitten ;-) Habe das gerade angepasst. Nun werden die Daten auch in MySQL gespeichert

lgremme commented 4 years ago

Probier mal folgendes:

python
import mysql
import mysql.connector

connection = mysql.connector.connect(host = '127.0.0.1', port = '3306', user = 'root', passwd = 'meinpasswort', db = 'boswatch', charset = 'utf8mb4', collation = 'utf8mb4_general_ci')

Wenn der Verbindungsaufbau mit der Connection fehlschlägt, dann ist der Datenbank-Connector defekt. In der Default-Installation (master) ist dieser noch massiv veraltet (installiert wird Version 1.0.9 und mittlerweile gibt es 8.0.19 oder höher).

apt-get install python-pip
pip install mysql-connector-python

Alternativ könntest du das Installationsskript aus dem Devel-Bereich testen.

samazaphikel commented 4 years ago

2 abschliessende Fragen,

Die übermittelten Nachrichten sind ja verschlüsselt, kann man die entschlüsseln? BosWatch3, schon zu empfhelen?

flothi commented 4 years ago

2 abschliessende Fragen,

Die übermittelten Nachrichten sind ja verschlüsselt, kann man die entschlüsseln? BosWatch3, schon zu empfhelen?

BW3 ist noch in der Entwicklung; Verschlüsselung wird derzeit nicht unterstützt

(btw, bitte nicht x Themen in einem Issue machen, das wird nachher echt schwer nachzuvollziehen. Ich mache daher mal hier zu, da es ja grds. läuft)