master
Jay Moore/NQ4T 6 months ago
parent 217a196f70
commit 93c36f4116

@ -0,0 +1,13 @@
---
title: Software Dev Terminated
layout: post
date: 2023-11-13 15:32:46
tags: Blog
excerpt_separator: <!--more-->
---
I have decided to stop any and all development of ham-related software.
I will leave Log4OM up. That's it. The dev there has been very kind to me.
I will not be picking up development. If you want to continue, you can buy my code.

@ -5,30 +5,14 @@ sidebar: 1
order: 3
---
<div class="message"> If a project does not have a link, it means I just haven't created a project specific page yet. However everything
has a Git repository.</div>
<div class="message"> I am no longer developing software for the ham community nor am allowing past projects to continue to be
distribted, with the exception of Log4OM UDP. Hamhead development has been canceled. All development has been terminated. Code
is no longer open-source and is available via restrictive usage agreements. </div>
I am by no means a software developer, that being said I've written some code that does things related to ham radio.
Some of it can fall under the category of "stupid tricks" that are geared toward web presence. Some of it is the
actual website itself since it uses Jekyll/Liquid/Ruby for static generation.
I refuse to continue to work with an "open hobby" that is anti-open source. I'm only leaving this here because people might still
use it; but once I'm sure usage has disappeared; it will turn to just a private project I work on.
- [Log4OM UDP Web Status](https://nq4t.com/software/log4omudp) &middot; [Git Repository](https://git.pickmy.org/nq4t/Log4OM-WebStatus)
- Python script that accepts and parses Log4OM UDP messages to generate a real-time auto-refresh HTML page.
- [PiScrape - Text-Only Hotspot Information](https://nq4t.com/software/piscrape) &middot; [Git Repository](https://git.pickmy.org/nq4t/piscrape)
- This consists of a bash script and PHP page that will display a small box with Pi-Star reflector/talkgroup
information that you can iframe in to a webpage. (Will be) part of my QRZ profile when I can stop screwing around with
the main webpage long enough to update it.
- PiStAPrS - Beacon Hotspot Information To APRS-IS &middot; <a href="https://https://git.pickmy.org/nq4t/pistaprs">Git Repository</a>
- Similar to PiScrape, except this runs on an external Pi with a GPS hat that will beacon location information
If no one wants my help...they're not getting it. If the ham community wants to be an asshole to me; well I am one right back.
- HamHead - Arduino Remote Head For CAT/CI-V Radios &middot; <a href="https://git.pickmy.org/nq4t/HamHead">Git Repository</a></p>
- Project with the goal of letting you add a remote head to any radio that uses CAT/CI-V. Development is dorment
but not entirely dead. Was originally a “memory controller” for an IC-725 to aid in tuning CB channels for monitoring on
the road.
- PiFO - Pi VFO Controller/Head &middot; <a href="https://git.pickmy.org/nq4t/PiFO">Git Repository</a>
- Abandoned. The original RPi based project before I switched to Arduino and called it HamHead. Started off using
HamLib before I abandoned it for being inadequate for my vision. Was later abandoned entirely because who wants to wait
for an OS to boot to control their rig.
- [Log4OM UDP Web Status](https://nq4t.com/software/log4omudp) &middot; [Git Repository](https://git.pickmy.org/nq4t/Log4OM-WebStatus)
- Python script that accepts and parses Log4OM UDP messages to generate a real-time auto-refresh HTML page.

@ -1,129 +0,0 @@
---
layout: page2
title: PiScrape - Text-Only Hotspot Information
---
[Git Repository](https://git.pickmy.org/nq4t/piscrape)
PiScrape allows you to display your connected reflectors/talkgroups in a small webpage you can embed, like this:
<iframe border=0 src="https://pistar.nq4t.com/piscrape/piscrape.php" width="500" height="300"></iframe>
It does this by scraping the Pi-Star dashboard for the information using a shell script and php page. It can be run
on any webserver with PHP and SSH access to your Pi-Star. It can also be run entirely on Pi-Star if you open web ports
or reverse proxy. The original version ran on a locally hosted web-server that could pull the dashboard directly. But
I also had success running it on remote web-servers that could SSH in to the Pi-Star. Remote SSH execution is not yet
included in the repository; but if you know how to do that, you probably can write that small script yourself. The
current implementation is running entirely on the PiStar via nginx reverse proxy.
The PHP page itself largely just calls the shell script, which returns the HTML code containing your connection info.
When the script is executed; it pulls either the repeaterstatus frame from the dashboard or the Brandmeister API page.
Then using a series of awk and sed commands, the information is extracted and output.
### Bash Script
```bash
#!/bin/bash
#.013 alpha
# de NQ4T (nq4tango@gmail.com)
# SET THE HOSTNAME OR IP OF YOUR HOTSPOT!
pidmr=192.168.1.10
# I HAVE TWO SO I SET TWO
#pidstar=192.168.1.11
# grab copy of rendered bm_links.php from hotspot, convert HTML to newline, filter by "TG", remove timeslot info, convert to one line
# check contents to see if we need to display 'no groups' message
# if you are not using DMR, then comment these two lines out
# to comment out, just add a pound-sign to the start of the line, like these comments.
dmr=$(curl -s http://$pidmr/mmdvmhost/bm_links.php| sed 's/<[^>]\+>/\n/g' | grep '^TG' | sed 's/TG/#/g'| sed 's/(.)//g' | sed ':a;N;$!ba;s/\n/ - /g')
[ -z "$dmr" ] && dmr="No Talkgroups Found"
# do the same for dstar with repeaterinfo.php but just egrep for reflector prefix, strip HTML, keep the first 8 characters
# check to see if we need to display not linked
# if you are not using D-Star, comment these next two lines out. if you don't, the script will take longer to run.
# If you modify what egrep looks for, you may get other modes to work.
#dstar=$(curl -s http://$pidstar/mmdvmhost/repeaterinfo.php | egrep "REF|XRF|DCS|XLX" | sed 's/<[^>]\+>//g' | cut -b 1-8)
#[ -z "$dstar" ] && dstar="Not Linked"
# HTML for table cells on hotspot.php page. These are all one line even if they look like two in your editor.
# This is for a 2x2 table using DMR and D-Star
#printf "<tr><td style=\"vertical-align: top; font-family: Verdana; font-weight: bold; text-align: right;\" width=\"20%%\"><small>BM TG:</small></td>\n<td style=\"vertical-align: top;\"><small>$dmr</small><br></td></tr>\n<tr><td style=\"vertical-align: top; font-family: Verdana; font-weight: bold; text-align: right;\" width=\"20%%\"><small>D-Star:</small></td>\n<td style=\"vertical-align: top;\"><small>$dstar</small><br></td></tr>\n"
# This is for a DMR only display.
printf "<tr><td style=\"vertical-align: top; font-family: Verdana; font-weight: bold; text-align: right;\"><small>BM TG:</small></td>\n<td style=\"vertical-align: top;\"><small style=\"font-style: italic;\">$dmr</small><br></td></tr>\n"
# This is for a D-STar Only Display
# printf "<tr><td style=\"vertical-align: top; font-family: Verdana; font-weight: bold; text-align: right;\"><small>D-Star:</small></td>\n<td style=\"vertical-align: top;\"><small style=\"font-style: italic;\">$dstar</small><br></td></tr>\n"
```
The script iself is commented pretty well to explain how it works. Minimal modification is required for operation. The main requirement is you can either access the
dashboard from the system running the script, or can remotely execute the script on a machine that can. Since putting your Pi-Star's dashboard on the internet is risky
without reverse proxy; remote execution via SSH and key-based authentication is recommended.
The script's output is literally pre-formatted HTML:
```
pi-star@pi-star(rw):~$ ./piscrape.sh
<tr><td style="vertical-align: top; font-family: Verdana; font-weight: bold; text-align: right;"><small>BM TG:</small></td>
<td style="vertical-align: top;"><small style="font-style: italic;">#3151 #98003 </small><br></td></tr>
```
The PHP executes the script, stuffs this information in the proper place, as well as adding a time-stamp:
```php
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NQ4T Hotspot Info</title>
</head>
<body>
<div style="margin-right: auto; font-family: Verdana; text-align: left;"><big>
</big><small><span style="font-weight: bold;">NQ4T Pi-Star Hotspot
Network</span><br>
<br style="font-weight: bold; font-style: italic;">
<span style="font-weight: bold; font-style: italic;">Current
Connections:</span><br>
</small><big>
</big>
<table
style="border: 1px solid black; text-align: left; border-collapse: collapse;"
cellpadding="2" cellspacing="0">
<tbody>
<?php
$output = shell_exec('/media/html/qth-nq4t/hotspot13alpha.sh');
echo "$output";
?>
</tbody>
</table>
<big>
</big><small><br style="font-style: italic; font-weight: bold;">
<span style="font-style: italic; font-weight: bold;">Listed connections
do not mean I have a radio on or am at a radio.<br>This is especially true
for Brandmeister.</span><br
style="font-weight: bold; font-style: italic;">
<span style="font-style: italic; font-weight: bold;"> For informational
purposes only.
</span><br>
<br>
73 de NQ4T
<br>
<?php
echo date("Y-m-d") . " @ " . date("H:i:s") . "z";
?>
</small>
</div>
</body>
</html>
```
Most of this was actually based off of [Pi-StAPrS](https://nq4t.com/software/pistaprs) and was designed to be embedded in a QRZ profile page.
Full source code is available in the [repository](https://git.pickmy.org/nq4t/piscrape).
Loading…
Cancel
Save