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

something went wrong when updating the sunrise and sunset times #210

Open
Fedefirewall opened this issue Jul 24, 2022 · 1 comment
Open

Comments

@Fedefirewall
Copy link

I can't set the location, either manually or with the "set locatiojn by IP adrress" button, when i press the button it correctly decet the postion and insert the coordinates, but when clcking ok the error message appears
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to options
  2. insert coordinates ( manually or with the button )
  3. click ok
  4. an error appears saying "something went wrong when updating the sunrise and sunset times"

Screenshots
image

Logs
Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Purple Rain } }
2022-07-24 21:44:08.3653|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Purple Sun } }
2022-07-24 21:44:08.3863|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Rain 3 } }
2022-07-24 21:44:08.3925|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Sparkling Fire } }
2022-07-24 21:44:08.3925|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Starlight } }
2022-07-24 21:44:08.4053|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Storm Clouds } }
2022-07-24 21:44:08.4053|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Sundown } }
2022-07-24 21:44:08.4053|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Sunlight through trees } }
2022-07-24 21:44:08.4297|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Sunrise } }
2022-07-24 21:44:08.4367|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Sunset } }
2022-07-24 21:44:08.4367|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = TrapPurple } }
2022-07-24 21:44:08.4367|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Vibrant Sunrise } }
2022-07-24 21:44:08.4535|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Vintage Modern } }
2022-07-24 21:44:08.4535|INFO|Winleafs.Api.Endpoints.NanoleafEndpoint|Sending following request to Nanoleaf: Address: http://192.168.1.199:16021/, URL: api/v1/5vuk2gXphB8lkaDwRRVNhe2z1s2bfJEr/effects, Method: PUT, Body: { write = { command = request, animName = Waterfall } }
2022-07-24 21:44:13.1643|INFO|Winleafs.Server.Endpoints.WinleafsServerEndpoint|Sending following request Winleafs Server: Address: https://api.winleafs.com/, URL: /spotify/is-connected/5d080bad-c12b-41e7-b6ed-22942be9e3ea, Method: GET, Body:

@Fedefirewall
Copy link
Author

I dont know anyting about C# but i think the problem is this line
var sunTimes = client.GetSunsetSunriseAsync(latitude, longitude).GetAwaiter().GetResult()
in
Winleafs.Wpf\Views\Options\OptionsWindow.xaml.cs

when i removed this line and passed manually the values it works, so i changed the next line from
UserSettings.Settings.UpdateSunriseSunset(sunTimes.SunriseHour, sunTimes.SunriseMinute, sunTimes.SunsetHour, sunTimes.SunsetMinute);
to
UserSettings.Settings.UpdateSunriseSunset(6, 0, 18, 0);

hopes this can help

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

1 participant