Code Monkey home page Code Monkey logo

hunterlog's Introduction

Hunterlog

GitHub Release

THIS IS NOT YOUR MAIN LOGGING PROGRAM!

This is a replacement for the excellent potaplus Chrome browser extension. If you have used that then this application should be very familiar.

This application allows you to browse the current POTA spots, QSY your rig via FLRIG, and log them to your logger through a remote ADIF message.

Demo of the goods

Community

If you're not comfortable using Github to submit issues and enhancement requests, feel free to join our Discord community server. Hop in and ask questions, share comments, propose new features or get help using Hunterlog.

Discord Invite Link

Download

Hunterlog is in active development and any feedback is welcome. Here are the download links:

Release page v0.0.5

Windows Download

Ubuntu Download

Usage

On Windows, run the executable in any folder.

On Linux, you may have to chmod +x the executable file and run it via the terminal.

The very first thing you should notice is that the default configuration is for N0CALL. You must change your callsign and gridsquare. Click the CONFIGURATION button next to the callsign and input your callsign and your gridsquare.

Configuration

Let's look at the configuration options.

Configuration options

My Callsign and My Gridsquare are your base callsign and home QTH 6 digit Maidenhead gridsquare. Your call should also be what your POTA user account is registered as.

CAT settings

First is a drop down selection of CAT interface types. Currently those are FLRIG or RIGCTLD (hopefully more will be added). Host and Port are the two needed values are the remote endpoint of the CAT control instance that's running. The default FLRIG port is 12345.

The modes strings are for setting specific modes if your rig needs something besides CW for setting CW mode or something besides USB for FT-x modes.

Logger settings

The logger settings includes radio buttons for the logger type. Select TCP to use a TCP socket (a la Logger32) or UDP to use a UDP socket (a la Log4OM). These two both send raw ADIF data to the remote endpoint.

Select AcLog if you use N3FJP's AcLog as it has special requirements for the data.

Remote ADIF Host and port:

The remote endpoint data to send logged QSOs. This computer should be running Logger32, Log4om, AClog, or any other logger that accepts raw ADIF over network connections.

QTH string

When spotting on the POTA network the RST you put in the QSO entry is added to your spot comment. This string is appended directly after the RST sent with a whitespace before it.

Click save to store the changes. Then click the refresh button on the main screen to see your callsign and your configured Gravatar. You have a POTA account right?

Stats

STATISTICAL DATA SHOWN IN THIS APP IS NOT AUTHORITATIVE The authoritative data of record is your data in https://pota.app

πŸ‘‰ For instructions on importing stats See the STAT guide πŸ‘ˆ

If you want to see your some nice stats like the POTAPlus addon, you need to update your stats using the STATS menu. There are three options here:

Stat Menu Buttons

The most important one is the PARK STATS. You will want that to import that so you can see what parks you need to hunt. Importing the park stats can take a long time so go read the STATS guide

Logging QSOs

Click a spot to load the QSO info into the top portion of the screen. Click green frequency button to QSY with CAT control. Click Log QSO after you've had the contact. The app will update stats and send the QSO data (with any modifications you do to the input) to your main logger.

It also will store a copy locally in hunter.adi as well as in the database. This is for your convenience.

Spotting

You can now spot/re-spot activators through Hunterlog. When this is done the RST Sent and COMMENT QSO field are used to build the spot comment. Other posted spot info also comes from the QSO entry fields: Frequency, Callsign, and Mode. These will be sent to the POTA website and everyone will be able to see them.

Files

Running the app will create the spots.db which is very important as it will contain all your qsos, configuration settings and stats such as parks and locations. You should back up this file occasionally and back it up before upgrading to newer versions of Hunterlog.

The file index.log is the application's log file. It is not the same as the Javascript console that maybe seen when inspecting the webpage.

Bug reporting

This app is currently under pre-release. Please report bugs here on Github issues. In your report, please include both the app version number and the db version number. Both are displayed at the very bottom of Hunterlog.

- Cainan N9FZ

hunterlog's People

Contributors

cwhelchel avatar emersonveenstra avatar

Stargazers

Adam avatar Josh Averyt avatar Nic Heath avatar Karl Heinz Kremer avatar Pablo avatar Kevin Lo avatar

Watchers

 avatar

Forkers

emersonveenstra

hunterlog's Issues

Enhancement: Keep Spots Header Row Visible

Keep the Spots Table column headings from scrolling with the spots table entries so that the headings stay visible under the filters rows (hide QRT, hide hunted, etc). In this way the headings will be available to sort the spots when you have scrolled down the Spots table.

  • Windows 10 Pro
  • Hunterlog version: 0.0.2
  • Hunterlog database version: 922a7b854b71

TX_PWR not present in logged adif QSOs

Describe the bug
TX_PWR not present in logged QSO

To Reproduce
Log a qso with default power to some value...

Expected behavior
It should log with TX_PWR adif field set to the default configured value

Desktop (please complete the following information):

  • OS: Windows
  • Hunterlog application version: 0.0.1L

Bug when spot sources are long strings.

For spot comments, the source property can be longer than the configured DB column.

VM9:451  Uncaught (in promise) Traceback (most recent call last):
  File ".venv\lib\site-packages\webview\util.py", line 194, in _call
    result = func(*func_params.values())
  File "src\api.py", line 65, in insert_spot_comments
    self.db.insert_spot_comments(spot.activator, spot.reference, comms)
  File "src\db\db.py", line 235, in insert_spot_comments
    to_add = ss.load(comments, session=self.session)
  File ".venv\lib\site-packages\marshmallow_sqlalchemy\load_instance_mixin.py", line 100, in load
    return super().load(data, **kwargs)
  File ".venv\lib\site-packages\marshmallow\schema.py", line 723, in load
    return self._do_load(
  File ".venv\lib\site-packages\marshmallow\schema.py", line 910, in _do_load
    raise exc
marshmallow.exceptions.ValidationError: {59: {'source': ['Longer than maximum length 10.']}}

this was caused by this spot comment, thanks Matt πŸ˜†:

K1MBK
CW on 20m (14056 kHz) at 00:08 UTC via Ham2K Portable Logger
CW [Ham2K PoLo]

Add support for manual entry of QSO details.

From #2

Entering data
β—‹ Not an issue for clicking on parks but for manual entry:
Β§ Callsign should uppercase
Β§ Mode should have a dropdown
Β§ Input validation ?

Expected new behavior:

  • Input callsign (default uppercase)
    • Lookup activator on focus change
  • Input mode
    • unsure if I want to have a drop down or validate this. Who's the mode authority? ADIF spec, POTA, someone else?
  • Input park
    • lookup park details on focus change

Allow spotting from here? Not sure if that will work

Retain Column Sort selections between sessions.

Like the storing of filter option selections, store the last used column sort options. Both the selected column and the direction (ASC or DESC) should be stored and restored.

Probably do this in the frontend localstorage as well.

ref #2

Add hunted park map.

Exactly same concept as my other project

The data to display a map with hunted parks colored differently is available in hunterlog.

Probably use Leaflet and convert park data to geojson and store it.

Timeout errors on computers with bad connections.

If left long enough on my Wifi connected HP Elitedesk desktop-mini computer the wifi barfs and this error is produced, which stops the backend thread from running and keeps spots from getting updated:

2024-03-29 08:47:54,817 = INFO    [root]: thread heartbeat
2024-03-29 08:47:54,817 = DEBUG   [root]: updating db
2024-03-29 08:47:54,832 = DEBUG   [urllib3.connectionpool]: Starting new HTTPS connection (1): api.pota.app:443
2024-03-29 08:49:18,948 = ERROR   [root]: error caught in do_update
2024-03-29 08:49:18,948 = ERROR   [root]: HTTPSConnectionPool(host='api.pota.app', port=443): Max retries exceeded with url: /spot/activator (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000014823B393A0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
Traceback (most recent call last):
  File "urllib3\connection.py", line 198, in _new_conn
  File "urllib3\util\connection.py", line 85, in create_connection
  File "urllib3\util\connection.py", line 73, in create_connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "urllib3\connectionpool.py", line 793, in urlopen
  File "urllib3\connectionpool.py", line 491, in _make_request
  File "urllib3\connectionpool.py", line 467, in _make_request
  File "urllib3\connectionpool.py", line 1099, in _validate_conn
  File "urllib3\connection.py", line 616, in connect
  File "urllib3\connection.py", line 213, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000014823B393A0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "requests\adapters.py", line 486, in send
  File "urllib3\connectionpool.py", line 847, in urlopen
  File "urllib3\util\retry.py", line 515, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.pota.app', port=443): Max retries exceeded with url: /spot/activator (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000014823B393A0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "index.py", line 27, in do_update
  File "pota\pota.py", line 23, in get_spots
  File "requests\api.py", line 73, in get
  File "requests\api.py", line 59, in request
  File "requests\sessions.py", line 589, in request
  File "requests\sessions.py", line 703, in send
  File "requests\adapters.py", line 519, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.pota.app', port=443): Max retries exceeded with url: /spot/activator (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000014823B393A0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

Probably should just swallow the TimeoutError, print a warning and keep on chugging.

Add support for logging to Logger32

Logging a QSO via 'Default' does not work to log to logger32. This is because Logger32 needs a TCP socket and not a UDP socket.

Ease of use, turn the default option into a TCP options and the Log4om to a UDP option. The config text will use Logger32 as an example for TCP and Log4om as an example for UDP.

Saving of previous hunterlog window position

Saving of the previous window size and position works well if I only use my laptop screen. However, when I put the hunterlog window on the extended desktop screen, the position is not remembered. upon opening again, window reverts to the laptop screen.

Add ability to toggle between dark and light mode.

The react based MUI components should support this already (the current them was just their example dark them with green POTA colors).

Just need to add UI elements to toggle between light and dark mode.

Add support for multiple activators

Add a UI to allow comma or space separated callsign list of multi-op activations. We could also read in spot comments from POTAPlus spots where these are formatted like this IIRC {with N9FZ N0CALL}

When QSO's are logged with multiple operators the app should log multiple QSOs with the same park details.

Feedback after initial testing

I've been doing some testing and wanted to provide feedback. As per our discussing in Slack (I'm K2DBK), I'm posting this here so that it doesn't get lost.

β€’ Display
	β—‹ Too much unused space vertically, can only get a few parks listed.
	β—‹ Multiple activator comments push down park list much farther (see screenshot)
		Β§ Even without lots of comments pam takes up around 1/3 of the display
		Β§ Possibly add timestamps or limit to last 'x' hours?
		
β€’ Configuration:
	β—‹ Add comments or method to indicate "I don’t use this" for FLRIG & ADIF
		Β§ Should be able to disable anything that could use a port to reduce chance of conflict with other software
β€’ Stats:
	β—‹ Move this to under Configuration or at least change to "import stats".
	β—‹ Add some kind of progress indicator when importing Park stats (LONG time)
	β—‹ I don't have any reasonable way to export the park info into an ADIF file, my logger (DX4WIN) doesn't support that. Is there a way to grab the info directly from POTA (even if it requires supplying credentials)?
β€’ Can there be an indicator for new (to me) parks instead of just leaving it blank?
β€’ Filters
	β—‹ Enhancement - Allow multiple selections per filter (e.g., allow FT-4 and FT-8 at the same time)
β€’ Startup
	β—‹ Doesn't restore window size/position
	β—‹ Opens devtools (presumably intentional but wanted to mention)
	β—‹ Column sort order not retained when re-starting
β€’ Entering data
	β—‹ Not an issue for clicking on parks but for manual entry:
		Β§ Callsign should uppercase
		Β§ Mode should have a dropdown
		Β§ Input validation ?
β€’ Misc
	β—‹ Clicking on Export Logged QSOs or Export Park Info should provide some feedback that it worked

image

Database locked error when logging.

Describe the bug
Occurred with logging a normal QSO. This maybe an issue with logging while refreshing... but not sure. A fix for #11 would help to alert the user that some error occured. Logging the QSO a second time worked as expected.

Javascript console:

Uncaught (in promise) Traceback (most recent call last):
  File "webview\util.py", line 194, in _call
  File "api.py", line 248, in log_qso
UnboundLocalError: local variable 'id' referenced before assignment

index.log

<snip>

2024-04-07 13:13:25,441 = DEBUG   [api]: sending spot for KO4IZK on 7212
2024-04-07 13:13:25,453 = DEBUG   [urllib3.connectionpool]: Starting new HTTPS connection (1): api.pota.app:443
2024-04-07 13:13:25,535 = DEBUG   [urllib3.connectionpool]: https://api.pota.app:443 "GET /park/US-3728 HTTP/1.1" 200 392
2024-04-07 13:13:25,541 = DEBUG   [api]: updating park stat for: {'parkId': 3728, 'reference': 'US-3728', 'name': 'Providence Canyon', 'latitude': 32.0644, 'longitude': -84.9219, 'grid4': 'EM72', 'grid6': 'EM72mb', 'parktypeId': 101, 'active': 1, 'parkComments': None, 'accessibility': None, 'sensitivity': None, 'accessMethods': 'Automobile,Foot', 'activationMethods': 'Automobile,Pedestrian,Shelter', 'agencies': None, 'agencyURLs': None, 'parkURLs': None, 'website': 'https://gastateparks.org/ProvidenceCanyon', 'createdByAdmin': None, 'parktypeDesc': 'State Park', 'locationDesc': 'US-GA', 'locationName': 'Georgia', 'entityId': 291, 'entityName': 'United States of America', 'referencePrefix': 'US', 'entityDeleted': 0, 'firstActivator': 'AD4XT', 'firstActivationDate': '2019-02-10'}
2024-04-07 13:13:25,550 = DEBUG   [root]: increment hunts for park US-3728
2024-04-07 13:13:25,937 = DEBUG   [urllib3.connectionpool]: https://api.pota.app:443 "POST /spot/ HTTP/1.1" 200 10330
2024-04-07 13:13:25,939 = DEBUG   [potaApi]: code: 200 : OK
2024-04-07 13:13:31,087 = ERROR   [api]: Error logging QSO to db:
2024-04-07 13:13:31,087 = ERROR   [api]: (sqlite3.OperationalError) database is locked
[SQL: UPDATE parks SET hunts=?, last=CURRENT_TIMESTAMP WHERE parks.id = ?]
[parameters: (1, 2571)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Traceback (most recent call last):
  File "sqlalchemy\engine\base.py", line 1960, in _exec_single_context
  File "sqlalchemy\engine\default.py", line 924, in do_execute
sqlite3.OperationalError: database is locked

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "api.py", line 238, in log_qso
  File "db\park_query.py", line 109, in inc_park_hunt
  File "sqlalchemy\orm\scoping.py", line 597, in commit
  File "sqlalchemy\orm\session.py", line 1972, in commit
  File "<string>", line 2, in commit
  File "sqlalchemy\orm\state_changes.py", line 139, in _go
  File "sqlalchemy\orm\session.py", line 1257, in commit
  File "<string>", line 2, in _prepare_impl
  File "sqlalchemy\orm\state_changes.py", line 139, in _go
  File "sqlalchemy\orm\session.py", line 1232, in _prepare_impl
  File "sqlalchemy\orm\session.py", line 4296, in flush
  File "sqlalchemy\orm\session.py", line 4432, in _flush
  File "sqlalchemy\util\langhelpers.py", line 146, in __exit__
  File "sqlalchemy\orm\session.py", line 4392, in _flush
  File "sqlalchemy\orm\unitofwork.py", line 466, in execute
  File "sqlalchemy\orm\unitofwork.py", line 642, in execute
  File "sqlalchemy\orm\persistence.py", line 85, in save_obj
  File "sqlalchemy\orm\persistence.py", line 912, in _emit_update_statements
  File "sqlalchemy\engine\base.py", line 1408, in execute
  File "sqlalchemy\sql\elements.py", line 513, in _execute_on_connection
  File "sqlalchemy\engine\base.py", line 1630, in _execute_clauseelement
  File "sqlalchemy\engine\base.py", line 1839, in _execute_context
  File "sqlalchemy\engine\base.py", line 1979, in _exec_single_context
  File "sqlalchemy\engine\base.py", line 2335, in _handle_dbapi_exception
  File "sqlalchemy\engine\base.py", line 1960, in _exec_single_context
  File "sqlalchemy\engine\default.py", line 924, in do_execute
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: UPDATE parks SET hunts=?, last=CURRENT_TIMESTAMP WHERE parks.id = ?]
[parameters: (1, 2571)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-04-07 13:13:33,677 = DEBUG   [root]: refreshing spots in frontend: window.pywebview.state.getSpots()
2024-04-07 13:13:33,685 = DEBUG   [api]: py get_spots
2024-04-07 13:13:33,868 = DEBUG   [api]: getting activator stats...
2024-04-07 13:13:33,869 = DEBUG   [db]: get_activator() basecall N3VAN
2024-04-07 13:13:33,874 = INFO    [api]: activator needs update from POTA API...

<snip>

Desktop (please complete the following information):

  • OS: Windows
  • Hunterlog application version: 0.0.2
  • Hunterlog database version: 922a7b854b71

Additional context
Was a normal SSB contact with an activator frequently hunted. Was just a new-to-me park.

Add some helpful links

In the activator info section, add a link to the activators QRZ page. Also, if CW, add a link to RBN.

In the park info section add a link to the park page on POTA.APP

Display spot time as a difference w/ current time.

In the spot viewer display age instead of spot time.

For example POTA.app will display time as '12 sec ago' or '9 mins ago'. Add a configuration option to allow users to pick their preferred display.

Add ability to spot/respot activators on the POTA spotting page.

POTAPlus allows you to spot, spot+log, or just log.

It will also autofill in your spot comment like so [{RST sent} {QTH MSG}] {your spot comment}

It will then post to the POTA webiste the spot with that comment at the logged frequency with the logged activator

Add support for CW-L and CW-R for some rigs (FTdx10)

Reported by Jim N5JGE:

rig will change from CW to USB, but not the other way.
This may be because the FTdx10 has CW-L and CW-U, but not "CW".\ like the 7300?

Currently the mode goes to CW on my ic7300 but I need to add option for specifying CW-L and CW-R for other rigs.

Optimize usage of vertical space in the app.

Currently there is a lot of wasted space in the app and the upper sections have too much prominence over the lower spot viewer table.

This can be fixed by optimizing the space used by the top section (margins, map size, activator info section) and making the spot viewer
rows more compact.

ref: #2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.