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

Broadcastify System ID string/number config.json issue #858

Closed
james-coder opened this issue Nov 12, 2023 · 3 comments
Closed

Broadcastify System ID string/number config.json issue #858

james-coder opened this issue Nov 12, 2023 · 3 comments

Comments

@james-coder
Copy link
Contributor

I've recently compiled trunk-recorder on a WSL2 Ubuntu 20.04 system. (Using usbipd.)

I used a previously working config.json from another computer where "broadcastifySystemId": "86753" (Notice the quotes around the number.) This was working fine for me with no errors.

When I compiled it for the WSL2 Ubuntu 20.04 system, I get the error:

...
-------------------------------------
SYSTEMS
-------------------------------------
...
[2023-11-11 21:12:58.423169] (info)   Broadcastify API Key: BROADCASTIFYAPIKEY
[2023-11-11 21:12:58.423216] (error)   Failed parsing Config: [json.exception.type_error.302] type must be number, but is string

Which leads me to think it wants a int there instead instead of a string. I change it to be "broadcastifySystemId": 86753 , but then I get this error:

...
-------------------------------------
PLUGINS
-------------------------------------
...
[2023-11-11 21:18:04.382722] (info)   Setting up plugin -  Name: broadcastify_uploader	 Library file: libbroadcastify_uploader.so
[2023-11-11 21:18:04.383107] (info)   Broadcastify Server: https://api.broadcastify.com/call-upload
[2023-11-11 21:18:04.383222] (error)   Failed parsing Config: [json.exception.type_error.302] type must be string, but is number

So basically, I getting one error message that says it should be an integer (in SYSTEMS), I change it to an integer, then I get another error message saying it should be a string (in PLUGINS).

The documentation at https://github.com/robotastic/trunk-recorder/blob/master/docs/CONFIGURE.md#system-object says:

broadcastifySystemId: if broadcastifyCallsServer is set System ID for Broadcastify Calls (this is an integer, and different from the RadioReference system ID)

The broadcastify plugins code is in https://github.com/robotastic/trunk-recorder/blob/47460b1582ec5187ed99eac0df93ae41ab93017f/plugins/broadcastify_uploader/broadcastify_uploader.cc

@james-coder
Copy link
Contributor Author

Here is my config.json:

{
    "ver": 2,
    "defaultMode": "analog",
    "sources": [
        {
            "center": 123456789,
            "rate": 20000000,
            "error": 0,
            "gain": 0,
            "ifGain": 24,
            "bbGain": 28,
            "digitalRecorders": 3,
            "analogRecorders": 8,
            "debugRecorders": 0,
            "driver": "osmosdr",
	    "logFile": true,
	    "consoleLog": false
        }
    ],
    "systems": [{
        "control_channels": [123456789, 123456789, 123456789, 123456789],
        "type": "smartnet",
	"maxDuration": 7200,
	"audioArchive": false,
	"recordUnknown": true,
        "talkgroupsFile": "tg.csv",
        "modulation": "fsk4",
	"squelch": -55,
        "shortName": "tgshort",
	"apiKey": "OPENMHZAPIKEY",
        "broadcastifyApiKey": "BROADCASTIFYAPIKEY",
	"broadcastifySystemId": 86753
    }],
    "uploadServer": "https://api.openmhz.com",
    "broadcastifyCallsServer": "https://api.broadcastify.com/call-upload"
}

Here is my output when running trunk-recorder:

$ ../trunk-recorder --config=config.json
[2023-11-11 21:18:03.187153] (info)   
-------------------------------------
     Trunk Recorder
-------------------------------------
[2023-11-11 21:18:03.187196] (info)   

-------------------------------------
INSTANCE
-------------------------------------
[2023-11-11 21:18:03.187204] (info)   Using Config file: config.json
[2023-11-11 21:18:03.187207] (info)   Trunk-Recorder: Version: 4.7.0
[2023-11-11 21:18:03.187209] (info)   Log to File: false
[2023-11-11 21:18:03.187213] (info)   Log Directory: logs
[2023-11-11 21:18:03.187220] (info)   Temporary Transmission Directory: /dev/shm
[2023-11-11 21:18:03.187223] (info)   Capture Directory: ./trunk-build/trunk-config
[2023-11-11 21:18:03.187226] (info)   Upload Server: https://api.openmhz.com
[2023-11-11 21:18:03.187228] (info)   Broadcastify Calls Server: https://api.broadcastify.com/call-upload
[2023-11-11 21:18:03.187231] (info)   Status Server: 
[2023-11-11 21:18:03.187233] (info)   Instance Key: 
[2023-11-11 21:18:03.187235] (info)   Instance Id: 
[2023-11-11 21:18:03.187237] (info)   Broadcast Signals: false
[2023-11-11 21:18:03.187240] (info)   Default Mode: analog
[2023-11-11 21:18:03.187242] (info)   Call Timeout (seconds): 3
[2023-11-11 21:18:03.187245] (info)   Control channel warning rate: 10
[2023-11-11 21:18:03.187247] (info)   Control channel retune limit: 0
[2023-11-11 21:18:03.187286] (info)   Phase 1 Software Vocoder: false
[2023-11-11 21:18:03.187308] (info)   Enable Audio Streaming: false
[2023-11-11 21:18:03.187329] (info)   Record Unit to Unit Voice Calls: true
[2023-11-11 21:18:03.187336] (info)   New Call from UPDATE Messagestrue
[2023-11-11 21:18:03.187354] (info)   Frequency format: mhz
[2023-11-11 21:18:03.187360] (info)   Status as String: true
[2023-11-11 21:18:03.187363] (info)   Log Level: info
[2023-11-11 21:18:03.187384] (info)   
-------------------------------------
SYSTEMS
-------------------------------------
[2023-11-11 21:18:03.187394] (info)   

System Number: 1
-------------------------------------
[2023-11-11 21:18:03.187413] (info)   Short Name: tgshort
[2023-11-11 21:18:03.187420] (info)   System Type: smartnet
[2023-11-11 21:18:03.187424] (info)   Control Channels: 
[2023-11-11 21:18:03.187453] (info)     123.456 MHz
[2023-11-11 21:18:03.187505] (info)     123.456 MHz
[2023-11-11 21:18:03.187541] (info)     123.456 MHz
[2023-11-11 21:18:03.187560] (info)     123.456 MHz
[2023-11-11 21:18:03.187571] (info)   Loading Talkgroups...
[2023-11-11 21:18:03.187574] (info)   Reading Talkgroup CSV File: tg.csv
[2023-11-11 21:18:03.188165] (info)   Found Columns: Decimal, Hex, Mode, Alpha Tag, Description, Tag, Comment, Priority
[2023-11-11 21:18:03.189480] (info)   Read 971 talkgroups.
[2023-11-11 21:18:03.189519] (info)   Talkgroups File: tg.csv
[2023-11-11 21:18:03.189529] (info)   Modulation: fsk4
[2023-11-11 21:18:03.189532] (info)   Conversation Mode: true
[2023-11-11 21:18:03.189534] (info)   Analog Recorder Maximum Deviation: 4000
[2023-11-11 21:18:03.189537] (info)   Filter Width: 1
[2023-11-11 21:18:03.189541] (info)   Squelch: -55
[2023-11-11 21:18:03.189544] (info)   API Key: OPENMHZAPIKEY
[2023-11-11 21:18:03.189546] (info)   Broadcastify API Key: BROADCASTIFYAPIKEY
[2023-11-11 21:18:03.189582] (info)   Broadcastify Calls System ID: 86753
[2023-11-11 21:18:03.189604] (info)   Upload Script: 
[2023-11-11 21:18:03.189623] (info)   Compress .wav Files: true
[2023-11-11 21:18:03.189630] (info)   Call Log: true
[2023-11-11 21:18:03.189633] (info)   Audio Archive: false
[2023-11-11 21:18:03.189636] (info)   Transmission Archive: false
[2023-11-11 21:18:03.189638] (info)   Loading Unit Tags...
[2023-11-11 21:18:03.189640] (info)   Unit Tags File: 
[2023-11-11 21:18:03.189643] (info)   Record Unknown Talkgroups: true
[2023-11-11 21:18:03.189646] (info)   Decode MDC: false
[2023-11-11 21:18:03.189648] (info)   Decode FSync: false
[2023-11-11 21:18:03.189666] (info)   Decode Star: false
[2023-11-11 21:18:03.189707] (info)   Decode TPS: false
[2023-11-11 21:18:03.189729] (info)   Talkgroup Display Format: Id
[2023-11-11 21:18:03.189765] (info)   Smartnet bandplan: 800_standard
[2023-11-11 21:18:03.189771] (info)   Smartnet band: 800
[2023-11-11 21:18:03.189774] (info)   Hide Encrypted Talkgroups: false
[2023-11-11 21:18:03.189777] (info)   Hide Unknown Talkgroups: false
[2023-11-11 21:18:03.189779] (info)   Minimum Call Duration (in seconds): 0
[2023-11-11 21:18:03.189784] (info)   Maximum Call Duration (in seconds): 7200
[2023-11-11 21:18:03.189802] (info)   Minimum Transmission Duration (in seconds): 0
[2023-11-11 21:18:03.189824] (info)   Multiple Site System: false
[2023-11-11 21:18:03.189844] (info)   Multiple Site System Name: 
[2023-11-11 21:18:03.189850] (info)   Multiple Site System Number: 0
[2023-11-11 21:18:03.189871] (info)   
[2023-11-11 21:18:03.189892] (info)   

