Archive for the ‘Windows 8’ Category

How the Surface RT became the most reliable Server in our house (Co-starring: Azure and Windows Phone)

Tuesday, August 19th, 2014

I loved my Surface RT from the beginning. The reason why I preferred the Surface RT over the Surface Pro was that the Surface Pro was to small for me as a Notebook, and to heavy as a tablet. So I was always the Notebook+tablet-guy, and not the one-device-for-all-guy. But you know, this might change with the Surface 3.

Ok, now to this story. When I bought the Surface 2 (RT) last year, my Surface RT was a bit unused, as the new version was more light-weight and faster. But I haven’t sold my Surface RT, cause I think it’s still an awesome device. My wife and our kids also loved that device, especially for viewing family-pictures, but they also preferred my new Surface 2. So the Surface RT was a bit unused these days. But since 3 months the Surface RT is again the new superstar in our house.

It all started in early spring this year when we had a lot of break-ins in South Germany, and so in the street I’m living with my family. We already had the issue before the break-ins started that we were not able to see who’s on the other side of the front door. So with that break-in-wave I decided to put some cameras around our house, and I had some requirements:

  • Everyone should be able to see who’s behind the front door
  • Everyone should be able to see around the whole house from inside
  • Cameras should have infra-red-support for night vision.
  • I want to access the cameras from everywhere around the world

I asked an electrician for an offer. But it was just too expensive, and additionally he said he needs to slit some walls, which would cause even more costs as additional work is needed to fix all that. Beside those points my “Nerd”-adrenalin was increasing with every day while I was thinking about my requirements. And so I came up that this project is a totally great project for me – just for me (and you, my faithful blog-reader). So I planned to do the whole stuff on my own.

The whole project can be split up into four parts I want to show you now:

  • Installing the IP-Cameras
  • Surface RT as a Central Point
  • Surface RT connected to Microsoft Azure
  • Windows Phone as a Client

So let’s start with Part I

Part 1/4 – Installing the IP-Cameras

After I looked at the footprint of our house intensively, I planned to install 7 IP Cameras. That number of cameras is necessary to see every area around our house. I drilled holes, crimped RJ45 network cables (yes, I didn’t want to use WiFi for that project. Reason is just to keep electric smog as low as possible), branched of additional plug sockets etc. In the end I had the seven cameras connected to my home network via ethernet-switch. The picture below shows this.

Part1_IPCams

After a lot of research I decided to buy IP Cameras from Vivotek, I took the model IP8332. I tested quite a few, and those where in my point of view really good ones and worth the price. They have a 1280×800 resolution, infrared and they support Power-over-Ethernet. Below a picture of two cameras under the roof framework in 4m height (yes, this project also required to buy a new ladder. :-))

IPCamerasUnderRoofFramework 

Part 2/4 – Surface RT as a Central Point

After I had installed all cameras, I wanted to have a central point in our house where anyone could view them all. Especially the camera at the front door. And that’s where my Surface RT came into the game. I connected the Surface RT also to the same network the IP cameras are in, like shown below.

Part2_SurfaceRTasCentral

It took me about 3 hours to build an app that grabs the Video-Streams of my seven cameras, that never closes and that is always running. I placed the Surface RT on a sideboard that stands at a central point in our house. Every time you go to the front door, you’ll pass that point and you can see who’s outside. Here’s a picture what it looks like:

SurfaceRTAsCentral

Clicking on one Camera-image will zoom it up to 100% of the screen (of course with a nice animation). In addition I added a USB-to-Ethernet-Adapter to the Surface RT, as we’re turning off our WiFi during the night. But of course the device should still run.

So now I already met three requirements:

  • Everyone should be able to see who’s behind the front door
  • Everyone should be able to see around the whole house from inside
  • Cameras should have infra-red-support for night vision.

Only one requirement is missing

  • I want to access the cameras from everywhere around the world

I thought that’s an easy one, but there was a problem. Let’s look at that problem in an excursion

Excursion: IPv6 and IPv4

My provider gives my only a physical IPv6-address, but no physical IPv4-address. This is called Dual-Stack-Lite (more here on Wikipedia). When I call an IPv4-server, that call goes in the first step via IPv6 to a proxy of my provider, and from there with a physical IPv4-address to the target host. Unfortunately that IPv4-address is shared with many other users. I never noticed that while I was using the web as a client. But now I wanted to serve the camera-images from my Home-Network.

First trial was to do a Port-forwarding on my Router to the IP-Addresses of my cameras. But the problem is, I don’t have a physical public IPv4-address. My IPv4-address is shared with many other users, and it’s the address of the proxy. I’m not able to reach my home-network with IPv4, the call will end at the proxy!

Ok, so only IPv6 will work.

Second trial was to use IPv6. But then the next problem popped up. The whole mobile communications network in Germany (and also in other/most parts of the world) runs still with IPv4. So to access IPv6-stuff from my mobile, I need to go through another proxy that does the translation from IPv4 to IPv6 and back.

Puh, what a mess. When you read in forums about private NAS (Network attached storage)-systems, you’ll find a lot of that IPv4/IPv6-stuff. But I didn’t like the existing workarounds, and I came up with another idea.

I had the idea of the Hollywood-principle that you might know from developing applications: “Don’t call us, we call you”

Part 3/4 – Surface RT connected to Microsoft Azure

Yes, due to the IPv6/IPv4-issue, I’m not able to access my Home-Network from the Internet in an easy way. But I can upload things from my Home-Network to the Internet. So I had the idea to upload compressed images from my 7 cameras every second. So I need a service that does that job.

As I already had a 24h/7days-running-Surface RT-device, I thought maybe the Surface RT could do that job in addition – beside displaying live-images of the 7 cameras.

But where shall I put those images? For me Microsoft Azure seems to be the perfect place. I could create a secure Azure Website or any other client.

Yeah, that sounds good. I decided to go that way down the road. I extended the Windows Store App running on my Surface RT to upload compressed camera images every second to Microsoft Azure. The connection is done via https. The picture below shows the architecture:

Part3_UploadToAzure

As the camera-images are very small, I thought Azure’s Blob Storage would be a bit overkill for that scenario. So I decided to use Table Storage on Microsoft Azure. I created a simple table that contains the current images of all seven cams. And my Surface RT uploads those images every second. And guess what: My Surface RT does this job without break since three months. And everytime we’ve a visit in our house, people say: “Wow, how crazy is that”. And they think the Surface RT is just displaying a live-view of the cams, but you know now, it’s doing more.

(Btw: The costs for Microsoft Azure are below 2€/Month. If you’ve a MSDN-Subscription, you’ll have 150$ for free)

Part 4/4 – Windows Phone as a Client

Now I’ve all my current camera-images available in Microsoft Azure. So I can do whatever I want with them. I decided to create a Windows Phone App just for me. So I can connect with my Windows Phone to the fresh data on Microsoft Azure that is provided by the most reliable server in our house, the Surface RT. The image below shows the final architecture.

Part4_WindowsPhoneClient

The Windows Phone App does a polling on Microsoft Azure. That’s not the best battery-saving-way, but fine if you just want to view if everything is alright at home. Below is an image of my Lumia 920 that runs the application:

 WindowsPhoneAsAClient

Summary

As you can see, the Surface RT, Microsoft Azure and Windows Phone are doing their job really really well. It was simple to build up that architecture, and I was able to fulfill all the requirements I had:

  • Everyone should be able to see who’s behind the front door
  • Everyone should be able to see around the whole house from inside
  • Cameras should have infra-red-support for night vision.
  • I want to access the cameras from everywhere around the world

Alright, after a break when I bought the Surface 2 my Surface RT is used again and more than ever before. And everyone in our house is loving it. Today even my youngest daughter (1,5yo) runs to the Surface RT when the doorbell rings to look who’s waiting behind the front door.

Thanks for reading,
Thomas

BASTA! Spring 2014 – slides and demos

Friday, February 28th, 2014

At this year’s spring edition of the BASTA! Conference (http://basta.net/2014se/) I gave three talks:

  • Windows 8.1 – UI Neuerungen
  • All you need to know about XAML
  • Asynchronous Programming with C#

Thanks to all the people who joined my sessions. I hope you liked them. If you’ve any feedback to share with me, feel free to contact me via this link.

You can download all slides and demos here:

Thomas talks

It’s there: Windows Store Apps with XAML and C#– the ultimate handbook

Thursday, May 30th, 2013

Wow, it’s done. The ultimate handbook about Windows Store Apps with XAML and C# is printed and available. You can order your copy of the German-written 1146-pages-book on amazon:

Amazon.de: Windows Store Apps – das umfassende Handbuch

Find more information about the book on amazon, on my homepage http://www.thomasclaudiushuber.com/windowsstoreapps and on the publisher’s website on www.galileocomputing.de/3196.

Training on Windows Store Apps

In Germany, Switzerland and Austria I’ll give a three-day-training on Windows Store Apps. If you or your company have interest on this professional training, directly contact me via http://www.thomasclaudiushuber.com/contact.php. It is possible to train you in the Trivadis-Trainings centers or onsite at your office.

So far so good, let’s look at the past and the future

The past

Puh, this was year was really instensive. Here the straight plan I had so far:

  • January: Buy new home
  • February: My second daughter Sara was born.
  • March: Finish the manuscript for the book
  • April:Renovate and improve new home (thanks to Makita Zwinkerndes Smiley)
  • May: Move
  • … in all months: Working as a consultant and trainer @Trivadis.

The future

So the future contains much more spare time, it’s necessary, because I say “Time is money is not true, time is unpayable”. I want to spend as much as I can with my kids, my wife, family and friends (See also this awesome post from Tim on that topic). So the future plan looks like this:

  • June: Finish a WPF-project as a consultant and enjoy the free weekends
  • July: Parental leave Smiley
  • August: Parental leave Smiley
  • September: Back to work, speaking at basta (www.basta.net) and at Trivadis-internal TechEvent

Keep on rockin’
Thomas

Interview about Windows 8

Friday, December 21st, 2012

At BASTA! (.NET-conference in Mainz/Germany) I gave an interview about Windows 8 and developing Windows Store Apps. You can watch it directly here:

You can also read an article about the topic here: Link to article

Thomas

Microsoft TechDays – WinRT-Controls Deep Dive: FlipView, ListView, GridView & SemanticZoom

Monday, November 19th, 2012

Danke für die zahlreiche Teilnahme an meiner Session zu den WinRT-Controls zum Entwickeln von Windows Store Apps. Es war eine Level 3 (von 3) Session. Wie versprochen sind die Slides und Live-Demos unter folgendem Link verfügbar:

www.thomasclaudiushuber.com/talks.php

Bei Fragen, Feedback, Lob und Kritik einfach eine E-Mail an mich:
Mail an Thomas

Thomas

SwissBUILD – Kostenfreies Event mit Microsoft und Trivadis rund um Windows 8 & Co.

Monday, October 22nd, 2012

Am Dienstag, 30. Oktober 2012, veranstalten Microsoft und Trivadis in Glattbrugg (Zürich) ein kostenfreies Event rund um Windows 8, Windows Store Apps & Co. Allerdings sollten Sie sich für eine Anmeldung beeilen, da die Anzahl der Teilnehmer beschränkt ist.

Nach Vorträgen von Ken Casada (Microsoft) und mir werden wir uns die Keynote der BUILD-Konferenz im Live-Streaming ansehen. In einer Podiumsdiskussion mit Experten von Microsoft, der MSUGS, der Trivadis und der Fachzeitschrift Netzwoche diskutieren wir anschliessend, was die Ankündigungen der Keynote für die Praxis bedeuten. Zum Abschluss findet unter allen Teilnehmern eine Verlosung statt.

Hier die Fakten zum kostenfreien Event:
Datum: Dienstag, 30. Oktober 2012
Zeit: 16:00 – 21:15 Uhr
Ort: Trivadis Zürich, Europa-Strasse 5, CH-8152 Glattbrugg

Weitere Details zum zeitlichen Rahmen, zu den Vorträgen sowie einen Link zur Anmeldung befinden sich auf folgender Seite:
http://www.trivadis.com/events/m-build-live.html

Windows Store is now open for all developers in 120 countries

Wednesday, September 12th, 2012

Microsoft’s new marketplace for Windows-Apps – called the Windows Store – is open for all developers since yesterday. Before only a limited amount of developers and companies have been able to register for app submission. Now every individual can register to the Windows Store and submit Windows Store-apps.

Read more on the Windows Store for developers-blog

In the blog-post on the Windows Store for developers-blog Microsoft also announced that certain Microsoft Developer Network (MSDN) subscribers will get a free one-year developer-account for the Windows Store. If you don’t have a MSDN-subscription, you’ve to pay a small fee.

To create your developer-account and submit your Windows Store-apps to the Windows Store, go to the windows-developer-portal on http://dev.windows.com. In the developer-portal click on “Windows Store-apps” like shown in the screenshot below:

By clicking the link you navigate to the portal for Windows Store-apps, also directly accessible via http://dev.windows.com/apps. In that portal just click on “Dashboard”:

After the click on “Dashboard” you are prompted to sign in with your live-id. With a wizard-like approach you can create your developer-account there and manage your Windows Store-apps.

Have fun. :)

The naming issue: Metro Style-Apps, Windows 8 Style-Apps, Modern UI-Style Apps or Windows Store-Apps?

Wednesday, September 12th, 2012

This post is part of a series about creating Windows Store-apps with XAML and C#. Find the Content of the series here:

Windows Store-apps with XAML and C# blog-series

Through the past weeks there’ve been many names around for the apps running in the new tile-based User Interface of Windows 8. This blog-post tries to clarify about the different names and what the apps are called now.

In the beginning of the Windows 8 Preview era those apps running in the new tile-bases UI have been called Metro Style-Apps, and the whole new tile-based UI was called the Metro UI. Some days before Windows 8 went RTM, there was an issue with that name, because a German company reselling technical stuff like computers etc. already got the name Metro AG. Metro AG owns “Saturn” and “Media Markt”, two of the biggest hardware-resellers in Germany. And the management of the Metro AG was not happy with the usage of their name for Microsoft new tile-based UI. But the Metro AG never gave an official statement on that topic. Microsoft knows that the Metro AG is important for them, and they just said: “Metro was just a Codename”. Dot. If you’ve started with Windows Phone 7, you probably know that the tile-based UI was introduced there and was called Metro. So this “Metro was just a Codename” statement is not the whole truth, but that’s all Microsoft said. Seems like no-one want’s to produce big waves. In fact, shortly before the RTM Version of Windows 8 Microsoft had to avoid any long-running legal fights, so I think that’s one of the biggest reasons for the simple silent “Metro was just a Codename”-statement.

After the name Metro was dropped, Microsoft said, that developers shouldn’t use the name Metro anymore. Even Apps for the Windows Store will fail certification if they contain the name Metro. I’m not sure what will happen when Metro AG places an App in the Windows Store. :-)

OK, so the name Metro was dropped. The problem for developers, writers and all people talking about the new apps was that Microsoft didn’t provide a new name. Temporarily they called the apps Windows 8 Style-Apps or just Windows 8-apps. That was a bad idea, because when there’ll be a Windows 9 the apps for the tile-based UI will be called Windows 8-apps?! Not so good. This was recognized soon and there has been another name around for the tile-based UI: Modern UI. The new tile-based UI was just called the Modern UI, and the apps that run in that UI were called Modern UI-Style apps. But Microsoft also never officially confirmed that. Due to this naming-issue some developers called their apps just WinRT-apps, because the apps make use of the new object-oriented Windwos API called WinRT (Windows Runtime).

