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

unitScript functionality doesn't seem to be working in 4.0-beta #525

Closed
aaknitt opened this issue Oct 8, 2021 · 3 comments
Closed

unitScript functionality doesn't seem to be working in 4.0-beta #525

aaknitt opened this issue Oct 8, 2021 · 3 comments

Comments

@aaknitt
Copy link
Contributor

aaknitt commented Oct 8, 2021

unitScripts specified in config.json that fire and function correctly in 3.3.7 don't appear to fire in 4.0-beta.

config.json:

{
	"ver": 2,
    "sources": [{
        "center": 853175000,
		"ppm":0,
        "rate": 1400000,
        "gain": 40,
        "digitalRecorders":2,
        "driver": "osmosdr",
		"device": "rtl=0"
    }],
    "systems": [{
        "control_channels": [853712500,853687500,853350000,853137500],
        "type": "p25",
		"modulation": "qpsk",
		"digitalLevels":8,
		"shortName": "oasiswauk",
		"talkgroupsFile": "OASISTG.csv",
		"unitScript":"unitscript.py",
		"recordUnknown": false,
		"audioArchive": true,
		"talkgroupDisplayFormat": "id_tag"
    }],
	"minDuration": 0,
	"defaultMode": "digital",
	"captureDir": "/home/pi/tr-recordings",
	"controlWarnRate":10,
	"controlWarnUpdate":1,
	"frequencyFormat": "mhz",
	"logFile": true,
	"callTimeout": 2,
	"statusAsString": true
}

minimal test script unitscript.py:

#!/usr/bin/python3
print("THIS IS A UNIT SCRIPT")

Results in 3.3.7:
image

No evidence of script being run in 4.0-beta:
image

@robotastic
Copy link
Owner

Ok - this commit ba6959f should fix the unitScript issues. Let me know if that doesn't work.

@aaknitt
Copy link
Contributor Author

aaknitt commented Oct 12, 2021

Yep, fixed, thanks!

@aaknitt aaknitt closed this as completed Oct 12, 2021
@rosecitytransit
Copy link
Contributor

I know this is way later (I've just been letting t-r run), but the "./" should be in your config.json entry as "unitScript":"./unitscript.py", I thought I noted that in the documentation I wrote; it's just like if you were to execute the script on the command line.. ./ would be incorrect if the script is somewhere else besides the same directory as trunk-recorder.

rosecitytransit added a commit to rosecitytransit/trunk-recorder that referenced this issue Apr 3, 2022
as CONFIGURE notes, the config.json script entry should contain the ./
rosecitytransit added a commit to rosecitytransit/trunk-recorder that referenced this issue Apr 3, 2022
as CONFIGURE notes, the config.json script entry should contain the ./
rosecitytransit added a commit to rosecitytransit/trunk-recorder that referenced this issue Apr 4, 2022
as CONFIGURE notes, the config.json script entry should contain the ./
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

3 participants