It's not clear to me what exactly you are trying to accomplish here, what problem you're trying to solve.
To reiterate, the Nextion driver loads two files (groups and user id's) from one of two sources (for each): a primary (first choice) source and an alternate (secondary) source. in each case, the primary source (usually /usr/local/etc directory) is examined, and if it exists, is used/loaded into memory; otherwise the secondary source is tested, and if it exists, loaded.
The primary source files are usually the local ones previously downloaded by the host update process into the /usr/local/etc directory, while the secondary source files are usually a URI pointing to an external location.
The normal Nextion drive config looks like this:
Code: Select all
DataFilesPath=/usr/local/etc/
GroupsFile=nextionGroups.txt
GroupsFileSrc=https://www.pistar.uk/downloads/groups.txt
DMRidFile=nextionUsers.csv
DMRidFileSrc=https://www.pistar.uk/downloads/nextionUsers.csv
Note that the "..File=" lines imply that the specified files reside in the directory specified in the "DataFilesPath=" line (.e.g. GroupsFile=nextionGroups.txt should be interpreted as GroupsFile=/usr/local/etc/nextionGroups.txt)
Note that the primary source (local) files are loaded by an independent, asyncronous process (host file update); the driver loads whatever file happens to be in the specified directory, whenever the file was last placed (updated) there. The secondary sources are, usually, real-time: loaded when the driver is started: you get whatever as loaded in that external source. Again, the secondary sources are only referenced IF the primary sources don't exist.
Again, the contents of the primary and secondary files, and their update status (current, yesterday, 7 days ago, etc) are controlled by independent processes.
This overall setup, as outlined above, works as designed, as distributed in the images.
So, again, what problem do you see with this config?
-----
G7OMN wrote: ↑Tue Jun 25, 2024 4:59 pm
That file is based on kf5iw data and is about 17.4MB with 266739 entries - while it has lapsed calls in it - it also has surnames.
I agree: the kf5iw date is more inclusive, but by and large it essentially tracks radioid.net data and does includes surnames in most cases.
Code: Select all
2024-06-25T17:03:09.679862+01:00 pi-star1 NextionDriver: NextionDriver V1.26 terminated on signal SIGTERM (Terminated)
2024-06-25T17:03:09.814298+01:00 pi-star1 NextionDriver: NextionDriver version 1.26
2024-06-25T17:03:09.814813+01:00 pi-star1 NextionDriver: Copyright (C) 2017...2021 ON7LDS. All rights reserved.
:
2024-06-25T17:03:09.837454+01:00 pi-star1 NextionDriver: Groups file will be fetched from [https://www.pistar.uk/downloads/groups.txt]
2024-06-25T17:03:09.837904+01:00 pi-star1 NextionDriver: Users file will be fetched from [https://duncreggan.net/pi-star/nextionUsers.csv]
:
2024-06-25T17:03:09.850618+01:00 pi-star1 NextionDriver: Data files directory: /usr/local/etc/
2024-06-25T17:03:09.851454+01:00 pi-star1 NextionDriver: Groups file : 2024-06-25 03:39:05 (13 hour old)
2024-06-25T17:03:09.893171+01:00 pi-star1 NextionDriver: Users file : 2024-06-25 03:39:06 (13 hour old)
2024-06-25T17:03:09.893861+01:00 pi-star1 NextionDriver: Reading groups from /usr/local/etc/nextionGroups.txt
2024-06-25T17:03:09.903880+01:00 pi-star1 NextionDriver: Read 1634 groups.
2024-06-25T17:03:09.904544+01:00 pi-star1 NextionDriver: Reading users from /usr/local/etc/nextionUsers.csv
:
2024-06-25T17:03:13.921584+01:00 pi-star1 NextionDriver: Read 261848 users in 4000 ms.
2024-06-25T17:03:15.251942+01:00 pi-star1 NextionDriver: Sorted CALL table in 1327 ms.
2024-06-25T17:03:15.252604+01:00 pi-star1 NextionDriver: Disk size : 14616 MB (11916 free)
:
What is clearly being downloaded is what is lodged on the pistar address and not what is specified in the MMDVMhost file.
Above is the log file after restarting the Nextion Driver 15 minutes ago - it did not update overnight.
While there is the option to specify a different source, clearly not being used, unless this is an oversight?
(that's why i was asking about the variables yesterday - incase one of the was related to the DMRidFileSrc in the MMDVMHost file)
So if i change the values in the MDVMHost to users.csv and
https://duncreggan.net/pi-star/users.csv, (yes there is a users.csv file there) and rename nextionUsers.csv, you can see below that the download clearly fails with a NextionDriver restart. It's the same with a complete restart or update. It does not fetch the new file (users.csv).
When you make changes to the Nextion section in the mmdvmhost file, you need to restart the Nextion driver for those changes to be seen.
Code: Select all
2024-06-25T17:26:19.721157+01:00 pi-star1 NextionDriver: Groups file will be fetched from [https://www.pistar.uk/downloads/groups.txt]
2024-06-25T17:26:19.722554+01:00 pi-star1 NextionDriver: Users file will be fetched from [https://duncreggan.net/pi-star/users.csv]
2024-06-25T17:26:19.726048+01:00 pi-star1 NextionDriver: RemoveDim: OFF
2024-06-25T17:26:19.727034+01:00 pi-star1 NextionDriver: SleepWhenInactive: OFF
2024-06-25T17:26:19.728256+01:00 pi-star1 NextionDriver: ShowModesStatus: OFF
2024-06-25T17:26:19.729396+01:00 pi-star1 NextionDriver: WaitForLan: ON
2024-06-25T17:26:19.730600+01:00 pi-star1 NextionDriver: Using verbose level 2
2024-06-25T17:26:19.731695+01:00 pi-star1 NextionDriver: Running on Raspbian GNU/Linux 12 (bookworm)
2024-06-25T17:26:19.732615+01:00 pi-star1 NextionDriver: Pi-Star v 4.3.0
2024-06-25T17:26:19.734156+01:00 pi-star1 NextionDriver: Opening ports
2024-06-25T17:26:19.735545+01:00 pi-star1 NextionDriver: /dev/ttyNextionDriver (=/dev/pts/0) <=> /dev/ttyUSB0
2024-06-25T17:26:19.736235+01:00 pi-star1 NextionDriver: Data files directory: /usr/local/etc/
2024-06-25T17:26:19.736753+01:00 pi-star1 NextionDriver: Groups file : 2024-06-25 03:39:05 (13 hour old)
2024-06-25T17:26:19.779098+01:00 pi-star1 NextionDriver: No Users file found
2024-06-25T17:26:19.779639+01:00 pi-star1 NextionDriver: Fetching users from https://www.pistar.uk/downloads/groups.txt
2024-06-25T17:26:22.862828+01:00 pi-star1 NextionDriver: ERROR: Users file update failed (256)
2024-06-25T17:26:22.863482+01:00 pi-star1 NextionDriver: Reading groups from /usr/local/etc/nextionGroups.txt
2024-06-25T17:26:22.872170+01:00 pi-star1 NextionDriver: Read 1634 groups.
2024-06-25T17:26:22.872644+01:00 pi-star1 NextionDriver: Reading users from /usr/local/etc/users.csv
2024-06-25T17:26:22.873065+01:00 pi-star1 NextionDriver: delimiter ','
2024-06-25T17:26:22.873557+01:00 pi-star1 NextionDriver: DMRid in field 1
2024-06-25T17:26:22.874230+01:00 pi-star1 NextionDriver: Call in field 2
2024-06-25T17:26:22.874929+01:00 pi-star1 NextionDriver: Name in fields 3 + 4
2024-06-25T17:26:22.875549+01:00 pi-star1 NextionDriver: Extra data in fields 5,6 and 7
2024-06-25T17:26:22.876312+01:00 pi-star1 NextionDriver: ERROR: Couldn't open the userDB file /usr/local/etc/users.csv.
What you're missing here is a sense of where the underlying files reside, what their names are in their respective domains (local or inet), and how you specify the references to them.
Obviously, there is NO /usr/local/etc/users.csv. That file name, users.csv, may exist on the https: site but not locally; the local name for this file is: nextionUsers.csv.
(The groups.txt file is ok, although that's hard to see because of mixed-up ordering of the messages.)
I think your config should look like this:
Code: Select all
DataFilesPath=/usr/local/etc/
GroupsFile=nextionGroups.txt
GroupsFileSrc=https://www.pistar.uk/downloads/groups.txt
DMRidFile=nextionUsers.csv
DMRidFileSrc=https://duncreggan.net/pi-star/users.csv]
If you prefer your alternate id source to be primary, try swapping the specs:
Code: Select all
:
DMRidFile=https://duncreggan.net/pi-star/users.csv
DMRidFileSrc=nextionIUsers.csv
Of commenting out the primary:
Code: Select all
:
#DMRidFile=nextionUsers.csv
DMRidFileSrc=https://duncreggan.net/pi-star/users.csv
However, resetting the MMDVMhosts back to defaults..
Restarting the hotspot doesn't restore the nextionUsers.csv file.
Restarting the hotspot does not initiate (another) host file update, so, of course the nextionUsers.csv would not be updated.
Running an update does.. But as expected, the new file is not loaded until the nextion driver is restarted - and that doesn't happen as part of the update process.
A problem with the update process, which I've noted in other posts, is that the update process does not, unfortunately, restart the Nextion driver, and thus cause a reload of the requisite files. So, after any of your machinations described above, you can reboot OR you can manually restart the driver:
Code: Select all
rpi-rw
sudo systemctl restart nextiondriver.service