Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 23 05:05
    Grayda opened #2
  • Oct 07 12:02

    Grayda on master

    Create FUNDING.yml (compare)

  • Oct 07 12:01

    Grayda on master

    Create FUNDING.yml (compare)

  • Jul 12 05:46
    Grayda closed #17
  • Jul 12 05:40
    Grayda closed #11
  • Jul 12 05:40
    Grayda commented #11
  • Jul 12 05:38
    Grayda closed #16
  • Jul 12 05:38
    Grayda commented #16
  • Jul 12 05:37
    Grayda commented #17
  • Jul 12 05:32
    Grayda commented #18
  • May 19 11:32
    Grayda commented #10
  • May 19 11:22
    Grayda closed #9
  • May 19 11:22
    Grayda commented #9
  • May 19 11:21
    Grayda closed #4
  • May 19 11:21
    Grayda commented #4
  • Mar 28 21:48

    Grayda on gh-pages

    Add Discord link (compare)

  • Mar 28 21:45

    Grayda on gh-pages

    Add Patreon link (compare)

  • Mar 26 06:17
    Grayda commented #10
  • Mar 26 06:14
    Grayda closed #20
  • Mar 26 06:14
    Grayda commented #20
David Gray
@Grayda

I did consider CloudFlare, but because the data is updated extremely frequently (e.g. every minute), it wouldn't have worked.

Since the 30th I've submitted a support ticket with my hosting provider. Haven't heard anything yet, but I'm going to keep at them until this is resolved, or look at shifting the site (and the 6-7 other sites I have with them) to a different host.

David Gray
@Grayda
Support have acknowledged that it's an issue in their east coast data centre, and they're looking to resolve it ASAP. More news as I come across it.
photog0411
@photog0411

hello, when im trying to get twentysevenday the API returns this error:

Catchable fatal error: Object of class timezone could not be converted to string in /home/solidinc_aurora/api.auroras.live/v1/classes/cache.class.php on line 22

any idea?
David Gray
@Grayda

hmm, what's the URL you're trying to call? Because I just tried https://api.auroras.live/v1/?type=ace&data=kp1minute&tz=-600 and didn't get the error. Also, are you passing tz as an offset in minutes? e.g. +10:00 is -600

(Also, to update you on the slowness, it was an issue with my hosting provider's IPv6 which they resolved on their end)

David Gray
@Grayda
Looking into this now. It looks like a bug in the way I handle caching with timezones, but another related bug has cropped up with the viewing probability code, so once that's fixed, it should be right to go.
David Gray
@Grayda
It should be working again. 27 day forecasts handed the timezone off to the cache slightly differently to the rest of the calls, and the probability code issue just needed a cache clear, so we're all good.
Robby Muhammad Nst
@OrionStark
Hello, I got a lil problem about the API. I can't get the data. Then, when I'm visiting the site and try the example caller, it's keep requesting and didn't show/get the data. Is there any problems?
David Gray
@Grayda
Hey @OrionStark, can you let me know what example you're trying to run or API call you're trying to make? Because I just tried a few different examples over on http://auroraslive.io and they all worked, plus I just opened up the Android phone app and everything worked as expected.
photog0411
@photog0411
quick question. What are you doing to become GDPR compliant in both your API and your official app?
David Gray
@Grayda

That's actually a good question, and not something I'd considered yet. As stated in http://auroraslive.io/#/privacy, I only store a small handful of user information:

  • A coarse location (latitude and longitude, only accurate to a maximum of 400m)
  • An anonmous token for sending push notifications (which the user can invalidate or change by toggling the notification button in the app)
  • A set of logs that include a public IP address (used to block users who try and flood the system). These logs are cleared once a week

In regards to the coarse location, no personally identifiable information is stored.

So I'll double check that I'm compliant, but at this stage, I don't store enough information about a user for it to be a concern.

photog0411
@photog0411

It was just a general question. I am curious what other people are doing to be come compliant.

It's my understanding that even if you don't store data yourself (but pass any kind of data to another API) you will have to become GDPR compliant and give users a way of opting out. In your case, would it apply with information you are sending to met.no for the weather data?

photog0411
@photog0411
hi, is the website down? :)
David Gray
@Grayda
image.png
Auroras.live, or api.auroras.live? Because they're both working fine for me:
photog0411
@photog0411
Ok, I was having some issues with the API getting some data for 2 days now, but earlier I checked the official website auroras.live and it wasn't loading - but now I realize that's because I have an adblocker enabled in my browser.

What's weird is I'm able to get most of the data in the standard way for a single location via the API.

But I have a thing where it checks 20 locations on earth for the visibility chance at once, and displays them from highest to lowest. Did you enable some kind of rate limiter on the server or a maximum API calls from a single IP in a timeframe? This is the only thing that's not working. It was working a few months ago last I checked lol so if the API format is still the same IDK why it's not working now

David Gray
@Grayda

Only changes I made recently were to the Kp code (to stop the errors from occurring) and adding the "message" property to all outputs (so people would know what's going on). Prior to that, the last change was in March, and was just a new cron job that cleared old logs and cache files.

Rate limits have been the same since 2016: if you make more than 10 API calls a second, you'll get throttled, though I've just been in and bumped that up to 20 calls, so you should hopefully have more wiggle room.

photog0411
@photog0411
ok ill check it out and see if it works
thanks :)
photog0411
@photog0411