When the RTM version of Visual Studio 2012 came out in the mid of august 2012, the first thing I did was to look how Microsoft has named the apps for the Modern UI in the “New Project”-Dialog of Visual Studio 2012. I was really curious about that. And what a suprise, there was another name: Windows Store-apps. And that’s the name how we developers should call the apps today.

On the developer-portal (http://dev.windows.com) microsoft had still the name Metro. Since last week there’s also the new name Windows Store-apps. Even in the forums they are now talking no more about Metro Style-apps, but about Windows Store-apps (http://social.msdn.microsoft.com/Forums/en-US/category/windowsapps). That’s a statement from Microsoft that they will keep this name for the future. Yes.

So, let’s wrap it up:

  • Modern UI
    the tile-based surface in Windows 8 and in Windows Phone 7/8.
  • Windows Store-apps
    apps that run in the Modern UI on a Windows 8 PC/Tablet are sold over the Windows Store and so they are called Windows Store-apps.

It’s just as easy. :)

Windows Store-apps with XAML and C# – blog series

Thursday, August 16th, 2012

Since yesterday evening Winodws 8 RTM is out for developers. This blogpost is the start of a blog-series about developing Windows Store-apps with XAML and C#. The series consists of some informational and some “how-to” posts:

More topics will come. If you’ve topics not listed above you want to read about, write a comment on this post.

The first post about XAML will be written till saturday evening

Thomas

Windows 8: The (not) missing startmenu

Thursday, July 26th, 2012

Before we start with a series of blogposts about developing Windows 8 Metro-Apps with XAML and C#, we  take a look at Windows 8 and its missing startmenu Bin gleich zurück. Windows 8 which will be in RTM-state in the first week of august. I’ve read many articles about the missing Startmenu in Windows 8. I’ve heard many people saying “Microsoft tried for years to bring a desktop-os to mobile devices, now they go the other way around trying to bring a mobile-os to the desktop”. Most of them have never tried Windows 8. Maybe none of them. And all of them said that the missing startmenu is a big loss.

I’ve used the Release Preview version of Windows 8 since it came out, so for far more than 1 month. And I don’t miss the startmenu. I really don’t miss it. Let’s figure out why.

In Windows 7, I used the startmenu like this:

I’ve pinned my favourite applications to the taskbar and the most favourite ones also to the startmenu. But I found out, that I was always using the link on the taskbar, never the one over the startmenu. For non-favourite applications, like e.g. mspaint, I used the search-box in the startmenu. The searchbox is the most used feature of the startmenu from my point of view. I think 70% of my personal startmenu-usage. Additional 10% for manually browsing programs and the rest of 10% to open the control panel and 10% to shutdown. With that in mind I switch to Windows 8, and now I don’t have the startmenu anymore. Instead of I have the Metro-Screen.

The Metro-Surface in Windows 8

The Metro-Surface is not only a startmenu-replacement, it’s much more. In fact its a dashboard with your favourite applications, showing up current information via live tiles. And in fact I can use it the same way as my Windows 7 startmenu by just start typing:

image

When opening the mspaint-Application my computer jumps to the desktop. I can fastly switch between my “dashboard” and the classic Windows-Desktop. In Metro, I can order my applications in groups, e.g. social networking for facebook, twitter & Co., developer tools for Visual Studio, Expression Blend (I don’t have a “Designer”-group Zwinkerndes Smiley), Reflector etc., and so on.

So I’m really fine with the Metro-Surface instead of the startmenu. Ok, I have to say, I really love the Metro-Surface, it looks so fresh and excited and gives me all the information I need in a single place. And for that it uses not only a part of the screen, but the whole screen.

If you search the web, there are already many tools around that allow you to create the registry-setting so that the classical startmenu appears again. You can even boot windows 8 directly to the classical desktop instead of booting to the metro-startscreen.

What about you. How do/did you use the Windows 7 startmenu and do you think you’ll miss it?

Thomas