Dark Sky - my location

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
liderbug
Posts: 20
Joined: Monday 02 January 2017 17:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dark Sky - my location

Post by liderbug »

When I bring up Weather->Forecast it puts me 30+ miles south and 1000' lower in elevation. I can enter my address and life is good. Then I go away, eat, store, sleep and when I come back and open Domoticz and -> Forecast I'm back 30+ miles away - again. Is there any way to cache my location?
Thanks
cal
Newbie
Posts: 10
Joined: Thursday 06 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Dark Sky - my location

Post by Newbie »

Well, in my tests (i live in Italy) i found this:

when i press the forecast button dark sky redirects the url to the default "Country barycenter" (sorry for my bad english, I hope to explain the meaning of the term). Here in Italy is "strada provinciale di Passo Spina, Campiello sul Clitunno, far far far away from my location. My ubuntuphone just lit has the same behavior.

This is due because in ForecastController.js the URL is like this:
//darksky.net/#/ft/' + $scope.config.Latitude + ',' + $scope.config.Longitude
If i put this URL with the true coordinates in firefox, the site redirects me to the default.

e.g
becomes
with the part next to the # simply ignored.

Changing the URL string to
//darksky.net/forecastt/' + $scope.config.Latitude + ',' + $scope.config.Longitude
solves the problem (at least for me). it would be interesting if someone on the team explain the reason of the # /f/ part of the URL, i'm not a programmer and googling here and there i found only references to "fragment identifier" (that in some way explains the reason that the next part is ignored) or AJAX constructs, i don't know anything about angular js.
Newbie
Posts: 10
Joined: Thursday 06 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Dark Sky - my location

Post by Newbie »

E oh!
Then I go away, eat, store, sleep and when I come back and open Domoticz and -> Forecast I'm back 30+ miles away - again
This is due because coordinates are stored in cookies in the browser... When them expire... :roll:
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest