Author Topic: one button mark waypoint and begin audio record...the same button stop and save  (Read 885 times)

Offline 11elevenths

  • More than Newbie
  • *
  • Posts: 32
  • Thanked: 1 times
    • View Profile
  • Device: A10
I use locus while riding a motorcycle with gloves which makes operating the phone impossible without a stylus.  We ride on and off-road.  I recently learned about remotes from https://youtu.be/mNpsNsMi0Xc

I'm using this one https://www.amazon.com/gp/product/B07FNL1SRM/ref=ppx_yo_dt_b_asin_title_o00_s01?ie=UTF8&psc=1

I can now zoom out and pan and recenter as I ride which is great.  I would like to be able to use a button on this remote to one click mark waypoint and begin audio record and then click the same button again to save with time/date stamp as name.  This way I have an audio description for when I get home and want to file it.

I was told Tasker could do this.  I know nothing about it.  Can anyone point me in the right direction or provide a working takser file that triggers something that I could use as a template???

tia
 

Offline tapio

  • Expert
  • Master of Locus
  • ****
  • Posts: 913
  • Thanked: 195 times
  • Country: 00
    • View Profile
Just time for a short note. The way Tasker communicates with Locus is via Intents. You will need that. So this way e. g. it can set a waypoint.

https://github.com/asamm/locus-api/wiki/Action-tasks-(Broadcasts)
LM4 USER ID: 1AACAFF2A2
My "Tasker vs. Locus" YouTube playlist: http://tiny.cc/LocusVsTasker
 

Offline 11elevenths

  • More than Newbie
  • *
  • Posts: 32
  • Thanked: 1 times
    • View Profile
  • Device: A10
Thanks for the response.  I am not sure what to do with the link to GitHub???  Do I download this: https://play.google.com/store/apps/details?id=falcosc.locus.addon.tasker

then download the taster app itself?

then what?

tia
 

Offline lor74cas

  • Expert
  • Padavan of Locus
  • ***
  • Posts: 427
  • Thanked: 73 times
  • Country: it
    • View Profile
  • Device: Samsung A53 / Samsung A5 2017
Hello,
I tried to verify the use of the intent for registering a waypoint.
Apart from the fact that you must already have a track recording in progress and this would not be a big obstacle as you should already have one running if you want to record a point, or you could at least start the recording directly by pressing the same button for saving the waypoint itself if it is not active.
The waipoint registration intent works and is precisely the one suggested by tapio, but it has a problem, I can't get the auto save option to work with the direct creation of the intent with tasker's "send intent" and not even using the Falcosc plugin.
So it is always necessary to give the ok to save.
I also saw that it is possible to start the audio recording after the generation of the waypoint inside the locus, but in this case you have to give the input to stop the recording and a new input to save the waypoint.
@menion are there any intent parameters that I can use to prompt locus to record the waipoint, start an audio recording of X seconds and then save automatically?
With the Falcosc plugin, for the name to pass to the waypoint (I use date and time as name) and the start of the audio recording there is no problem.
However, you need the active autosave and the ability to pass the value of X to end the audio recording.
Locus Map 4
Locus Map for Garmin
Locus Tasker
Geocaching4Locus
 
The following users thanked this post: tapio

Offline 11elevenths

  • More than Newbie
  • *
  • Posts: 32
  • Thanked: 1 times
    • View Profile
  • Device: A10
wow this is like watching rocket scientists at work...you have lost me but I am watching.

how about a set duration then save without the save action.  ie...I press a button on my remote (not android phone) and it triggers a waypoint in my track I'm recording and begins and audio recording and ends in 10 seconds and saves by itself.  That would work great for me.
 

Offline freischneider

  • Expert
  • Professor of Locus
  • *****
  • Posts: 1070
  • Thanked: 131 times
    • View Profile
  • Device: Xiaomi Redmi Note 10 Pro, Android 11, Locus Map 4 Gold, Locus-Device-ID: aa54a2bc9
As I understand it, he does not want to stop the recording after x seconds but via BT button.
Idea in theory:
Tasker:
BT button starts recording
BT button again stops recording
Recording is saved under xy
Intent to Locus: New waypoint with audio recording (here you still needed a parameter that says: add saved audio recording under xy and save waypoint).
Then audio recording is deleted again under xy.

Translated with www.DeepL.com/Translator (free version)
 

