[chirp_users] Scripting CHIRP or manipulating Duplex settings

Eric Vought
Wed Oct 8 18:39:17 PDT 2014


If this ends up being a duplicate post, I apologize: I never got a copy
back from the list server.

I would like to programatically combine multiple stock configs, potentially
manipulating them as I go. Failing that, I need to be able to at least
modify duplex settings across an entire config at one go rather than having
to toggle the settings for each channel entry.

Here is what I am trying to do:

I have a number of .csv files defining different zones for channel
settings. For example, I have, a zone for regional interoperability, a zone
for local law enforcement, local fire, etc., a zone for NIFOG
Interoperability channels, a zone for GMRS, a zone for regional
ARES/Skywarn channels, one for channels used by CERT and other local
groups, etc. I store those zone files as stock configs for building a
laydown for a specific radio and specific user.

Specific users will need some zones in their laydown and not others. More
problematically, different users may be *licensed* for some services and
not others. Generally it is not a problem to monitor the channels they are
not licensed for, but I have to lock out transmit. For example, a user is
licensed for local Part 90 public service but not amateur radio or
vice-versa. So, when I build their laydown, I bring in the zones they need
from stock configs but I either need to build two files for each zone (and
worry that they will lose sync over time) or I have to manually toggle
Duplex=off in each channel in every service they do not have access to.
This gets to be a bit of a pain. I also need to make some individualized
settings for each user (e.g. call-sign to come up at startup).

As Chirp is written in Python, is there an internal API available to do
this kind of manipulation? Is that API at all documented or stable?
Ideally, I would like to write a script which will do something like
(pseudocode):

newWouxunLaydown.import("ZoneA.csv", 0);
newWouxunLaydown.import("ZoneB.csv", 30, monitor);
newWouxunLaydown.import("ZoneF.csv", 100, monitor);
newWouxunLaydown.import("ZoneN.csv", 190, monitor);
newWouxunLaydown.set("startup_message", callsign);
newWouxunLaydown.set("lock_pin", pin);
newWouxunLaydown.set("primary_channel", primaryChannel);

# ...etc...

newWouxunLaydown.write(outputFile);

I can then create a script for each common configuration and when, for
instance, ZoneB gets updated, just run the scripts to rebuild the laydowns.
In theory I could even version control the .csv s for the zones and the
scripts, stick them on a server, and then reuse them between local agencies
(the end goal).

Is this a fantasy?

Somehow going from there to pretty-printing quick-reference cards for each
user would be nice, too... :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_users/attachments/20141008/7770d483/attachment.html 


More information about the chirp_users mailing list