FIND (personalized indoor localization)

Are there any other portible devices able to youse find? I have looked a while ago and only found srh like the photon. Instead of my phone (which i leave lying around all the time) i would like yousing some watch or similiar, or even sth the size of a bt beacon?

Well the findclient and fingerprint binaries run on every WiFi-enabled Linux ARM device, so you should be able to get a Pi0, nanoPi or similar. There’s a couple of pointers over at the FIND website.

1 Like

Hi, I want to use Pi as a leaning client. But it is not sending any finger print on server. I have created a cluster of 2 Pi devices
Can you please help me.

What sort of answer do you expect to a question with a lazily short explanation like this? Download and use the fingerprint client as described in the tutorial.

1 Like

looks good.

Hi @mstormi,
I’m looking for some advice if I may -

I have a local find server up and running and everythign works great. I have experimented with different Android apps but none have fit my needs.

  • I tried the standard FIND app but as is well documented it does not update in the background.
  • I tried this app (also called FIND) on github, compiled and installed it but I also has issues updating in the background despite what is stated in this discussion. I made a comment on that discussion asking for clarification but have not yet had a reply.
  • I tried Room+ as also suggested in the github discussion linked above. I was unable to install it from google Play as the site displays ‘Sorry! This content is not available in your country yet.’ - I am in the USA. So I sideloaded the APK found on another site (I checked that it was the latest version). I see that this app requires the ‘Pro’ licence in order to enable background tracking - If I click the ‘Buy Pro’ link in the app I get: ‘Error - The item you requested is not available for purchase’. I emailed the author of the app but I have not had a reply.
  • I tried Zanzito and it works pretty well, even in the background and with the screen off. However it only updates every 30s and there is no way to configure this. I would like to have it update more frequently, and ideally have this interval controlled based on if the phone detects motion. I emailed the author of the app but I have not had a reply.

I have a moto x4 phone running Oreo.

The ideal app for me would:

  1. Report my fingerprint to my FIND server even when the app is in the background and the phone screen is off.
  2. Allow me to configure the interval that the app reports to the FIND server
  3. Add additional configuration that uses the phone’s other sensors to detect movement and report more frequently. So a report interval when not in motion setting and a report interval when in motion setting would be ideal.

I realise such an app likely does not exist but I would appreciate your insight and suggestions in getting closer to this ideal.

Thanks

I’m afraid I can’t comment on any alternatives because I’ve only ever been using the original FIND app.

Please keep sharing your FINDings (hah!), I’ll be happy to add them to the tutorial.

Yeah I’m finding this app to be pretty useless. If it’s not going to update in the background it doesn’t serve a purpose other than another app. Going to be trying out some from the post above.

Hey @mstormi ,

maybe you can help me.

I don’t get my find server wired up with mqtt…

I am using openhabian and installed mosquitto and find server via openhabian-config.

mosquitto is running and working. I already control my sonoffs with it. FIND server is also running and via website i can see all the information.
But somehow i cant combine FIND and mqtt…

my item:
String mqttfindSimon "Simon is @ [%s]" (All) {mqtt="<[simonbroker:sasi/location/simon:state:JSONPATH($.location)]"}

mqtt.cfg
simonbroker.url=tcp://localhost:1883
simonbroker.user=openhabian
simonbroker.pwd=xyz

findserver is stating:
MQTT is setup!
Your password is: zCeAcu
You can listen on topic 'sasi/location/USER'

Can you help me? what am i missing? :confused:

Do a tail -F on /var/log/mosquitto/mosquitto.log, then sudo systemctl restart findserver.service
journalctl -u findserver.service should tell you findserver output, check what it is saying.
If that doesn’t show anything useful, check what’s the parameters findserver runs with (use ps -ef), stop it (sudo systemctl stop findserver.service), cd to /var/lib/findserver and manually start it there. See what it tells you. Maybe it stops, maybe it tells you Not authorized (meaning mosquitto does not know the user findserver is trying to connect as).

Finally, connect to mosquitto using mosquitto_sub, track for topic ‘#’ and start the FIND app.

I following this thread a awhile.
For my application it would be very helpful to know if persons arriving, are in the room or leaving.

But so far I’m discouraged by the thing that the android client dosen’t update while in the backround.
To me it seems to restrict these nice idea verry much.

So I’m interested in any ideas.

I’ve updated the client section of the tutorial. In particular, see the download link for Room+.

I would like to request any of you to help by testing Room+ and the enhanced version of the original app.
Please share your findings here.

1 Like

I did a mini-review further up this thread on all of the apps I could find that integrate with FIND.

I see that @mstormi recommended you try a couple of apps - see my post for the issues I encountered with them, (and others), and please let us know if you are able to make any progress.

I think that Zanzito is our best bet but the author of the app seems to have either abandoned it or is busy with other projects. Maybe if a few of us contact him with similar requests it may convince him to pick it back up.

I’ll give it a try - 30s update is quite acceptable.

I love this integration, but as someone else mentioned, it’s ridiculous trying to search for relevant topics with ‘FIND’ as a keyword :smiley: I’ve been trying OpenHAB for a few weeks now, and after some steep learning curves, really like the potential this has for going into my new house in the near future. I’m finding lots of helpful guidance within the forums, but I’ve hit a speedbump recently - it seems that anytime I reboot my RPi (running openhabianPi 2.2.0 stable), the findserver.service looks like it starts up before mosquitto, since it doesn’t pull any events from MQTT, and gives me the following error via

journalctl -u findserver.service

Feb 03 07:37:44 openHABianPi findserver[336]: DEBUG: 2018/02/03 07:37:44 mqtt.go:48: Network Error : dial tcp [::1]:1883: getsockopt: connection refused

but connects fine if I restart the findserver.service (after everything else starts up).

I know how to create service dependencies in Windows, but still learning the nuances of linux. :slight_smile: Is there an easy solution to create this dependency? Any help is greatly appreciated - cheers!

Update: I edited findserver.service with systemctl edit and added the mosquitto dependency as:

[Unit]
Description=FIND internal positioning server
Documentation=https://www.internalpositioning.com/server/
After=mosquitto.service

Consistently now gets updates from mqtt upon boot, without connection error. Is there an OpenhabianPi setup script that should have this added, or is my case abnormal? I suppose it would depend on how mqtt was previously installed?

Thanks for raising. I’ve made an openHABian PR of it.

1 Like

I’ve also been using Zanzito, which essentially replaces the Owntracks app, with the exception it doesn’t specifically handle geofences (would have to be configured server-side), but has great FIND integration, and ability to receive notifications and picture notifications via MQTT. It also has built-in location sharing and remote administration capability. I haven’t got that far yet, but I see great potential (picture notification from doorbell press, etc) to get notifications without needing another app. It’s beyond my capabilities but would be cool to see some kind of binding for it :slight_smile:

I’ve run into an issue where findserver stops receiving updates from MQTT after a period of 24-48 hours. The UI at openhabianpi:8003 still works but shows no updates. Checking with journalctl -u findserver.service shows no errors or even status after the last connection:

Feb 10 00:36:19 openHABianPi findserver[391]: DEBUG: 2018/02/10 00:36:19 fingerprint.go:229: Tracking fingerprint containing 13 APs for phone_graham (home) at masterbath (guess)
Feb 10 00:36:26 openHABianPi findserver[391]: DEBUG: 2018/02/10 00:36:26 mqtt.go:182: Got valid MQTT request for group home, user phone_graham
Feb 10 00:36:27 openHABianPi findserver[391]: DEBUG: 2018/02/10 00:36:27 fingerprint.go:229: Tracking fingerprint containing 7 APs for phone_graham (home) at masterbed (guess)
Feb 10 00:36:49 openHABianPi findserver[391]: DEBUG: 2018/02/10 00:36:49 mqtt.go:182: Got valid MQTT request for group home, user phone_graham
Feb 10 00:36:49 openHABianPi findserver[391]: DEBUG: 2018/02/10 00:36:49 fingerprint.go:229: Tracking fingerprint containing 7 APs for phone_graham (home) at masterbed (guess)
Feb 10 16:40:55 openHABianPi findserver[391]: [GIN] 2018/02/10 - 16:40:55 | 302 |     2.32582ms |     192.168.0.2 |  GET     /
Feb 10 16:41:01 openHABianPi findserver[391]: [GIN] 2018/02/10 - 16:41:01 | 200 |  5.511400308s |     192.168.0.2 |  GET     /dashboard/home

MQTT continues to receive the updates from the phone at regular intervals (checked with MQTTfx).

systemctl status findserver.service gives me the following:

● findserver.service - FIND internal positioning server
   Loaded: loaded (/etc/systemd/system/findserver.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-02-10 20:17:51 PST; 3min 41s ago
     Docs: https://www.internalpositioning.com/server/
 Main PID: 17425 (findserver)
   CGroup: /system.slice/findserver.service
           └─17425 /usr/sbin/findserver -mqtt localhost:1883 -mqttadmin admin -mqttadminpass adminpass -mosquitto mosquitto) -p :8003 localhost:8003

Feb 10 20:17:51 openHABianPi systemd[1]: Stopped FIND internal positioning server.
Feb 10 20:17:51 openHABianPi systemd[1]: Started FIND internal positioning server.
Feb 10 20:17:51 openHABianPi findserver[17425]: /var/lib/findserver/data
Feb 10 20:17:51 openHABianPi findserver[17425]: WARN : 2018/02/10 20:17:51 mqtt.go:164: exit status 1
Feb 10 20:17:51 openHABianPi findserver[17425]: DEBUG: 2018/02/10 20:17:51 mqtt.go:50: Finished setup
Feb 10 20:17:51 openHABianPi findserver[17425]: -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
Feb 10 20:17:51 openHABianPi findserver[17425]:    _________  _____
Feb 10 20:17:51 openHABianPi findserver[17425]:   / __/  _/ |/ / _ \  ______ _____  _____ ____
Feb 10 20:17:51 openHABianPi findserver[17425]:  / _/_/ //    / // / (_-< -_) __/ |/ / -_) __/
Feb 10 20:17:51 openHABianPi findserver[17425]: /_/ /___/_/|_/____/ /___|__/_/  |___/\__/_/
Feb 10 20:17:51 openHABianPi findserver[17425]: (version 2.4.1 build bc170638) is up and running on http://localhost:8003
Feb 10 20:17:51 openHABianPi findserver[17425]: -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
Feb 10 20:19:04 openHABianPi findserver[17425]: DEBUG: 2018/02/10 20:19:04 mqtt.go:182: Got valid MQTT request for group home, user phone_graham

Which appears okay, but is the argument -mosquitto mosquitto) correct? My understanding is this should be the PID of mosquitto. I’ve searched, but can’t find a definitive answer to run “pgrep mosquitto” as a variable from within the findserver.service file:

[Unit]
Description=FIND internal positioning server
Documentation=https://www.internalpositioning.com/server/
After=mosquitto.service

[Service]
EnvironmentFile=-/etc/default/findserver
WorkingDirectory=/var/lib/findserver
ExecStart=/usr/sbin/findserver -mqtt localhost:1883 -mqttadmin admin -mqttadminpass adminpass -mosquitto $(pgrep mosquitto) -p :8003 localhost:8003
Restart=always

[Install]
WantedBy=multi-user.target

Is there a way to enable more detailed logging? Any help is greatly appreciated - let me know if there’s anything I’m missing.

Well, the -mosquitto option isn’t really needed (the docs say: “The pgrep mosquitto is for getting the mosquitto PID, which is used to send SIGHUP to reload the passwd file.” which we don’t require in openHABian as we set the mosquitto user/passwd in the install routine there).
I guess it doesn’t do harm but who knows. Try to simply remove it.

OTOH, if we set it in systemd, it should work, and I, too, can’t find a definitive confirmation that the current code should work.
Any improvement on findserver.service systemd config is welcome (@job, any suggestion how to handle that pgrep ?)