Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom endpoint not working #77

Closed
jaylagorio opened this issue Apr 12, 2019 · 12 comments
Closed

Custom endpoint not working #77

jaylagorio opened this issue Apr 12, 2019 · 12 comments

Comments

@jaylagorio
Copy link

This is largely a continuation of #5 but with several changes. The end result is that on Nightscout, not hosted on Heroku or Azure, I still can't get this working on my iPhone (a change from #5) and my fully updated Versa without using Spike. This is important to me since Apple has made it so Spike isn't a reliable option anymore.

Reading through the code (

if(dataSource === 'nightscout') { // Nightscout
) it looks like I should need to use this as an endpoint:

http://nightscout.lagor.io/api/v2/properties

This returns the expected JSON in a browser on the desktop and on the iPhone. However, Glance shows E404 on the screen. What else can I try?

@Rytiggy
Copy link
Owner

Rytiggy commented Apr 12, 2019

Try using the custom data source option and entering this instead http://nightscout.lagor.io/pebble

@jaylagorio
Copy link
Author

I tried this:

  1. Update the URL
  2. Force close the Fitbit app
  3. Reopen and hit the Sync button
  4. Reset/reload the watch face, tap the time to update

Unfortunately it still says E404.

@Rytiggy
Copy link
Owner

Rytiggy commented Apr 12, 2019

it looks like it's because your Nightscout site doesn't support HTTPS:
Settings: Blocked insecure request to URL: http://nightscout.lagor.io/pebble?count=47

Do you know if you can fix that and make it support https

@jaylagorio
Copy link
Author

That's interesting - and possibly, but not easily. Can a setting, off be default so you have to really know you want it, be added to allow HTTP?

@Rytiggy
Copy link
Owner

Rytiggy commented Apr 12, 2019

Who are you using for your host?

@jaylagorio
Copy link
Author

It's privately hosted: https://github.com/jaylagorio/Nightscout-on-Windows-Server

@Rytiggy
Copy link
Owner

Rytiggy commented Apr 12, 2019

I will look into the possibility of it being able to support HTTP but I'm unsure if that's possible due to server limitations. if you could do the same for HTTPS

@jaylagorio
Copy link
Author

That sounds good to me! So I know for the future, how did you get to the "blocked insecure request" message?

@Rytiggy
Copy link
Owner

Rytiggy commented Apr 12, 2019

haha I plugged it into my dev console

@jaylagorio
Copy link
Author

Gotcha. I'll see if I can shoehorn a certificate into my reverse proxy for that host. Thank you!

@jaylagorio
Copy link
Author

So the good news is I was able to reroute traffic, implement Let's Encrypt (which has kind of been on my list of things to do for a while), and now everything works. I still think a non-default HTTP Is OK option would be helpful in the future.

Thanks for helping me figure this out!

@Rytiggy
Copy link
Owner

Rytiggy commented Apr 13, 2019

Thanks for this info I'll be looking in to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants