Tuesday 31 December 2013

My ideas have been QNAP'd

It has been some considerable time since my last post. Whilst my fingers may not have been typing as much, this does not mean that productive work has ceased. Far from it. I have in recent months encountered a number of options and ideas that will change the scope of my work with the Raspberry Pi.

Within my own home environment, I have been seeking to utilise the RasPi as a solution for a number of different needs; home automation, media centre, games console, personal cloud server, web server, print server, etc. Up front the RasPi has three core strengths from my humble opinion; ease of use, low-cost and energy efficiency at 36W. However, it has some drawbacks as well.

With respect to it's use as a media server, the software solution that I had heard a lot about and had been wanting to use (because it was the one that would work with our main TV) was Plex. However, Plex is not available on the RasPi. With any server that is storing large amounts of data, that is constantly running, having some kind of redundancy in the storage. Let's face it, the time taken to rip several hundred DVD's and CDs to a media server, and the bandwidth required to download others is not insignificant, and if you've done it once, you really don't want to go through it again. Unfortunately, with only USB connections for mass storage options, the RasPi is limited in this aspect, and the more hard drives that you have plug in through a powered hub, or with their own power supply, the less green the RasPi becomes as an option.

Over the last month I have had good fortune to spend some time with fellow geeks who have sorted their home media centres and are using Plex. I've been lucky to receive demonstrations of their systems, and more importantly one of them revealed that he is running his system from a QNAP server. I asked about power consumption and he told me that since replacing an old PC with the QNAP server, their power bills had decreased about $100 (AUD) a year. Given that the QNAP servers have multiple drive bays, mounting multiple hard drives and configuring a RAID array will provide redundancy. They have multiple Gigabit Ethernet ports, half-a dozen USB ports and other features too. What's more, they only draw 40W when in operation (less for sleep mode) and their processors are far more powerful than that of the RasPi.

Awesome!

So, does this mean the end of the Rastaberrian Project? Hell, no! It just simply means that I can refine the scope of my ideas of what to do with the RasPi, and remove the concept of using it as a media, print or personal cloud server. My current thoughts are to place any such server in DMZ, so that it can be accessible externally as well. In considering the RasPi for home automation, my current thoughts are that this should be secured within the home green zone, and if external access is required - facilitated by web services via a secure web page hosted from the DMZ. Use of the RasPi as a games console, or to make an ordinary TV into a Smart TV, I think still holds merit.

Friday 20 September 2013

RasPi and a 13 Port Hub: What Would You Do?

My recent acquisition of a 13 port hub to work with my Raspberry Pi got me to thinking, what could be done with it?

Sure, I'm intending to work with it to develop some energy and cost efficient #media_centre options, but my mind has been ticking over what other options it could be used for - with the two devices combined, that provides a total of 14 USB ports. With the combination of an #Arduino kit or two, it could be rigged up with motion sensors, then when activity is detected by the Arduino sensor nodes, it could wake up a number of web cams to record the activity. Possibly useful as security for a small office or apartment. You could have an array of 4 +Arduino sensor suites, and 7 web cams attached. The remaining two ports (remember the Pi is drawing its power from one port) could be used for an external HDD to save the footage to, and a wireless Broadband modem - so that when activity is detected it can contact you and provide footage on demand.

So, I am looking for some inventive ideas please.

I'll kick off the party with my own idea - this one is less serious and more fun.

1. The Venus Pi Trap
Requires;
3 x Arduino controlled sensor arrays - each array has motion and distance sensors
1 x Raspberry Pi
1 x 13 port hub
10 x USB missile launchers

Write a customised app for controlling the sensor arrays and the missile launchers. The app interprets the motion and distance data from the sensors to triangulate on the motion, and in turn aim the USB missile launchers, then fire. Surprise your family and friends! Slaughter your siblings in a hail of rubber missiles! Teach the cat that the corner of the room is not its litter tray! If you think a battery of 10 missile launchers is overkill, just replace one or two of the launchers with web cams - capture the carnage forever. Shock and Awe!.

Thursday 19 September 2013

Play Room Media Centre: Green Hub Option 2

Given that it's not possible to get the PiHub in Australia yet, I've been looking out for other options. Particularly option that would draw the same or less than the PiHub, yet still offer the same functional advantages.

I Was Bad
Yes I found an option to the PiHub, and I bought it. Thank you Dick Smith for the XH1237 powered USB hub. This beauty draws 108W through it's power pack. That's about the same as three of my Raspberry Pi machines. But it did cost $60 AUD. That is a fair bit more than the PiHub. Ooops!

But Wait There's More...
The real beauty of this device though is that the output of its power pack is 5VDC at 4A. That means that whilst the power pack draws the power of 3 RPi, it puts out enough to power 4 RPi. And it could power 4 RPi and have ports remaining for peripherals. Yes, you heard correct. This baby has 13 USB 2.0 ports!

13 Ports? Really?
Yep. Now you might well be thinking that this is a bad case of over-kill. It could be. But, lets think in terms of a Media Centre that has the capacity to play games. Now of course you are going to want the hub to power the RPi. You are also going to want to plug in a substantial size HDD and a WiFi dongle. That's 3 ports gone. Wireless keyboard/mouse dongle. That's 4 ports gone, with still room to spare. So let's assume you want a second HDD in there - the first was for your movie collection, then second is for your games. Sweet. Now lets throw in some neat gadgets for your gaming experience. Say a steering wheel, pedals and feedback chair. We've allocated 8 ports now. There's 5 ports spare on the hub, plus one other on the RPi itself.

What More Can We Plug In?
Now depending upon what games you have and how big your screen is, it could be feasible to have up to 4 controllers plugged in. We could also plug in a web cam. Bam! That's our 13 ports filled, but look at what we've achieved - neat!

Thursday 12 September 2013

Play Room Media Centre: Hail the PiHub!!

In my previous post regards the development of a play room media centre, I cited one of the key goals was to attempt to build a solution that was going to be more green than other games/media centres on the market - and trying to keep the power consumption as low as possible.

Now there might just be something to help gain that all needed advantage, thanks to the pirate crew at PiMoroni - all hail the PiHub.  When I saw the post pop up about this earlier tonight, I was all set to go and buy one, damn the torpedoes!  Problem; they seem to be shipping with power packs for the UK and EU market.  Any chance that they could do one for the Australian market?

The Drawing Board
Looks like this post is therefore relegated to the drawing board.  So what was all my excitement about?  Given that I am still at the research and planning phase of my media centre project, I don't need to rush out and get a PiHub right this minute.  Well the PiHub is a powered four port USB hub built with the Raspberry Pi specifically in mind.  As you may recall from my previous post, my initial plans for a media centre incorporate USB keyboard, USB mouse, USB WiFi dongle, and USB HDD.  So that's four USB devices.  Now, if we configure the +RasberryPi so that it is drawing power from the PiHub, that means that we have just enough USB ports left on the Pi itself and the hub to cater to the four peripherals.  Great - that should then be quite tidy.

Shooting from the Hip
What we do know about the PiHub is that it's power pack supplies it with 3000mA (3A) of power.  My current Raspberry Pi power pack only supplies 1A, and consumes 36 W.  What I have not been able to discover yet is, how much power does the PiHub power pack consume?  For now, I am going to shoot from the hip and assume that since it's output is 3 times the amps of the Rasberry Pi power pack, its consumption is also 3 times greater.

If this assumption holds true, that means that the media centre project project built around a PiHub, would consume approximately 108W.  Based upon my initial research of the current media centre market makes it competitive.

From Here...
From here I need two things; to confirm the power consumption of the PiHub power pack, and to seek another edge to make my idea a worthy opponent of the current market products.

Monday 26 August 2013

Play Room Media Centre: Keeping Ahead of the Curve

Following on from my last post, with any ideas of what we could do with a RaspberryPi in the #play_area, I need to make sure that I have some of the questions and answers squared away before introducing the ideas to my son. He's a smart, intelligent boy, with a great ability to conceivewhat could be done. But like all seven year olds, they don't necessarily handle failure and changes to plans once you start them on something. So, with any such projects, there is always going to be the necessary parental home work to be done upfront.

Play Room Functions
There are a number of needs that could be fulfilled within our son's play area. He loves watching his DVD/Video collection (my wife has an uncanny knack of finding old kids favourite videos in good condition!). He is also at an age where his musical tastes have and will continue to expand beyond the Wiggles, so playing music is also required. As all of these media can be digitised and served across our network - this all comes under the need for Wi-Fi media streaming. Though for the sake of our household Wi-Fi performance, it might be best if the majority of the children's content is available locally on the media centre.

Some of the programming that our son enjoys may be available from online/smart TV services line the ABC's iView service. However, other programs are not. Our experience is also that some smart TV devices are not compatible with the ABC's iView. So being able to watch free-to-air digital TV is desirable, but at the moment, we'll consider what hardware will be required to provision this, but not move to implement.
Games console. Don't ask how, but somehow we have existed all these years without owning a games console. No Xbox, no PS3, and no Wii. No we are not deprived and nor is our son. If anything there are times when he plays too many games already. However, as part of having a play room that provides entertainment to a small group of children when he has friends over, having a multi-controller games console would be good. Lets face it, having a group of friends huddled around one PC and a small monitor in the confines of a bedroom, whilst cosy, gets boring for those who are waiting to have a turn.

Other Requirements
All this needs to be established in such a way that it's power usage is economical, and such that it does not cost a lot - which might mean some seemingly crazy, yet innovative recycling/re-purposing of devices.

Initial Research - OS
One of the many questions to resolve here is which distro would be the most likely to achieve the greatest number of requirements - therefore providing a simpler low-risk solution and less set-up effort - and keep the focus upon conducting a successful project. Primarily I am considering one of two options - Debian 'Wheezy' and RaspBMC. Of these two offerings, RaspBMC is probably going to cover the need for the storage and streaming of digitised content. I am yet to find another distro for the Raspberry Pi that is know to be stable enough that would natively support a gaming interface such as Valve's Steam.

So, this is something that will need to be tested - is there a Raspberry Pi distro that can run steam? If not, this does not kill the project nor mean that we cannot meet the requirement. It just means that when we look for games to play, there will be a simple 'marketplace' to get them from.

Initial Research - Hardware
From the requirements that I've set, the solution is going to require the following hardware:

  1. Raspberry Pi - I'd like to go with the latest, but I have an old Rev A Ver 2 that needs to be put to use.
  2. Powered USB Hub - to power the Raspberry Pi and to provide device connectivity
  3. Wireless keyboard/mouse replacement - For the moment, I'll have to start with just a USB mouse and keyboard.
  4. USB HDD - at the moment I do have an HP 3TB unit sitting spare. I need to test it on the Pi as it is a little proprietary in its interface. It has it's own power supply which draws about 144W - so I am not entirely keen on this. A unit that is less power hungry or that could be powered through he USB hub would be nicer.
  5. USB Wi-Fi dongle. I have a Netgear Wireless N dongle that's been spare for a while. It might well be too old to support the bandwidth for the media streaming.

Initial Research - Power Consumption
What are we replacing? A DVD/Video player, in which the DVD does not work (50W), a DVD player (15W), and a stereo system that I suspect runs about 45W - but given that CD's can play in the DVD player, it's consideration is negligible. There is also the as yet non-existent games console. So for now, that means that we are trying to keep power input to around the 65W mark (drawn by existing DVD and Video players combined). In terms of considering the project a success in this aspect, some consideration must also be given for replacing the need for a dedicated game console. Not currently owning one means that more detailed research of their specifications is required.

If all that is required to successfully implement this was the Raspberry Pi, a Wi-Fi dongle, and a wireless RF or Bluetooth dongle to connect to a wireless controller, that could be successfully achieved on just the power supply for the Raspberry Pi, which draws 36W.

