owntracks / ios

OwnTracks' iPhone App
http://owntracks.org
Other
328 stars 91 forks source link

reportLocation command not sending location in Manual mode #800

Open yakeer opened 1 month ago

yakeer commented 1 month ago

Hey, I'm using OwnTracks iOS in Manual Mode, with iOS 17.5.1. Location set to always, Sending messages to a private MQTT Server (RabbitMQ) over the internet.

My HomeAssistant Mosquitto MQTT is bridged to the RabbitMQ.

I'm sending a reportLocation command, And the app is not sending location, even if in foreground.

Is there a known issue? Or am I doing something wrong?

jpmens commented 1 month ago

I'm not sure reportLocation will work in Manual mode:

The user has to publish the current location explicitly via the UI. You use this if you want to (temporarily) avoid friends seeing where you are

Try seting the device in Significant Changes mode and try again. You'll also want to publish the request with qos>0

ckrey commented 1 month ago

Show us the command and topic you are sending to. And show us your iOS config (sub, subTopic, sunQos, cmd, allowRemoteLocation)

ckrey commented 1 month ago

And no, it is not responding in Manual mode

ckrey commented 1 month ago

This is intended, not a bug

yakeer commented 1 month ago

while writing you the config, I've seen the the cmd toggle is set to off. turned it on and it works.

Maybe it's a good idea to put it default true.

Thank, and sorry.

yakeer commented 1 month ago

Btw, it's sending commands while in manual mode.

jpmens commented 1 month ago

You wrote

it's sending commands while in manual mode

Do you mean the device is responding to a reportLocation while in Manual mode?

ckrey commented 1 month ago

Then it is a bug!

yakeer commented 1 month ago

Well, that was a good bug for my application :)

Maybe it's better to add it as an option? Whether to send commands in Manual mode?

jpmens commented 1 month ago

It's not "sending commands"; it's responding to a reportLocation request, and no we won't add that as an option. When a user sets the device to Manual they don't wish to make it known where they are; hence we should not respond.

jpmens commented 1 month ago

Also note, the bug has been fixed, and will no longer be there in the next version, so please don't rely on it!

yakeer commented 1 month ago

It's not "sending commands"; it's responding to a reportLocation request, and no we won't add that as an option. When a user sets the device to Manual they don't wish to make it known where they are; hence we should not respond.

My idea is to preserve battery as much as possible, and only send the location whenever requested. Is there any other possible option to achieve that in a different manner?

jpmens commented 1 month ago

I don't think you'll see a great battery consumption if you set the device to Significant Changes mode... Have you tried?

jpmens commented 1 month ago

Over the last 10 days my iPhone 13 mini has consumed 15% battery on the "Home & Lock Screen" (!) with 5% in OwnTracks (Significant mode)