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

Failed parsing Config: stod is less than useful #729

Closed
ZeroChaos- opened this issue Oct 6, 2022 · 6 comments
Closed

Failed parsing Config: stod is less than useful #729

ZeroChaos- opened this issue Oct 6, 2022 · 6 comments

Comments

@ZeroChaos-
Copy link

zero@theprophet trunk-recorder-configs % trunk-recorder --config=something.json                                                                                (git)-[main] 
[2022-10-06 10:38:06.174185] (info)   Using Config file: something.json
[2022-10-06 10:38:06.174205] (info)   Trunk-Recorder: Version: 4.4.1
[2022-10-06 10:38:06.174379] (info)   
-------------------------------------
     Trunk Recorder
-------------------------------------
[2022-10-06 10:38:06.174387] (info)   

-------------------------------------
INSTANCE
-------------------------------------
[2022-10-06 10:38:06.174394] (info)   Capture Directory: /tmp/tr
[2022-10-06 10:38:06.174399] (info)   Upload Server: 
[2022-10-06 10:38:06.174403] (info)   Broadcastify Calls Server: 
[2022-10-06 10:38:06.174407] (info)   Status Server: 
[2022-10-06 10:38:06.174411] (info)   Instance Key: 
[2022-10-06 10:38:06.174414] (info)   Instance Id: 
[2022-10-06 10:38:06.174418] (info)   Broadcast Signals: false
[2022-10-06 10:38:06.174423] (info)   Default Mode: digital
[2022-10-06 10:38:06.174447] (info)   Call Timeout (seconds): 3
[2022-10-06 10:38:06.174451] (info)   Log to File: false
[2022-10-06 10:38:06.174456] (info)   Log Directory: logs
[2022-10-06 10:38:06.174459] (info)   Control channel warning rate: 10
[2022-10-06 10:38:06.174464] (info)   Control channel retune limit: 0
[2022-10-06 10:38:06.174468] (info)   Enable Audio Streaming: false
[2022-10-06 10:38:06.174472] (info)   Record Unit to Unit Voice Calls: true
[2022-10-06 10:38:06.174477] (info)   Frequency format: exp
[2022-10-06 10:38:06.174481] (info)   Status as String: true
[2022-10-06 10:38:06.174486] (info)   Log Level: info
[2022-10-06 10:38:06.174491] (info)   
-------------------------------------
SYSTEMS
-------------------------------------
[2022-10-06 10:38:06.174502] (info)   

System Number: 1
-------------------------------------
[2022-10-06 10:38:06.174506] (info)   Short Name: dmr
[2022-10-06 10:38:06.174511] (info)   System Type: conventionalDMR
[2022-10-06 10:38:06.174516] (info)   Channel File: channels.csv
[2022-10-06 10:38:06.174520] (info)   Loading Talkgroups...
[2022-10-06 10:38:06.174603] (error)   Failed parsing Config: stod

Min test case json

{
    "ver": 2,
    "sources": [
        {
            "center": 464000000.0,
            "rate": 2048000.0,
            "error": 0,
            "gain": 40,
            "driver": "osmosdr",
            "device": "rtl=0,buflen=32768"
        }
    ],
    "systems": [
      {
        "channelFile": "channels.csv",
        "talkgroupDisplayFormat": "tag_id",
        "type": "conventionalDMR",
        "callLog": true,
        "audioArchive": true,
        "minDuration": 1,
        "shortName": "dmr",
        "digitalLevels": 1,
        "uploadScript": "./encode-upload.sh",
        "compressWav": false,
        "squelch": -20
      }
    ],
  "captureDir": "/tmp/tr"
}

Min test case channels.csv

0123,464100000,,shortname,longname,whatever,bob
@ZeroChaos-
Copy link
Author

I have no idea what's wrong. Trunk Recorder refuses to load. Kneel before Stod!

@ZeroChaos-
Copy link
Author

Ugh, I found it. This is an incarnation of #724

Min broken case

0123,464100000,,shortname,longname,whatever,bob

Min working case

0123,464100000,100 PL,shortname,longname,whatever,bob

Basically, if you don't have something in for tone, it fails. This is broken for a lot of reasons.

1.) Not every analog station uses tones
2.) channelFile is used by conventionalDMR and conventionalP25 which don't use tones.

I know the tone stuff is a no-op at this moment, but when that support is added, the digital modes will all break since the tone won't ever be detected.

@robotastic
Copy link
Owner

ok - the easy fix for this is to improve the parsing of the Channels file so it can handle the tone field being empty.

A better fix is probably looking at how we handle digital conventional channels... to the point in #724 - maybe we don't really need a channels file for conventional digital.

@EricTendian
Copy link
Contributor

I also ran into this, though my issue was that my CSV included the column headers as shown on https://github.com/robotastic/trunk-recorder/blob/master/docs/CONFIGURE.md#channelfile but actually there shouldn't be any headers in the CSV.

@taclane
Copy link
Contributor

taclane commented Nov 28, 2022

A better fix is probably looking at how we handle digital conventional channels... to the point in #724 - maybe we don't really need a channels file for conventional digital.

I can't speak for all conventional digital systems, but it is fairly common for conventional P25 deployments to use the default talkgroup (1) across everything. For instance, the only way to discriminate Police (TG 1) from Fire (TG 1) is by the frequency used. Using a channel.csv to assign metadata by frequency is a reasonable solution for both conventional and conventional p25.

As far as conventional DMR or other single-frequency trunks, I don't have any in my area, but it does sound like they operate in a way that would benefit more from a talkgroup.csv. Maybe depending on whether a talkgroupsFile or channelFile is specified, it can drive whether a system looks up metadata by TG or frequency?

@robotastic
Copy link
Owner

This is prob OBE - CSV parsing was re-written

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

4 participants