Offline lor74cas

  • Expert
  • Padavan of Locus
  • ***
  • Posts: 427
  • Thanked: 73 times
  • Country: it
    • View Profile
  • Device: Samsung A53 / Samsung A5 2017
wow this is like watching rocket scientists at work...you have lost me but I am watching.

how about a set duration then save without the save action.  ie...I press a button on my remote (not android phone) and it triggers a waypoint in my track I'm recording and begins and audio recording and ends in 10 seconds and saves by itself.  That would work great for me.
Exactly.
Pressing the button the point is created, a beep warns the start of the audio recording another beep the end of the recording without the need for any other user intervention and without even having to look at the display.
Locus Map 4
Locus Map for Garmin
Locus Tasker
Geocaching4Locus
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12854
  • Thanked: 973 times
  • Country: cz
    • View Profile
    • https://www.asamm.com
  • Device: Pixel 5, A12
@lor74cas
Basic "add_wpt" with "auto_save" parameter does not work? Hmm, I see no problem in the code, so should I check it more precisely?

Audio recording automatically stopped after a few secs: heh interesting idea. It is technically doable, but it needs a little bit bigger modification in my code. Well ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 final download
 

Offline tapio

  • Expert
  • Master of Locus
  • ****
  • Posts: 913
  • Thanked: 195 times
  • Country: 00
    • View Profile
@lor74cas
Basic "add_wpt" with "auto_save" parameter does not work? Hmm, I see no problem in the code, so should I check it more precisely?

Audio recording automatically stopped after a few secs: heh interesting idea. It is technically doable, but it needs a little bit bigger modification in my code. Well ...

No, autosaving works, I use it always. All options work. Will post a task.

EDIT: https://taskernet.com/shares/?user=AS35m8kdDIMDeveQcQfRglam%2Fah1mTW%2FWcg05FZ39c0i1q%2F77iY3E7cIwxCkXqJTaTA%3D&id=Task%3AfGPS_StopLog

Have a look Lorcas, line 38. It's part of my auto recording logic. Package name (menion.android.locus) is in a var here.

EDIT2: AH you need to auto save wp, not track. Also works. Here's the relevant command:
https://taskernet.com/shares/?user=AS35m8kdDIMDeveQcQfRglam%2Fah1mTW%2FWcg05FZ39c0i1q%2F77iY3E7cIwxCkXqJTaTA%3D&id=Task%3Atestest

Here you can see I make use of the new "Description" property of add_wp.

I have no experience with audio/photo wp, I'd probably use a standard wp and do the media part outside of Locus.
« Last Edit: March 28, 2022, 09:22:40 by tapio »
LM4 USER ID: 1AACAFF2A2
My "Tasker vs. Locus" YouTube playlist: http://tiny.cc/LocusVsTasker
 
The following users thanked this post: Menion

Offline tapio

  • Expert
  • Master of Locus
  • ****
  • Posts: 913
  • Thanked: 195 times
  • Country: 00
    • View Profile
Maybe what I wrote is useless, because I do not make us of 'action_after: "[audio,photo,video]"'
LM4 USER ID: 1AACAFF2A2
My "Tasker vs. Locus" YouTube playlist: http://tiny.cc/LocusVsTasker
 
The following users thanked this post: lor74cas

Offline lor74cas

  • Expert
  • Padavan of Locus
  • ***
  • Posts: 427
  • Thanked: 73 times
  • Country: it
    • View Profile
  • Device: Samsung A53 / Samsung A5 2017
Maybe what I wrote is useless, because I do not make us of 'action_after: "[audio,photo,video]"'
It was not useless, on the contrary I understood where I was wrong with auto_save which I confirm works, thanks.
Unfortunately audio + auto_save does not produce any recording, as I believe it creates the waypoint and immediately saves it without recording any audio file. In any case, a variable would be needed to establish the number of seconds of recording to be made, it would also be nice to insert a beep at the start and end of recording (but this is feasible with tasker).
Locus Map 4
Locus Map for Garmin
Locus Tasker
Geocaching4Locus
 

Offline 11elevenths

  • More than Newbie
  • *
  • Posts: 32
  • Thanked: 1 times
    • View Profile
  • Device: A10
I'm about to get tasker.  Can I assume that the links Tapio posted will go in to the app and become clickable and create a waypoint and save it with time/date as name?  But the audio recording part is still conceptual?