still not working. Actually I checked how I did it, I didn't have 20 locations (calls) what I am doing is getting the list of popular locations from here:
http://api.auroras.live/v1/?type=locations

Then I am pinging each one to see the current probability chance (all at once) so there should only be 16 total calls to the API from a single API at a time.

basically, my script is like this:
@GET("v1/?type=locations")


@GET("v1/?type=all&ace=false&weather=false&threeday=false")
(the second @GET is only doing it for the locations defined at v1/?type=locations
did something change with either of those two GET commands?
(By the way, I think the 404 comes from an upstream source (e.g. if the URL the API calls is /endpoint/:lat/:long, without the params, it'd be /endpoint//. Things like this will be fixed in v2)
photog0411
@photog0411
yes im passing them, like i said it was working before and i haven't changed anything in the code. I'll have to dig deeper - maybe the REST plugin I'm using did an update or something and broke my code somewhere :) lol
or I'm thinking maybe the "message" property maybe is throwing it off, because maybe I have to set the plugin to look for that property now. I don't think so, because i have it set to "only" look for the "probability" property but who knows. I just wanted to make sure nothing changed with the URLs or server or anthing in relation to those
David Gray
@Grayda
Nope, nothing has changed, other than the changes I mentioned above. The JSON is created using PHP's json_encode function from an object, so it'd die pretty quickly if the source object it was JSON-ifying was not correct.
photog0411
@photog0411

whew, ive found out what the issue was

the problem is with the message output, the Gson converter im using is expecting it to be an array but its not. So it was the new message property that broke it :) I think i can fix it

photog0411
@photog0411
Hi - is there a way to get the last 7 days of KP value from the archive via the API? I checked the Archive API, but it doesn't seem to return KP data
David Gray
@Grayda

Yep, the Kp data should be returned in the kp property. However it looks like my archive scheduled task does it's own Kp retrieval, and doesn't use the Kp module everything else uses. Therefore the data will be missing for the last week or two.

When I'm next at home I'll sort this out and make the Kp retrieval the same so archive data will be correct.

photog0411
@photog0411
ok
David Gray
@Grayda

After much fiddling, the issue should be resolved: https://api.auroras.live/v1/?type=archive&action=search&start=1am&end=2am

There'll be a good bit of data missing between when they pulled the wing-kp data, and when this issue was fixed, but the upshot is that data going from this day forward will be at 1 minute intervals, instead of 15 minute intervals like before.

photog0411
@photog0411

hi, are you still maintaining this API (I haven't seen any activity since last year) and do you know if the sun/moon data is bugged?

Even on the main auroras.live website the sun/moon is just stuck on "loading"
https://i.ibb.co/ws9kFTp/Capture.png

it seems to be that way for about 1-2 weeks now
David Gray
@Grayda

I checked the site last week, and didn't notice that. I'll investigate and let you know what's going on.

I'm still maintaining the API (mostly around push notifications), but I've been working on v2, which I'm hoping will be up for beta testing in the next few weeks.

I'm also trying to plot out a move from shared hosting to a VPS to make everything more stable for when v2 of everything is released.

David Gray
@Grayda
Right, so it looks like met.no end-of-lifed the sunrise API version I was using. Should be an easy enough fix, so I'll get started on that. v2 will use https://github.com/auroras-live/suncalc-php so this should no longer be an issue.
David Gray
@Grayda
Okay, it looks like the issue is resolved for the most part. The moon phase needs a bit of work (it's not showing the icon on the page), but I think that's because the new sunrise API returns different moon phase info.
photog0411
@photog0411
hmm it's still stuck on 'loading' on the main auroras.live page
photog0411
@photog0411
nevermind, it's working now lol
Robby Muhammad Nst
@OrionStark
@Grayda Hey, sorry for late responds. BTW, everything is okay right now. Good work
photog0411
@photog0411
query: When v2 is active of the API will you still keep support for V1 (please do so nothing gets broken) :P
David Gray
@Grayda
Yeah v1 will be supported for a while, but I'd strongly suggest upgrading to v2. It'll be a fairly painless process (and still supports GET requests). I've got some vague plans to migrate the code over to the new framework I'm using to make it easier to maintain, but that'll come after.
@OrionStark Good to hear you got it working :)
David Gray
@Grayda
Also as a side note, I'm planning to move this chat to Discord in the not-too-distant future. The reason being, I'm also setting up a Patreon to help fund development costs (due to v2 requiring a VPS, needing new hardware for iOS development, subscription costs etc.) and due to Discord support being baked in to Patreon, I can offer Patron-only channels alongside the public ones, plus some other rewards.
photog0411
@photog0411
ok cool thats a good idea
David Gray
@Grayda
A few quick updates to this:
  1. The Patreon is up and running here: https://www.patreon.com/auroras_live
  2. The discord is now up and running here: https://discord.gg/wqDVDeY
  3. I'm having some issues with the met.no weather source which is causing the main site to not load correctly. I'm contacting support about this
  4. v2 of the API has been moved to a VPS and is coming closer to being ready. Documentation being written, but early access is available for Patrons, plus some in-progress features such as SMS alerts and new notification types
David Gray
@Grayda
#3 has been resolved. It was a met.no outage, nothing to do with my host (it was hosting related last time). v2 of the API will has a dedicated status page so you can get email alerts when upstream providers fail.