New API endpoint: stations #28

Closed
opened 2023-05-13 17:39:11 -05:00 by W1CDN · 5 comments
Owner

#1 mentions keeping a list of stations (from field in frames table) in a separate table and updating the location and timestamp every time a new frame is received.

This issue is for querying that table and exposing results to an endpoint, which should be less work than filtering down from the frames table results.

Rows in the stations table would be kept for much longer than rows in the frames table (months? a year?).

Would objects be stored in a separate table, or included here?

  • stations have a from callsign-SSID and no name
  • objects have a from callsign-SSID and a name
  • messages have a from callsign-SSID and format: 'message'
#1 mentions keeping a list of stations (`from` field in frames table) in a separate table and updating the location and timestamp every time a new frame is received. This issue is for querying that table and exposing results to an endpoint, which should be less work than filtering down from the frames table results. Rows in the stations table would be kept for much longer than rows in the frames table (months? a year?). Would objects be stored in a separate table, or included here? - stations have a `from` callsign-SSID and no name - objects have a `from` callsign-SSID and a name - messages have a `from` callsign-SSID and `format: 'message'`
Author
Owner

Like this from current dw logs and frontail. Fields like callsign, count, last heard, location, symbol?

image

Like this from current dw logs and frontail. Fields like callsign, count, last heard, location, symbol? ![image](/attachments/91e2170f-f459-40d6-9efc-b6b99f8d7825)
347 KiB
Author
Owner

Working on this in #30.

Working on this in #30.
Author
Owner

No, this will be a different PR. The query right now seems OK, and I turned off autoremove for now in 8f3b2ae707.

No, this will be a different PR. The query right now seems OK, and I turned off autoremove for now in https://amiok.net/gitea/W1CDN/aprs_tool/commit/8f3b2ae7075cc5c2df22ed9e1293e2690e31f4d8.
Author
Owner

Copied from #30 (comment):


Experimenting with new stations table.

CREATE TABLE "stations" (
	"id"	INTEGER NOT NULL UNIQUE,
	"from"	TEXT,
	"frames_id"	INTEGER,
	"last_heard_unix"	INTEGER,
	"count"	INTEGER,
	PRIMARY KEY("id" AUTOINCREMENT)
);

I set up a query in unique_stations() to show the station list for now, but if frames is cleaned up periodically (#31), the station list may still be useful in the future.

I have this comment in place in tcp_kiss_send_recv.py:
# TODO update stations table here

Copied from https://amiok.net/gitea/W1CDN/aprs_tool/pulls/30#issuecomment-947: ----- Experimenting with new `stations` table. ``` CREATE TABLE "stations" ( "id" INTEGER NOT NULL UNIQUE, "from" TEXT, "frames_id" INTEGER, "last_heard_unix" INTEGER, "count" INTEGER, PRIMARY KEY("id" AUTOINCREMENT) ); ``` I set up a query in `unique_stations()` to show the station list for now, but if `frames` is cleaned up periodically (#31), the station list may still be useful in the future. I have this comment in place in `tcp_kiss_send_recv.py`: `# TODO update stations table here`
Author
Owner

This has been completed.

This has been completed.
W1CDN closed this issue 2024-01-09 09:54:47 -06:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: W1CDN/aprs_tool#28
No description provided.