I know from previous investigations that most powered USB hubs draw more than 60W, and the powered USB drive I have sitting handy draws 144W.

From doing some leg work and looking for the power consumption specs for game consoles online - well they sort of do not exist. That is to say, that in conducting searches it was easier to find power consumption statistics from independent sites, than from the manufacturer's themselves. Probably the most useful statistics I found compared the Wii U, the Xbox 360S, and the PS3 against one another (http://www.eurogamer.net/articles/digitalfoundry-wii-u-is-the-green-console). Definitely the Wii U runs at 30-35W by this reckoning, where as the older versions of the Xbox and PlayStation platforms were running at 65-75W. Not sure about the power drain of the Xbox One and the PS4 - the companies are all about bragging about the power usage when in stand-by or low power modes, but not about their power consumption whilst the device is actively being used.

So to keep this home-made solution green, I think that a reasonable target for success is 100W or less. At 130W or less, I think it could be considered on a par with the collection of devices that it replaces, but any result over 130W would be a fail.

Sunday 25 August 2013

Child's Play

I sometimes feel like I'm caught between two worlds. My father was one of the key people for getting Wang computers into parts of the Australian Federal Government, however his generation were born before our modern computers, and so he was always playing catch-up. My son at age seven has taken to having laptop and joining me in playing with the Arduino all to easily. And it has only been through my own lack of organisation that he hasn't had the opportunity to play with a RaspberryPi.

But we are taking steps in the right direction.

As an educator I know that even when dealing with an audience that has a background in the subject area and a strong conceptual ability, it is useful to have tangible, physical models to help stimulate and backup their learning of concepts. And this is where I think that the Arduino has a really strong place. There is just as much that can be done to demonstrate the base concepts behind electronics and programming by modifying the set-up of a circuit as there is to rewriting code, and this is an important point that the Arduino brings to any session of working with it.

When we gave our son my wife's old laptop, I first cleaned it up. It's about a 5 year old XP netbook. Even though he'd spent time on our desktops every now and then, it took him a while and some persistence, and many questions to get the swing of using it as a power user. And so his hunger for the knowledge grew. Apart form playing games, and researching old Dr Who episodes on YouTube, every second day he was changing his desktop appearance and demonstrating more skills in the administration of the machine.

Then he saw my Linux Mint-Cinnamon machine in use. He wondered what this Linux thing was and he wanted one – so now his laptop dual-boots. Interestingly enough, whilst he has made changes to the Linux Mint config, I haven't been consulted.

Being aware that he was yet to get the Raspberry Pi experience, I grabbed an idea from the Raspberry Pi distros, and installed Scratch on his Linux Mint partition. With a bit of coaxing he got into using it quite well. That was a couple of weeks prior to the both of us ending up on bed-rest with tonsillitis. With my wife overseas at the time, despite the fact that my son was sick – he still had his bounce. How would I keep him in one place, where it was warm, safe and preferably a bed, such that he'd recover quickly and if I fell asleep because of my illness, he'd still be right next to me? And that's where having Scratch tutorials on YouTube playing on the bedroom TV became a real godsend. By the afternoon of our second day laid up, he was re-mastering PacMan.

So I had been thinking about using a Raspberry Pi to make the play-room TV into a smart TV, and to give it games. I think the best course of action may be to let my son give that project some direction.

Wednesday 5 June 2013

It's been a while since drinks. Time to return to the bar!

Apologies for this being a quite blog.

Having been busy with my regular job, and periods of re-occurring illness keeping me down, I have not had much chance to get into playing around with the +Raspberry Pi  .  Looking forward to that all changing.

Bought an +Arduino starter's kit a few weeks back.  Got it out the weekend before last and introduced my seven-year-old to it.  Soon had him getting into understanding the programming control structures - after a couple of projects he was happily adapting the sequence in one of the chasing light projects.

I thought that it would be relatively easy - didn't think it would be that easy.  Wow!