Commit Graph

1194 Commits

Author SHA1 Message Date
Jan-Piet Mens
c0f01a35eb Merge pull request #474 from patthoyts/pt/issue-450
issue #450: add card data to websocket notifications
2024-06-16 08:57:55 +02:00
Jan-Piet Mens
be7a172baf Merge pull request #473 from patthoyts/pt/with-tz-no
Enable building when WITH_TZ=no to disable timezone information.
2024-06-16 08:55:49 +02:00
Pat Thoyts
6476cb4ec7 issue #450: add card data to websocket notifications
When processing the most recent location update this gets pushed over the
websocket to update the live map last position. If a card is present it
needs to be added just before this push occurs.
2024-06-15 16:28:55 +01:00
Pat Thoyts
020212e55a Enable building when WITH_TZ=no to disable timezone information.
Puts the tzinfo function and calls into a guarded block so that the
config option can be turned off and still build the project.
In line_to_location, put the whole if statement in a guarded block as
both parts are using guards anyway.

Signed-off-by: Pat Thoyts <pat.thoyts@gmail.com>
2024-06-15 15:57:32 +01:00
Jan-Piet Mens
5f2723800d Merge pull request #471 from patthoyts/correct-view-lastpos
Fix the view lastpos response.
2024-06-15 11:21:48 +02:00
Jan-Piet Mens
61922fcf52 Merge pull request #472 from patthoyts/pt/issue-313
issue #313: handle out-of-order location notification
2024-06-15 11:18:55 +02:00
Pat Thoyts
4fc1a083ed issue #313: handle out-of-order location notification
When receiving a location update check that it is newer than the last
update from the same device before updating the 'last' record. This
ensures the 'last' record is always the most recent update from the device
in the event updates arrive out of order.
2024-06-14 21:22:45 +01:00
Pat Thoyts
eb001ef2aa Fix the view lastpos response.
The locarray json data is transferred to the response object and if
it is deleted here results in an empty object being returned to the user
and the default view just shows "Imported data is malformed" instead of
a map. This restores the vmap functionality.

Signed-off-by: Pat Thoyts <pat.thoyts@gmail.com>
2024-06-14 00:34:50 +01:00
Jan-Piet Mens
81edd329f8 free json used on views themselves
closes #464
2024-05-25 09:01:46 +02:00
Jan-Piet Mens
1393415c5d tabs 2024-05-24 22:09:19 +02:00
Jan-Piet Mens
2ebcc4ae6b free no-longer needed json data
addresses https://github.com/owntracks/recorder/issues/464
2024-05-24 21:45:40 +02:00
Jan-Piet Mens
f1fad31a9b now really ignore _type=transition if data is not string 2024-04-02 10:53:37 +02:00
Jan-Piet Mens
1a913d319a remove spurious fprintf 2024-04-02 10:53:37 +02:00
Jan-Piet Mens
3c6b2c3bf3 Merge pull request #460 from nickswalker/nick/waypoint-transition-fix
Don't check fences when user submits a waypoint
2024-04-02 10:53:19 +02:00
Jan-Piet Mens
2e54fd0f46 Merge pull request #459 from nickswalker/nick/putrec-last-websocket
Make putrec hook also decide whether `last` and websocket update
2024-04-02 10:52:13 +02:00
Nick Walker
d5216eba96 Make putrec hook also decide whether last and websocket receive a message
Current hook just governs whether the record is written, but this means that the `last` file
and the live websocket would still be updated with data that the user decided to filter. Now
we use the hook to skip those steps as well.
Update HOOKS.md to note the functionality change
2024-03-30 20:33:45 -07:00
Nick Walker
475f074505 Don't check fences when user submits a waypoint
The coordinates of this waypoint may or may not be their current location, but
if they  happen to cause the user to move across a waypoint radius boundary, this
check will fire the lua hook with a transition event
2024-03-30 20:09:40 -07:00
Jan-Piet Mens
c56c68aefb Merge pull request #457 from franchyze923/master
add alt field to geojson
2024-03-05 00:49:32 +01:00
franchyze923
a998bb8fba add alt field to geojson
add alt (altitude) field to geojson
2024-03-04 18:39:53 -05:00
Jan-Piet Mens
5b10981d44 add more type checking
closes #454
2024-02-26 19:16:40 +01:00
Jan-Piet Mens
e9da6f9180 crash on non-string event name in _transition messages
addresses #454
2024-02-26 16:54:34 +01:00
Jan-Piet Mens
c80b9a11f3 reformat json if it contains newlines/tabs before storing in .rec
fixes https://github.com/owntracks/recorder/issues/437
2024-02-24 10:08:40 +01:00
Jan-Piet Mens
63e0132b05 add version to variables 2024-02-23 12:50:23 +01:00
Jan-Piet Mens
934aaec847 NEW: cached geo records can be auto-expired by setting OTR_CLEAN_AGE
fixes #447
2024-02-18 13:11:31 +01:00
Jan-Piet Mens
2fd85efff3 NEW: option -J prints variables in JSON format, for scripting 2024-02-18 13:06:25 +01:00
Jan-Piet Mens
5cf088332e in http mode friends' data must contain a topic; construct it or retrieve from last if available
fixes #451
2024-02-10 21:51:25 +01:00
Jan-Piet Mens
a865d8da56 2024-02-06 version 0.9.7
- FIX: Tour data (requests and submissions) contain corrupt data in .rec file
b/c of pretty-printing (#437)
- UPD: Change permissions (+r) on binaries (#428)
- NEW: Add support for dumping POI in GeoJSON format (#439)
- FIX: create {static,utils}/index.html to avoid directory listing
- FIX: remove HikeBike layer (and control) from views (#442)
- UPD: Autoload track in Recorder views / tours (#441)
- NEW: Optionally enhance API data with timezone at location's position (#444)
- UPD: locations API returns Recorder version number alongside count/status
- NEW: add experimental utility with which to enhance ghash/ with tzdata
- UPD: location and tzname are stored in ghash cache only if they're non-null
- UPD: Reduce default size of LMDB to 5368709120 (5GB); it can be configured via environment
- UPD: Improve gcache error handling
- FIX: Add missing OTR_HTTPPREFIX to ot-defaults (#440)
0.9.7
2024-02-06 08:53:36 +01:00
Jan-Piet Mens
99c3e26280 fix wrong statement 2024-02-05 21:25:48 +01:00
Jan-Piet Mens
4848ecaea3 log accessibility of TZDATADB on start 2024-02-05 20:24:29 +01:00
Jan-Piet Mens
cd051428a5 install to correct dest 2024-02-05 18:50:08 +01:00
Jan-Piet Mens
ce3bcdb6a2 satisfy docker build 2024-02-05 18:11:05 +01:00
Jan-Piet Mens
9713094da9 comment ipv4/v6 2024-02-05 08:18:22 +01:00
Jan-Piet Mens
c042aa9bf7 document OTR_LUASCRIPT 2024-02-05 08:15:07 +01:00
Jan-Piet Mens
2dedabedc9 clarify comment 2024-02-03 22:07:11 +01:00
Jan-Piet Mens
de887bc2ae Add missing config to ot-recorder defaults
closes #440
2024-02-03 22:06:02 +01:00
Jan-Piet Mens
64c161d942 clarify comment 2024-02-03 10:19:37 +01:00
Jan-Piet Mens
1f7b30fb90 missing variable 2024-02-02 20:36:52 +01:00
Jan-Piet Mens
1993f6f451 improve error handling in gcache 2024-02-02 20:22:36 +01:00
Jan-Piet Mens
0a76f73513 Reduce default size of LMDB to 5368709120 (5GB) 2024-02-02 19:32:06 +01:00
Jan-Piet Mens
0646a9d700 store location and tzname only if they're non-null 2024-02-01 22:37:51 +01:00
Jan-Piet Mens
21dd155b66 link with math lib for linux 2024-02-01 18:30:49 +01:00
Jan-Piet Mens
c064b2f652 point to existing timezone16 file 2024-02-01 18:21:28 +01:00
Jan-Piet Mens
e213a0b8b1 bump (C) 2024-02-01 18:04:02 +01:00
Jan-Piet Mens
1daec5116d add experimental utility with which to enhance ghash/ with tzdata 2024-02-01 18:00:26 +01:00
Jan-Piet Mens
ea36109d72 elaborate tzname handling 2024-02-01 17:39:07 +01:00
Jan-Piet Mens
93b3c9aff2 append Recorder version number to JSON data in API locations 2024-02-01 17:32:58 +01:00
Jan-Piet Mens
e2d1359e4b avoid switching $TZ on every location
addresses #444
2024-02-01 17:26:38 +01:00
Jan-Piet Mens
d563099b76 document tzname and isolocal 2024-02-01 17:22:18 +01:00
Jan-Piet Mens
f864184d1d clarify what geojsonpoi returns 2024-02-01 17:17:48 +01:00
Jan-Piet Mens
a36fae995f ensure tzname / isolocal also in API last 2024-02-01 12:24:37 +01:00