-------------------------------------
SOURCES
-------------------------------------
[2023-11-11 21:18:03.189929] (info)   Driver: osmosdr
[2023-11-11 21:18:03.189932] (info)   Center: 123.456 MHz
[2023-11-11 21:18:03.189941] (info)   Rate: 20000000
[2023-11-11 21:18:03.189975] (info)   Error: 0
[2023-11-11 21:18:03.189982] (info)   PPM Error: 0
[2023-11-11 21:18:03.190010] (info)   Auto gain control: false
[2023-11-11 21:18:03.190031] (info)   Gain: 0
[2023-11-11 21:18:03.190037] (info)   IF Gain: 24
[2023-11-11 21:18:03.190040] (info)   BB Gain: 28
[2023-11-11 21:18:03.190076] (info)   LNA Gain: 0
[2023-11-11 21:18:03.190135] (info)   PGA Gain: 0
[2023-11-11 21:18:03.190160] (info)   TIA Gain: 0
[2023-11-11 21:18:03.190163] (info)   MIX Gain: 0
[2023-11-11 21:18:03.190165] (info)   AMP Gain: 0
[2023-11-11 21:18:03.190168] (info)   VGA Gain: 0
[2023-11-11 21:18:03.190170] (info)   VGA1 Gain: 0
[2023-11-11 21:18:03.190172] (info)   VGA2 Gain: 0
[2023-11-11 21:18:03.190174] (info)   Idle Silence: 0
[2023-11-11 21:18:03.190178] (info)   Digital Recorders: 3
[2023-11-11 21:18:03.190182] (info)   SigMF Recorders: 0
[2023-11-11 21:18:03.190244] (info)   Analog Recorders: 8
[2023-11-11 21:18:03.190268] (info)   Source Device not specified
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.1.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp 
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
Using Unknown Board ID with firmware 2023.01.1
[2023-11-11 21:18:04.316372] (info)   SOURCE TYPE OSMOSDR (osmosdr)
[2023-11-11 21:18:04.316403] (info)   Setting sample rate to: 20000000
[2023-11-11 21:18:04.316421] (info)   Actual sample rate: 20000000
[2023-11-11 21:18:04.316425] (info)   Tuning to 123.456 MHz
[2023-11-11 21:18:04.316435] (info)   Gain Stage: RF supported values: 0 14 
[2023-11-11 21:18:04.316442] (info)   Gain Stage: IF supported values: 0 8 16 24 32 40 
[2023-11-11 21:18:04.316457] (info)   Gain Stage: BB supported values: 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 
[2023-11-11 21:18:04.316498] (info)   Max Frequency: 123.456 MHz
[2023-11-11 21:18:04.316524] (info)   Min Frequency: 123.456 MHz
[2023-11-11 21:18:04.317049] (info)   IF Gain set to: 24
[2023-11-11 21:18:04.317736] (info)   BB Gain set to: 28
[2023-11-11 21:18:04.317768] (info)   Auto gain control is OFF
[2023-11-11 21:18:04.317775] (info)   Setting antenna to [TX/RX]
[2023-11-11 21:18:04.318032] (info)   	 P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 8888 FB: 8888 System Rate: 20000000
[2023-11-11 21:18:04.323866] (info)   	 P25 Recorder ARB - Initial Rate: 20000000 Resampled Rate: 25000 Initial Decimation: 200 ARB Rate: 0.96 SPS: 5
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: [email protected]
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
[2023-11-11 21:18:04.326395] (info)   	 P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 8888 FB: 8888 System Rate: 20000000
[2023-11-11 21:18:04.330761] (info)   	 P25 Recorder ARB - Initial Rate: 20000000 Resampled Rate: 25000 Initial Decimation: 200 ARB Rate: 0.96 SPS: 5
[2023-11-11 21:18:04.333402] (info)   	 P25 Recorder two-stage decimator - Initial decimated rate: 100000 Second decimated rate: 25000 FA: 8888 FB: 8888 System Rate: 20000000
[2023-11-11 21:18:04.337800] (info)   	 P25 Recorder ARB - Initial Rate: 20000000 Resampled Rate: 25000 Initial Decimation: 200 ARB Rate: 0.96 SPS: 5
[2023-11-11 21:18:04.343745] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.344182] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.344441] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.347797] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.348262] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.348536] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.352362] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.352899] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.353233] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.357007] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.357604] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.357914] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.361727] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.362363] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.362693] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.366191] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.366820] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.367193] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.370951] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.371634] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.371999] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.375893] (info)   	 Analog Recorder Taps - initial: 8888 channel: 8888 ARB: 8888 Total: 8888
[2023-11-11 21:18:04.376579] (info)   	 Creating decoder sink...
[2023-11-11 21:18:04.376961] (info)   	 Decoder sink created!
[2023-11-11 21:18:04.377158] (info)   
-------------------------------------

[2023-11-11 21:18:04.377182] (info)   

-------------------------------------
PLUGINS
-------------------------------------
[2023-11-11 21:18:04.377192] (info)   Setting up plugin -  Name: openmhz_uploader	 Library file: libopenmhz_uploader.so
[2023-11-11 21:18:04.382609] (info)   OpenMHz Server: https://api.openmhz.com
[2023-11-11 21:18:04.382676] (info)   Uploading calls for: tgshort
[2023-11-11 21:18:04.382722] (info)   Setting up plugin -  Name: broadcastify_uploader	 Library file: libbroadcastify_uploader.so
[2023-11-11 21:18:04.383107] (info)   Broadcastify Server: https://api.broadcastify.com/call-upload
[2023-11-11 21:18:04.383222] (error)   Failed parsing Config: [json.exception.type_error.302] type must be string, but is number

@e850205
Copy link
Contributor

e850205 commented Nov 12, 2023

This was not fixed by #859 for me

@james-coder
Copy link
Contributor Author

@e850205 if you are getting an error, please share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants