Open Sammy1Am opened 4 years ago
Did you follow these directions?
Yes.
There are really only two steps I can see on that page for the server:
/settings/passive
with a location./setting/passive
without a location.Edit: As far as I can tell, these commands work fine as I get back a response indicating that learning has started and that learning has stopped, respectively.
Just so there's no misunderstanding, I'm not using the find3-cli-scanner to do the scanning, I'm either using some code I wrote myself on some ESP8266s, or just manually POSTing the data directly. In either case the server seems to have issues.
I see. Can you try using find3-cli-scanner
and see if that works?
Unfortunately I don't have any hardware suitable to run it (my WiFi devices are all ESP boards, and my actual computers don't have WiFi). I hadn't thought to dig through the cli-scanner
code to see if maybe it's doing something different, so I might give that a look though.
For what it's worth, here's the actual data I'm sending to the server (MACs and Family names changed).
POST to http://server/api/v1/settings/passive
{
"family":"Samily",
"location":"office",
"device":"wifi-40:4e:ab:cd:ef:12",
"window": 10
}
RESPONSE
{
"message": "Set location to 'office' for samily for learning with device 'wifi-40:4e:ab:cd:ef:12'. Now learning on 1 devices: map[wifi-40:4e:ab:cd:ef:12:office]with time block of 10 seconds",
"success": true
}
POST to http://server/passive
(Sent several times manually for testing, when using devices the value of d
changes)
{"s":{"wifi":{"40:4E:AB:CD:EF:12":-53}},"d":"tol-mc001","f":"Samily"}
RESPONSE
{
"message": "inserted 1 fingerprints for samily",
"success": true
}
POST to http://server/api/v1/settings/passive
{
"family":"Samily",
"device":"wifi-40:4e:ab:cd:ef:12",
"window": 10
}
RESPONSE
{
"message": "switched to tracking for samily. Now learning on 0 devices: map[]with time block of 10 seconds",
"success": true
}
Did you learn multiple locations?
Simultaneously, or serially?
I think the answer to either is probably "yes, at some point," but I only stepped through the code to debug while learning a single location (after clearing the database, so it would have been the first location). I did initially try two locations serially (but found neither had worked), and also tried two in parallel (with sort of the same result; by that time I'd tried a little active-tracking so some locations were showing up from the active tracking).
@SammyIAm Im intersted getting this to work on esp32. have you posted your code somewhere?
@Hellowlol I haven't, but I could fairly easily-- just need to sanitize some hard-coded passwords and such. I'll try to get around to that soonish.
Unforunately, my code's specifically designed for passive scanning (i.e. the esps track just my phone, not themselves), which doesn't seem to be working in find3 at the moment (hence this ticket). If you're looking for something with active scanning (i.e. tracking the location of the esp32 itself) then you should take a look here instead.
Passiv scanning is what im interessed in. I don’t care about tracking the esp. Cool, thanks for posting it.
@Hellowlol I've uploaded my code (for the esp8266) here. If you connect to the serial port it should prompt you for most of the configuration information. The only places (I think) you'll need to modify are these lines to include the MAC addresses of the devices you want to track, and this line to specify the family name to use in find3.
For my usecase the esp8266s also have BME280 temperature/humidity sensors. If you're not also using these sensors (it would be quite a coincidence if you were), you should also comment out this line to prevent compiling / using the BME280 code.
If you manage to get find3 passive tracking working, I would be very interested to hear about how you did it since I've been unable to.
So I'm working with Raspberry Pi's as the scanners and hoping to track bluetooth beacons. I've attached a picture of what I see on the dashboard. It's showing the beacons, but never assigns them the location that I set in learning command. Should the "DEVICE" flag be the mac address of the scanning wifi adapter (monitor mode adapter on RPi in this case) in both the HTTP POST and the passive scanner command? Have tried training with more than one location and more than one device, but no luck. @schollz
It works for me after a day of trying.
In setting-passive endpoint, the device must be wifi-kkk. kkk can be anything. No need to be MAC address.
In passive endpoint, the d is xx:xx:xx:xx:xx:xx. The content in wifi is: "wifi":{"kkk":-80}
kkk might be case-sensitive, btw.
I've been struggling for a day or two with this, and digging through the code most of today, but I'm at the limits of my understanding I think. Here's the issues I'm running into, but unless I'm missing something obvious, it seems like passive tracking is... like almost entirely missing (I'm a little perplexed to be honest; has anyone else successfully used passive tracking?)
Steps I've followed:
/settings/passive
API and specifying a location./passive
API.Issues:
main
server dies inai/classify
because the<base58family>.find3.ai
file doesn't exist. As far as I can tell, the only code that can create this file is theai
's/learn
function, but this isn't called as part of the passive learning / tracking. I can work around this issue by creating an "empty"ai
and callingai.save()
, but I'm not sure this is intended and it's not clear how this file should have been created.find3.ai
file, calls toai/classify
succeed now. However no tracking data seems to ever show up on the dashboard. Manually calling "Calibrate Machine Learning" results in an error ofproblem analyzing: no predictions
which appears to be related to the fact that there are no devices in the sqlite database.And there's where I'm at now, because I'm not sure how devices are supposed to get added to the database, and why they're not currently being added.
This largely seems to be an issue with passive tracking, as when I used the Android app to track itself, things seems to work a little better for the active tracking results (but doesn't seem to magically fix passive tracking).
Am I missing some sort of required setup step to initialize the database for passive tracking?