Release [Upcoming] Pandora Clock


A request to the community here, before I can release anything:


Can someone provide a (free and nice-looking) icon for this application ? If possible something not already used in other panda apps :)


Thanks!
 
Howzat?

clockicon.png
 
Thanks for the proposition :)


I had something in mind rather like that :


20110531-08-free-a-icon.png



Of course :


- I don't need the clouds behind, but a black/grey background would be nice


- the numbers should not be taking the whole width just like in this example


- I would like a "soothing" icon, so not everything in red :) i.e. less red in the icon that in your proposition


- soft edges with a little shadow like this one


- numbers should not be in italic. I do not use italic in my app.


Can you do it ? :)
 
I'll have a go. :)


What is the minimum resolution it should be readable at?
 
Here's a tentative documentation about the whole application. It will be distributed along with the release.


Comments are WELCOME on the documentation as well :)


-----------


Pandora Clock


Pandora Clock is a small piece of software written in Python/Pygtk/Cairo to provide an clock service with additional functions for the Pandora device. Since it is written in Python it is readily executable on most Python-supporting platforms, but would require some adaptation for Windows due to the sound routines. On Linux it runs without issue provided you have python libraries installed and use oss for sound.


Vision:


The goal of this project is to use the Pandora as a side clock when needed. For example, when you are reading a book and want to keep an eye on the time once in a while, you could just use this application to have an easy way to see what time it exactly is, even in a darker environment.


I implemented multiple time zone support since I am living out of my home country and having a quick way to know what time it is in a few other geographies makes my life easier when I am thinking to reach people I know. The weather function helps me keep think about what I should wear or carry with me tomorrow, and I like the idea of not having to launch a specific application just to get that kind of information. Additionally, the alarm function is used as a “reminder” function so that I can make sure not to miss a TV program I’d like to watch, or do something on time.


Note: The alarm can be used as a wake-up call, but it was not really planned for this since there the Pandora is not really made to be left charged for too long, and I cannot guarantee either that the Pandora will still be fully responsive after x hours (unless I implement a function to operate the alarm even in sleep mode).


License:


- Freeware / Closed Source.


I do not wish to open source this project since the source itself is very “dirty”, not well optimized at least in declaration/writing. It did not start as a full scale project but rather as an experiment, and in that sense lots of unplanned functions were added on top of the existing core program at a later stage. Besides, the code is hardly documented, making it very difficult for anyone else to understand what is going on. However I describe how Pandora Clock works below so that someone else can easily reproduce the same functions if they wish. There is no secret.


How Pandora Clock Works:


Pandora Clock uses the local time on your device as the “correct” time on screen. At startup this is the only thing it displays, together with the state of the Internet Connection and the date/month/ year/day of the week of the present day. Time can be displayed in AM/PM mode when pressing the “a” button. Pressing “a” again comes back to the 24 hours mode.


The screen is refreshed every 500 ms. While the actual time displayed would only change every 1000 ms (every second), I chose to double the refresh rate in order to get more reactivity for all input commands. That seems acceptable in practice, while limiting the CPU charge of the application.


The Internet connection indicator is relevant since Pandora Clock needs Internet access to retrieve information for several services. For example, when you enter your local city name, it retrieves the corresponding city / country / weather information by using the yahoo api. The weather information is updated on a regular basis, as long as the internet connection stays on.


If the internet connection is off, the weather information is not displayed anymore. The weather condition is displayed using icons (matching the color of the display) corresponding to the nearly 50 different conditions described in the yahoo api. On top of that the current temperature is displayed under the icon, and the application constantly loops (every 30s) between the current weather condition/temperature and tomorrow’s condition/temperature range (indicated with a blinking “tomorrow” above the icon).


The internet connection is also used in certain situations. For example, when adding additional cities/locations to display the time difference in other locations, Pandora Clock first tries to use its local database to determine the Olson code of the country corresponding to the city entered. However, for a number of countries, a single country can return several Olson codes, meaning there are several timezones in a single country. In such situation, Pandora Clock attempts to connect to the Internet to retrieve Latitude, Longitude of the city requested (yahoo api) before requesting the appropriate Olson code (with the geonames api). This way, the correct timing can be determined and displays for virtually ALL locations worldwide, as long as a recognized city name is provided. Note that if there are several cities with the same name, you can enter city, state or city, country for disambiguation. By default the yahoo api would probably choose the most popular one (I am not sure what is their selection algorithm, however).


Pandora Clock supports 4 different times displays: the main one, and up to three additional ones which can be added using “1”, “2”, “3” on the keyboard.


Screen dimming: for those who want to use the clock in a dark environment, and avoid the light it might create, a screen dimming function can be enabled with D: it progressively dims the display to be fully dark in about 30 seconds. Please note that it does NOT affect the Pandora screen brightness, but simply “blackens” all displayed information. “D” enables the dimming effect. Pressing any other key will make the display lighten up for 30 seconds again and fade to black again. Pressing “D” again will make the dimming effect off and restore normal display function.


LED: LEDs can be turned off, but this is not yet supported.


Pandora Clock supports different display colors: green, blue, red (default), white, together with according colored icons. This can be changed with the “c” key.


Pandora Clock’s alarm function is very basic. You can set an alarm (24 hours format ONLY) and it will ring for about 10 seconds once the time is reached. There is no additional functions like repeated alarm, day-by-day alarm, snooze, but this can be expanded in the future if there is a strong demand for it. Alarm is set with “s” and can be unset by pressing “s” again.


Pandora Clock displays a help bar at the bottom of the screen, serving as a reminder of the keyboard shortcuts used. Since all Shortcuts cannot be represented in a single line, you can cycle through the different shortcuts by pressing the D-pad “down” position.


The application launches in a window by default, but can be made full-screen by pressing “f”. Pressing “f” again enables the window-mode again.


Pandora Clock auto-saves any change in its configuration into a text file called profile.txt. It auto-loads the last used configuration when starting up as well. If the profile.txt file is not present, it creates one. Note that additional information for secondary time display information (city 1, city 2, city3) is saved in the profile.txt and once saved, does not need any internet connection again to be retried. However, the weather information needs, obviously, internet connection and is not saved in the profile.txt file.


Support


There are probably a few bugs not yet identified by the time of beta release. Please report them in the thread : http://boards.openpandora.org/index.php?/topic/9318-upcoming-pandora-clock/


-----------


Comments are WELCOME on the documentation as well :)
 
Last edited by a moderator:
Thanks Bud.


Just to give a short update. I am polishing things up, adding a bit more documentation and notifications within the app when errors happen.


I should be able to release a PND for beta testing this weekend.
 
Would you be interested in new features such as :


- Pomodoro function (having a 25 mins countdown timer to monitor your time spent on tasks while keeping efficiency ?)


- Countdown timer for any duration ? (could be useful if you are cooking, for example, and need to wait for a while)
 
24-Hour-Mode would be cool, not the whole World has AM/PM:


So it would ne nice, wehn I can use fpr 2pm -> 14:00
 
Back
Top