OP25 Boatbod Web UI Update

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
Hopefully I'm not breaking any rules here but I thought my question would be appropriate since this is talking about the new Web UI of Boatbod's fork. I've managed to get my install on a RPi 3b+ running Bookworm calmed down (Fixed the waitress threads issue, now I only have op25 locking up every few hours and channel timeouts left) and so I've started exploring and trying to tweak things. I noticed some of my TG's aren't showing in color in the Active Talkgroup window. I read in another thread that Smart Colors gets added in the Terminal section of the main json file. I added the stuff Boatbod offered to help another user. I noticed there are keywords in the Smart Color section. At first I thought I needed to add my keywords to it and although it didn't break anything it didn't colorize my added keywords. I then read this thread and it mentioned that it is setup in config.js in the WWW-Static folder. I went there and to my surprise it says it has been deprecated back in April of 2025. But there was no note where the functionality moved to. Is there an update to that?
Thanks
Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,629
Reaction score
1,025
Location
Talbot Co, MD
Hopefully I'm not breaking any rules here but I thought my question would be appropriate since this is talking about the new Web UI of Boatbod's fork. I've managed to get my install on a RPi 3b+ running Bookworm calmed down (Fixed the waitress threads issue, now I only have op25 locking up every few hours and channel timeouts left) and so I've started exploring and trying to tweak things. I noticed some of my TG's aren't showing in color in the Active Talkgroup window. I read in another thread that Smart Colors gets added in the Terminal section of the main json file. I added the stuff Boatbod offered to help another user. I noticed there are keywords in the Smart Color section. At first I thought I needed to add my keywords to it and although it didn't break anything it didn't colorize my added keywords. I then read this thread and it mentioned that it is setup in config.js in the WWW-Static folder. I went there and to my surprise it says it has been deprecated back in April of 2025. But there was no note where the functionality moved to. Is there an update to that?
Thanks
Mike
Did you look in the default cfg.json file for suggestions?
 

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
No. I didn't know about cfg.json but I used the example you offered in an earlier thread:
Code:
"tuning_step_small": 100,
        "smart_colors": [
            {
                "keywords": [
                    "fire"
                ],
                "color": "#ff5c5c"
            },
            {
                "keywords": [
                    "pd",
                    "police",
                    "sheriff",
                    "so",
                    "co",                             <---------
                    "law",
                    "msp",
                    "gci"                              <-----------
                ],
                "color": "#66aaff"
            },
            {
                "keywords": [
                    "ems",
                    "med",
                    "ambulance",
                    "miemss"
                ],
                "color": "#ffb84d"
            }
        ]
    }
}

Yes, I did run the whole json file through a json validator online and fixed a couple of things.
The arrows above show what I added to the keywords. Currently I'm getting some color but not what I wanted to add.
1758830040649.png

I even asked Gemini about it and it said to use the talkgroup_id.tsv file. I checked the one I'm using and there are only two columns of data in the file. There is no color numbers column. According to the old rx.py method that's where the old docs say to define it. Is that where the new release looks for the color numbers? I remember setting color codes in Osmocom's Web UI but I don't remember what the color codes were and the Osmocom install is gone on my Pi. I have been over your github page looking for the color scheme or some direction about setting the colors and haven't found anything. From looking at the history grab above I see some of the colors are working. Which makes me think the the main json file under the Terminal section/Smartcolors IS the proper place to define it. If so I don't know why additions didn't work. I know you do this out of the goodness of your heart and I appreciate that. I'm willing to do some digging to try to find what I need but I'm guessing either no one uses the colorizing of the TGIDs or its only the folks that work on coding OP25 Web-UI. I haven't found anybody else discussing this. I guess the other possibility is, I'm just too thick. ;)

Mike
 

Attachments

  • 1758829684344.png
    1758829684344.png
    26.7 KB · Views: 2

n5pwp

Member
Joined
Jan 10, 2015
Messages
302
Reaction score
17
Location
Spring, Texas
[Edit:] OK, I figured it out. The reason my additions to the Smartcolor section were not taking affect was because you have to shutdown the Web-UI. Apparently the settings are saved in the Web-UI and if you stop the json and restart it is not enough to get the Web-UI to show the changes. I guess everybody in the world knew that but me.

Mike
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,629
Reaction score
1,025
Location
Talbot Co, MD
[Edit:] OK, I figured it out. The reason my additions to the Smartcolor section were not taking affect was because you have to shutdown the Web-UI. Apparently the settings are saved in the Web-UI and if you stop the json and restart it is not enough to get the Web-UI to show the changes. I guess everybody in the world knew that but me.

Mike
The Web UI only loads it's settings when *it* starts up, and similarly op25 only loads settings as it starts, so effectively you have to reload both, starting with op25.
 

KF4HJW

Member
Premium Subscriber
Joined
Jun 6, 2012
Messages
10
Reaction score
1
Location
Newport News , VA
I finally got around to re-doing the web UI for OP25 Boatbod, and I'm interested in seeing if anyone would like to test and provide feedback, and @boatbod if you're interested in digesting it into your repo.

This implementation works on what python already sends over with just one small addition to tk_p25.py, which is to send over the talkgruop tags in the trunk_update payload. See line 1672 through 1685 below.

There is also an addition of config.js in the www-static folder which adds the variables for Smart Colors, Site Names, and Presets.

This is tested with P25 only. Honestly, I can't get Smartnet or DMR to run on OP25 at all, but I haven't tried very hard.

If there is interest, I will be happy to share the updates later today. There are still a couple of things to clean up. Thoughts?

View attachment 181732

View attachment 181733
Like the screen in the update. I just need to get the lower data fill in. Shows the tg just no history I missed a keystroke somewere lol.. On a second topic any chance to add a soft restart once a day built in as option.. Thanks for all the effort in the package.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,629
Reaction score
1,025
Location
Talbot Co, MD
Like the screen in the update. I just need to get the lower data fill in. Shows the tg just no history I missed a keystroke somewere lol.. On a second topic any chance to add a soft restart once a day built in as option.. Thanks for all the effort in the package.
You could achieve a periodic restart with some shell scripting and a cron job. I have something similar on my streaming system for recovery when a usb device "unplugged" (usually a transitory failure due to wobbly connector etc)
 
Top