i: Ten wpis jest dostępny także w języku polskim.
Let me show you, what I have been working on for the last couple of months.
Here’s Home Server 3. Yes, I’ve decided it’s time to upgrade. As much as I love Raspberry Pi, it became a little underpowered for my needs, therefore I decided to take an old laptop of mine and repurpose it. The Thinkpad X201 provides enough CPU power while not taking too much electricity. Yes, definitely more than a Pi, but still – much less than a full PC.
As you can see on the photo above I’ve chosen a clean and readable design. This time I decided against giving user an option to be able to customise the layout. I’m not sure yet about this approach, but it works for now.
Like in the HS2, there’s a list of apps on the left. I’ve gone for the list this time, it looks more readable than the tiles. Then we have a big welcome sign, and “sensor sweep” panels, as I like to call them. These are taking information from either locally installed sensors (like temperature / humidity / air pressure) or from the OS itself. On the right you can see today’s weather conditions and forecast for tomorrow. You can click (or tap) on each one of them, and the HS3 will take you to the module that gets the info for it (so – weather, sensors, etc.).
Oh, and the panel itself is multilingual. It detects the browser’s language and displays the interface accordingly.
The sensor data (selected ones) is recorded and kept in the system for 7 days. This way you can check what were the values of each sensor anytime in the last week. You can change the sensor resolution – that is you can select the chart to be drawn for values for every minute, every 10, 15, 30 or 60 minutes.
The weather module shows you current data, along with the forecast for 5 days. For getting the data it uses openweathermap.org API.
After clicking on a day from the forecast on the main screen you will be presented with detailed data for that selected day. It displays the conditions for every three hours, and charts for temperature, pressure and humidity. Compared to the HS2, you get much more information, and they’re more readable.
Yeah, one of the reasons was to create an interface, that will actually look good on both mobile and big screen. Took me a while and made me realise some things – like, just because you used Twitter’s Bootstrap, that doesn’t mean it will look good.
New file manager is much faster than the previous one. I spent countless hours on trying to optimise it further, but I think I’m on the right spot. This version reads even huge directories with a lot of files and/or big files under a second, while still providing all the functions of the previous one.
Yes, drag and drop file uploading as well.
Just like the previous one, HS3’s file manager supports previews of the various files – much more than the HS2. Everywhere I could, I just used native browser support for files, but some of them, like .pdf files, were just not working the way I wanted to. If you place a PDF document in an iframe, it will display just fine in the desktop browser, but on mobile it will just start downloading file. I wanted to prevent that, so HS2 converted the PDF to images and displayed each page in the browser. This time I used pdf.js library, that allows me to display the file without using the machine resources to convert it.
This version of Home Server supports the HS Cams – a little side project of mine. Basically – you get an network enabled camera with motion detection, that will keep the events in the archive, and expose it to the HS3 via an API.
Thanks to that, HS3 can display a live view from the camera. I still have to work out some things, like I would like to increase the camera’s resolution and framerate, but it’s a nice working CCTV system for pennies.
The archive offers you access to all the recordings made by the HS Cam. You can either select them from the expandable list on the right, or using the timeline.
Wow, this is the thing. Maybe not the next big thing, but a thing for sure. I’ve put a lot of work in this module. Here’s the music module.
HS3’s Music allows the user to control all connected devices, so basically, you can set up as many speakers as you would like and then control every one of them from one single panel. All your music library is available on all the connected devices.
Just like in the previous version, you can listen to the internet radio stations, but this time the music library is integrated. It doesn’t matter for the player what does it play (well, yes, it does, but all the magic happens behind the scenes).
I’ve done some experiments with Google Chromecast, and it’s been working, but not as good as I would like it to. I’m not planning to give up on this, but I left it out for now and added it to a To Do list.
What’s totally new is downloading songs. HS3 allows you to search for the songs on YouTube and then add them to your library. Player will play them seamlessly alongside with the songs from your drive or the local network. As I said – all the magic happens behind the scenes 🙂
Yeah, the new photos module. This time I’ve decided on the album approach. It just took too much time to load your entire library of photos from the drive each time you opened the photos module. I mean, especially when you have loads of photos – like I do.
This time Home Server will load only the first photo from the album and display it as the thumbnail. If you want to see more photos, you’ll have to click on the album and it will open a view with all the photos from that specific album. Seems like a small change, but makes a huge difference, when it comes to loading time.
The single photo view allows the user to easily jump to the previous or the next photo. It also displays the information from the EXIF tags.
Of course I couldn’t just leave the recipes out. More data and better quality of the displayed pictures, but basically it’s the same module. Not counting some optimisation, that is.
You can get a random recipe this time, also it includes more info, like how difficult it is to prepare a dish or how long does it take.
Here we have a new module – the library module. Designed for books at first, I expanded it a little adding support for other media – like games, movies or albums. You can search every field in the database, and that includes barcode, if you have (or hack one together) a barcode scanner.
I was thinking about adding a lending option, but I decided against that. For home usage you can just edit notes field, but of course that doesn’t mean I won’t add that function in the future. When I will be bored, for example.
Ah, yes, the network module. Basically same thing that was in the HS2 – it scans the local network and saves found devices to the database. It allows the user to keep track of devices connected to the network. This time we have cards and a table view.
The ring view was fun – to look at and to code it as well, but it gets really messy once you pass certain number of devices.
Creating this took hours. Of tinkering, live testing, coding, planning. And will take much more, because it’s me we’re talking about – so it’s never finished 🙂
But it was fun!