The easiest solution was to restart the whole Raspberry, but that would take me ages to check every update. Buckle up, and read on …ĭuring the development I stumbled into one discomfort of not heaving a keyboard and mouse connected to the Magic Mirror: If I updated the interface, there was no easy way to refresh the site on the Magic Mirror. Since you made it so far in this blogpost, you might be ready for some more complex info. Unfortunately they don’t support a JSON format, therefore I use the FeedToJson plugin to convert the RSS data to JSON.Īll other content, like the current date and time, and the compliments are all just some simple javascripts. The news feed is just the RSS news feed of Holland’s public broadcasting cooperation. Now, since javascript is not allowed to do such a request (because of Cross-site scripting security), I need to open this data via a PHP proxy. ICloud allows you to share an calendar using the iCal format. In this case, I use two links: one for the current weather. It allows you to do a query based on a location and specify what data is desired. Openweathermap has an excellent API for free weather and forecast data. I lust like to look at an API like all the connections on the back of your DVD player: the device becomes much more useful when you connect other devices to it. In computer programming, an application programming interface (API) specifies how some software components should interact with each other. For those of you who don’t know what an API is, Wikipedia has an wonderfull description: To retrieve the data I want to display on the Mirror, I use some open API’s and Feeds. I didn’t want my mirror to be more colorful than my own reflection. Of course I could add some colors, but for now i go for the clean black and white approach. For the best contrast the content will therefor be white. It’s important to use a black background. Since the mirror will only function as a mirror when there’s no light behind the mirror. How to achieve this? Clean typography by using Helvetica Neue, and matching iconography for the weather information. Negative space can also impart a sense of calm and tranquility, and it can make an app look more focused and efficient. Negative space makes important content and functionality more noticeable and easier to understand. Instead, focus on the content and let the UI play a supporting role. And since I’m a hardcore Apple Fanboy, this design should fit in Apple’s Design Guidelines:īezels, gradients, and drop shadows sometimes lead to heavier UI elements that can overpower or compete with the content. Of course, my Magic Mirror needs a shiny design. Unfortunately this Library isn’t very polished, so it needed some additional work.Ībove libraries, combined with my own HTML and Javascript is enough to make the Mirror do the Magic. A huge timesaver when working with dates and times.Ī convinient way to convert RSS feeds into javascript usable JSON data.ĭoes some conversion of iCal data to JSON. This will help me to do some easy timestamp manipulation. In addition to some self written code, I use a few opensource libraries to speed things up:Īs almost any site, Magic Mirror uses Jquery to ease the DOM manipulation. And as a added bonus, it allows me to develop and test the interface on my Mac, before pushing it to the Magic Mirror. This allows me to use HTML, CSS and Javascript. Basic setupĪs mentioned before, the interface is not a magical application built on top the Raspberry Desktop. Of course, there are plenty of possibilities for the future. Should I only be worried about my shiny appearance? Or is there more to worry about? That shirt I’m wearing? Looks nice! But is it warm enough to wear a t-shirt?Īm I in a hurry? Or is there enough time to enjoy my reflection? What’s better then to start your day with a nice compliment? If figured I needed to following content to fulfill my need for information: Leaving enough room to see my shiny self. Only the outer corners should be used for content. What was even more important is the fact that the mirror should be usable as a mirror, and thus it should not be completely filled with (useless) information. I wanted the Magic Mirror to be a passive source of information. This would result in grease and smudges on my shiny mirror, but more important: there are better devices for user interaction. When I started the project, I figured the interface would not allow any direct interaction with using the mirror. Including an installer and integrated web server. Now it’s time for the final part of the project: the development of the interface.Įdit 1: A new version of the interface is available. So, I found the right type of mirror, bought the monitor, built a new casing, installed the hardware and configured the Raspberry Pi.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |