OK No worries
My Picroft seems to have stopped working properly after 2 days of playing anyway 
II am about to save an image of the SD card and then put the base image back on to start again.
@KathyReid,
Just an FYI, I have an issue where I ask Mycroft “how far is…” and then provide a neighboring city name and it tells me 1500 kms away. This is definitely not correct as it is less than 10kms. My thoughts are it is giving me the distance to Lawrence, Kansas. But I have not dug into it. I had planned on providing some more specific details but since we are on the topic of location issues I thought I would bring it up.
Thanks for reporting this, @a_user and @pcwii. I did a bit more digging on this one, and am CC’ing my colleague @matheus-mycroft as we’ve had some internal discussions about this one - thanks for your advice and help Matheus!
What I think is happening is that the location is being saved incorrectly to home.mycroft.ai.
My reasoning for this is:
Check that my location is correct in /var/temp/mycroft_web_config_cache.json
This is the contents of my /var/temp/mycroft_web_config_cache.json. It shows that the location I entered for the Device on home.mycroft.ai as ‘Geelong, VIC’ has defaulted to ‘Saint Albans Park’, which is a suburb about 1.5km / 1 mile away - which is pretty close.
However, the latitude and longitude information is incorrect.
The approximate lat and long for St Albans Park is:
-38.190113, 144.390420
The reported lat and long for my Device is;
49.398752, 8.672434
so it’s quite different - and I can’t explain the anomaly - it’s not a straightforward transverse, or flipping the lat and long.
{
"location": {
"city": {
"created_at": 1513245856347,
"name": "Saint Albans Park",
"updated_at": 1513245856347,
"code": "St Albans Park",
"state": {
"created_at": 1489950675941,
"name": "Victoria",
"updated_at": 1489950675941,
"code": "VIC",
"country": {
"created_at": 1486125571309,
"name": "Australia",
"updated_at": 1486125571309,
"code": "AU"
}
}
},
"coordinate": {
"created_at": 1506792427668,
"latitude": 49.398752,
"updated_at": 1506792427668,
"longitude": 8.672434
},
"created_at": 1513245856346,
"updated_at": 1513245856346,
"timezone": {
"updated_at": 1489950676105,
"dst_offset": 3600000,
"code": "Australia/Melbourne",
"offset": 36000000,
"name": "Australian Eastern Standard
Time(Victoria)
", "
created_at ": 1489950676105}}, "
time_format ": "
full ",
"updated_at": 1527173316815,
"stt": {
"wit": {
"created_at": 1504481866981,
"updated_at": 1527173316836
},
"openstt": {
"created_at": 1504481866976,
"updated_at": 1527173316833
},
"ibm": {
"created_at": 1504481866958,
"updated_at": 1527173316818
},
"google": {
"created_at": 1504481866970,
"updated_at": 1527173316829
},
"mycroft": {
"created_at": 1504481866965,
"updated_at": 1527173316823
},
"module": "mycroft"
},
"created_at": 1504481866955,
"enclosure": {
"timeout": 5.0,
"port": "/dev/ttyAMA0",
"updated_at": 1527173317076,
"rate": 9600,
"created_at": 1504481866997
},
"tts": {
"fatts": {
"created_at": 1504481866991,
"updated_at": 1527173316844
},
"google": {
"created_at": 1504481866992,
"updated_at": 1527173316846
},
"module": "mimic",
"marytts": {
"created_at": 1504481866986,
"updated_at": 1527173316839
},
"mimic": {
"created_at": 1504481866989,
"voice": "ap",
"updated_at": 1527173316843
},
"espeak": {
"created_at": 1504481866987,
"updated_at": 1527173316841
}
},
"skills": {
"created_at": 1504481866994,
"stop_threshold": 2.0,
"updated_at": 1527173317072,
"directory": "~/.mycroft/skills"
},
"date_format": "DMY",
"system_unit": "metric",
"listener": {
"sample_rate": 16000,
"updated_at": 1527173317074,
"phonemes": "HH EY . M AY K R AO F T",
"threshold": 1e-90,
"multiplier": 1.0,
"wake_word": "hey mycroft",
"channels": 1,
"created_at": 1504481866996,
"energy_ratio": 1.5
},
"opt_in": true
}}
Weather Skill output
However, if we look at the Weather Skill output;
pi@mark_1:/var/log $ tail -f mycroft-skills.log | grep -i weather
12:10:28.260 - mycroft.skills.settings:_request_my_settings:440 - DEBUG - getting skill settings from server for WeatherSkill
12:10:29.260 - SKILLS - DEBUG - {"type": "recognizer_loop:utterance", "context": {"client_name": "mycroft_listener", "ident": "1529496626.0428698-511190078"}, "data": {"session": "6c138788-d053-4dc7-a759-85494625c48d", "utterances": ["what's the weather like"], "lang": "en-US"}}
12:10:29.288 - SKILLS - DEBUG - {"context": {"client_name": "mycroft_listener", "ident": "1529496626.0428698-511190078", "target": null}, "type": "skill-weather:CurrentWeatherIntent", "data": {"confidence": 0.5, "utterance": "what's the weather like", "skill_weatherWeather": "weather", "__tags__": [{"from_context": false, "start_token": 2, "end_token": 2, "entities": [{"confidence": 1.0, "key": "weather", "data": [["weather", "skill_weatherWeather"]], "match": "weather"}], "key": "weather", "match": "weather"}], "intent_type": "skill-weather:CurrentWeatherIntent", "target": null}}
12:10:29.305 - SKILLS - DEBUG - {"context": {"client_name": "mycroft_listener", "ident": "1529496626.0428698-511190078", "target": null}, "type": "mycroft.skill.handler.start", "data": {"name": "WeatherSkill.handle_current_weather"}}
12:10:31.070 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/owm/weather?lon=8.672434&lat=49.398752&lang=en HTTP/1.1" 200 435
12:10:33.019 - SKILLS - DEBUG - {"context": null, "type": "enclosure.weather.display", "data": {"temp": "28", "img_code": 0}}
12:10:33.133 - SKILLS - DEBUG - {"type": "Command: weather.display=28,x=2,IICEIBMDNLMDIBCEAA", "context": null, "data": {}}
12:10:43.044 - SKILLS - DEBUG - {"context": {"client_name": "mycroft_listener", "ident": "1529496626.0428698-511190078", "target": null}, "type": "mycroft.skill.handler.complete", "data": {"name": "WeatherSkill.handle_current_weather"}}
we can see that the long and lat co-ordinates passed to the Weather Skill are correct;
GET /v1/owm/weather?lon=8.672434&lat=49.398752&lang=en HTTP/1.1" 200 435
The lat and long above correlate to, guess what, somewhere in coastal Somalia, which explains the temperature anomalies that I’ve been getting (ie 30 C when it was 12 C in Geelong today).
The question is why the anomaly?
My guess is that there is that we have a bug when the latitude and longitude are calculated from the location when the user changes the Device’s location in home.mycroft.ai.
Location output
Just to check this, I got the location GET response from home.mycroft.ai;
{
"uuid": "25f4bcc9-5bb6-4d00-a845-7a356b1b7f6b",
"createdAt": 1513245856346,
"updatedAt": 1513245856346,
"coordinate": {
"uuid": "923dcda3-59bc-4672-9071-26cdd89a5788",
"createdAt": 1506792427668,
"updatedAt": 1506792427668,
"latitude": 49.398752,
"longitude": 8.672434
},
"timezone": {
"uuid": "4f0c4aac-8cc6-45f9-b08c-e5cf5730408a",
"createdAt": 1489950676105,
"updatedAt": 1489950676105,
"code": "Australia/Melbourne",
"name": "Australian Eastern Standard Time (Victoria)",
"offset": 36000000,
"dstOffset": 3600000
},
"city": {
"uuid": "36ad2141-4aa0-4905-b533-1484a107b9e4",
"createdAt": 1513245856347,
"updatedAt": 1513245856347,
"code": "St Albans Park",
"name": "Saint Albans Park",
"state": {
"uuid": "09739301-d6aa-45c5-bccc-dd69b3fc5e0f",
"createdAt": 1489950675941,
"updatedAt": 1489950675941,
"code": "VIC",
"name": "Victoria",
"country": {
"uuid": "407d0752-da4f-4994-a31b-21c16a3c407c",
"createdAt": 1486125571309,
"updatedAt": 1486125571309,
"code": "AU",
"name": "Australia"
}
}
}
}
TL;DR the lat and long are stored incorrectly on home.mycroft.ai, and are passed correctly to Weather Skill. Weather Skill is doing it’s job correctly. It’s getting incorrect lat/long from home.mycroft.ai.
Decimal vs. Degrees? maybe a conversion error there somewhere?
You know in mapping programs, when someone does it “wrong” things end up “off the coast of Africa”…
That is because 0.00/0.00 is there, of course, but I find it amusing the Geelong has ended up “off the coast of Africa” for you, but of course the wrong side of it 
Appealling though the warm weather would be right now as I sit here defrosting, I’ll pass on Somalia 
Good thinking re the decimals vs degrees. I also wondered whether it was a positive / negative thing as well, but none of those showed a pattern.
Don’t suppose I could ask you what your lat and long are showing?
Best, K.
I would , but I don’t have a var/temp/mycroft_web_config_cache.json ( no /var/temp directory at all!)
( I am supposed to be working too! )
No worries, try /var/tmp/mycroft_web_config_cache.json - fat fingers here.
And no worries, no hurry.
So The lat/long co-ordinates that I have in my json file puts me smack bang in the middle of Heidelberg in Germany, LOL! (remember that this is a newly installed “clean” image of Picroft)
Just a
| location | |
|---|---|
| city | |
| created_at | 1490132691053 |
| code | “Winchester” |
| name | “Winchester” |
| updated_at | 1490132691053 |
| state | |
| created_at | 1486129437940 |
| code | “England” |
| name | “England” |
| updated_at | 1486129437940 |
| country | |
| code | “GB” |
| name | “United Kingdom” |
| updated_at | 1486088331527 |
| created_at | 1486088331527 |
| coordinate | |
| longitude | 8.672434 |
| latitude | 49.398752 |
Looks the same as yours! If I invert mine I get Somalia, but yours are Heidelberg - I must have mixed up my lat and long and made it long/lat instead. Our co-ordinates are the same!!!
cool!! I will buy you a drink, as soon as I find you… you must be around here _somewhere _ 
Ha! It’s too cold here for a drink other than a hot cup of delicious coffee at the moment
It’s certainly not Somalia weather!!
OK, my colleague @matheus-mycroft has worked some $MAGIC in the backend, however we think the fix might be that you need to reboot your Device, @a_user. If you reboot does your Weather come good?
Best, Kathy
Well, that $MAGIC has fixed the weather ( if only it could make BETTER weather! )
BUT now I have rebooted and my PS3 Mic has stopped working again … Still a CLEAN PiCroft build with only coin-toss skill as an extra skill installed 
Nope nothing will bring the mic back again 
(Edit) So - shutting down the Pi, then plugging the PS3 mic into a FRESH port on the Windows10PC that then forced it to “install drivers” , unplugging it again and then putting it back into the Pi, and firing it up again brough the mic back to like ( that is the same sequence that woke it up last time too, but I ALSO re-imaged the SD card as well)
Mate… this is driving me slowly crazy! 
Totally understand your frustration with the Pi3 microphone. Are you OK if I mark this thread as solved, and we can start another thread to work through the Raspberry Pi issues?
Yep 
plus the rest of the characters that i need to make a post
I believe I read somewhere you are a software engineer (or something similar in the past).
Perhaps my way of running the pulseadio deamon system wide service, helps you in not keep loosing your microphone?
Have a look at my “journey” thread. The Mycroft / pulseadio section is perhaps also the solution for you.
Thanks - I used to do software QA about 11 years ago, so I am willing to “kludge” things (with a backup plan!)
I have read some of your blog ( 3 parts I think) - I will have a closer look 
Check out part-4, I pushed online yesterday. Grab the pieces you need (or all). Most interesting is the pulseaudio / mycroft configuration section.
You then no longer running pulseaudio as the user, but as system service and connect over tcp-localhost.
Perhaps that also solves you loosing the mic “crap”
@KathyReid, I did a bit of checking on my location issue and discovered the following through triangulation.
“Hey Mycroft” How far is Ottawa, Ontario? A. 340.3 miles
How far is Chicago, Illinois? A. 719.5 miles
How far is Atlanta, Georga? A. 747.9 miles
After triangulating the distances I came up with NY City.
“Hey Mycroft”, How far is New York City? A. 0.0017 miles.
So there you have it, I am definitely not in NY City. When I ask mycroft where he is, the location is reported correctly Other issue is my default settings are Metric so answers should be reported in kilometres.
I am not sure what skill is executed when I ask these questions. If I know I could dig into it a bit as well.
Let me know if you need any logs to assist in debugging this.
