Comments (18)
There's a couple of showstopper bugs and at least one feature still to be sorted, but I'm plugging away at them.
from android.
Thanks @growse for fixing this! Looking forward to v2.5.0.
Thanks @jpmens for the help as well!
from android.
There’s something wrong with your mosquitto_pub command, IMO. First you’re missing a value for -h
and for -p
and second I’d use -l
(read line) instead of -s
(send file from stdin).
Other than that the command looks ok to me.
from android.
Sorry -- I forgot to escape the host and port on the post. I changed to -l
and now the 00
is not appearing when I publish the message, but the app is still throwing the message failed validation
error.
from android.
mosquitto_pub … -s
is adding an additional newline (\n
) to the payload, whereas -l
doesn’t. I’m assuming that’s the reason Android doesn’t recognized the cmd
.
from android.
Could you please humor me and try
printf '{"_type":"cmd","cmd":"reportLocation"}' | mosquitto_pub ... -l
(use printf i/o echo to completely avoid the newline)
from android.
Same thing
from android.
Is allowRemoteLocation
enabled (true
) in your settings? (Use the configuration editor to check/set)
from android.
hmmm, I'm not seeing allowRemoteLocation
in the config.
from android.
Forgive me for leading you up the garden path: the message needs an action
and not a cmd
in it:
mosquitto_pub -t owntracks/jpm/s8/cmd -m "$(jo _type=cmd action=reportLocation)" -q 1
This should provoke a location publish with t: r
in it:
{"_type":"location","t":"r","tid":"s8","tst":1699562723, ... }
from android.
OK, we're getting farther now! Now when the app receives the message it says "[...] Received incoming message: MessageCmd on [...]
. It's not pushing a location, though. Could it be related to the allowRemoteLocation
config option not being present? I tried adding it, but it said it wasn't a valid key.
from android.
from android.
Gotcha on allowRemoteLocation
only being on iOS.
The app is definitely connected to MQTT. It's seeing the MessageCmd come through, and I see it has an updated location. It's just not publishing the location back to MQTT.
I'm guessing it disregards the Minimal location displacement
and Location interval
when it gets the reportLocation
command?
from android.
It ought to just report the last obtained location, but I think we need expert help here now.
@growse management summary: cmd
with action: reportLocation
is coming in, but @snakedoctr's device isn't publishing a location (my S8 does). What are we doing wrong?
from android.
Do you have debug logging enabled? If so, do you see a On demand location request
debug log entry shortly after the Received incoming message
message?
from android.
I do:
2023-11-10 10:38:05.049 I MessageProcessor: Received incoming message: MessageCmd on owntracks/user/device
2023-11-10 10:38:05.051 D BackgroundService: On demand location request
2023-11-10 10:38:05.052 D GMSLocationProviderClient: Removing location updates clientcallback=201885842
2023-11-10 10:38:05.052 D GMSLocationProviderClient: Requesting location updates priority=0, interval=null clientCallback=201885842
2023-11-10 10:38:05.053 D GMSLocationProviderClient: transformed location request is Request[PRIORITY_HIGH_ACCURACY requested=3600000ms fastest=600000ms expireIn=60000ms num=1]
2023-11-10 10:38:05.082 D ConnectionPool: BackgroundService On-demand location result received: LocationResult(lastLocation=Location[fused <LAT>,<LON> hAcc=48.0 et=+0d13h18m30s28ms alt=120.0 vAcc=04.0 vel=0.0 sAcc=2.859375 {Bundle[{satellites=0, maxCn0=0, meanCn0=0}]}])
2023-11-10 10:38:05.155 D GMSLocationProviderClient: GMS Background location update request completed: Success=true Cancelled=false
from android.
Huh. So it's asking for, and receiving a location. The only thing that would prevent a location being published at that point is this conditional:
So it looks like the device is giving OT a location that's already been published. Now, this is definitely a bug, because the fact that it's an on-demand location request should override this check - that's been fixed in 2.5.0.
It's only going to get triggered when the device doesn't go and get a fresh location, which is what it should really do with a PRIORITY_HIGH_ACCURACY
location request.
from android.
Excited to try this as well. Any ETA on v2.5.0? Or Beta version that we can sign up for and exercise for you? :)
from android.
Related Issues (20)
- Drawing arbitrary GeoJSON on the map HOT 4
- setWaypoints command logging a JsonParseException in HTTP mode HOT 5
- Tasker integration
- Imperial Units in Android GUI
- Notifications for Friends arriving and departing Regions HOT 6
- owntracks doesn't have location permission "allow all the time" HOT 3
- location provider ping-pong? HOT 3
- MessageProcessorEndpointHttp: HTTP Delivery failed HOT 5
- Fully reset configuration when changing mode and/or host/port HOT 2
- Couldn't attach file when sharing log via gmail HOT 3
- MQTTv5 support
- Russian translation (2.5.0) HOT 15
- "Tap here to request notification permission" in 2.5.0 not working HOT 4
- Extend metrics with smartphone others sensors HOT 7
- No map visible on new install HOT 3
- [Feature Request] Support multiple groups of friends using one MQTT server HOT 2
- Expanding the extended data field to contain settings that may be non-optimal for operation HOT 23
- Return blank location packet for ping/manual location even though there is no location or accuracy is poor HOT 6
- Connection to HiveMQ dropping with an error HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android.