Page 1 of 1

Date & Time View Sunrise & Sunset

PostPosted: Thu Mar 31, 2016 6:05 pm
by sanderdegraaf
Hello there everyone,

playing around with the Widget Designer it was an easy job to create a Digital Clock but there's noway i can customize it. Just want to display Hours:Minutes e.g. 19:03

I want to create a remote Widget page which wil trigger pandoras box so users can remote change background or switch inputs.
To give this Widget a nice layout i want to include the Date, the Time and the timings of sunrise and sunset.
Somthing like this:

Date: 31-03-2016
Time: 19:03
Sunrise: 06:23
Sunset: 07:15

Anyone who can push me into the right direction?

Thanks in advance

Sander de Graaf

Re: Date & Time View Sunrise & Sunset

PostPosted: Fri Apr 01, 2016 1:38 am
by malkuth23
Do you have WD Pro?

Re: Date & Time View Sunrise & Sunset

PostPosted: Sat Apr 02, 2016 6:06 pm
by sanderdegraaf
O yes, sorry.
System Specs:

PB Player STD
WD Designer Pro
Intel i7, 8Gb DDR4, GTX 960 4G, 2x 120Gb SSD

Re: Date & Time View Sunrise & Sunset

PostPosted: Sun Apr 03, 2016 6:47 am
by malkuth23
There is some node that has a clock in it...
Can't remember name of node, but it would be in input,generic
-> text combiner
-> label or digital display node

Re: Date & Time View Sunrise & Sunset

PostPosted: Tue Nov 01, 2016 4:43 am
by justyn roy
I recently stumbled on this website.

It'll give you sunrise and sunset times for cities or for GPS co-ordinates.

In this site you can set it for day or for year, for the year you can make an Excel file and pull from it for the days you need.

http://aa.usno.navy.mil/data/docs/RS_OneYear.php


I've tried it for this year in Toronto and NYC and tried it for 2026, only a few days change by +/-1 minute, accurate enough for me!

Re: Date & Time View Sunrise & Sunset

PostPosted: Mon Nov 07, 2016 10:11 am
by Janina Baltaziewicz
Hi all,

BBC also offers a weather RSS feed, containing sunrise and sunset times for different regions/cities, I have already successfully read this out.
All you need is an RSS Input Node, some Crop Text After/Before Word nodes to get the correct part of the RSS message, and the Text Combiner to put it back together nicely.

Cheers,

Janina

Re: Date & Time View Sunrise & Sunset

PostPosted: Thu Nov 17, 2016 4:00 pm
by chrisr
Also, if you want more information Like an RSS feed, you could use JSON request to var from the YQL (Yahoo Query Language) to get all kinds of weather / astronomical data ( financial as well). So to request Sunrise for New York City would look like this

//assuming you have a textbox1 with the Http address and variable "json_req"

JsonRequestToVar,textbox1.text,json_req

Textbox1 would have this inside it:

https://query.yahooapis.com/v1/public/y ... o.places(1)%20where%20text%3D%22new york city%2C%20ny%22)&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys

//if you take above address copy and paste it in a web browser you should get a json formated return of info within the browser window which should look like this but in a linear fashion:

{
"query": {
"count": 1,
"created": "2016-11-17T14:50:50Z",
"lang": "en-US",
"results": {
"channel": {
"astronomy": {
"sunset": "4:36 pm"
}
}
}
}
}

Read this post (link below). Dennis has explained the process of drilling into a json request to gather the data much better than I'll be able to explain it.

viewtopic.php?f=80&t=4126&p=12984#p12984

Re: Date & Time View Sunrise & Sunset

PostPosted: Thu Nov 17, 2016 7:39 pm
by justyn roy
Nice!

I just posted mine for those times (like my last project) when you can't get your Widget Designer online.

Re: Date & Time View Sunrise & Sunset

PostPosted: Thu Nov 17, 2016 8:01 pm
by chrisr
AHH yes good point Justyn. You've got to be online to use the Yahoo Query. Thanks for pointing that out!! Sorry I forgot to mention that :) opps.

Re: Date & Time View Sunrise & Sunset

PostPosted: Sat Nov 19, 2016 7:46 am
by malkuth23