Posting blog posts through OneNote

Microsoft introduced a new plugin for WordPress. This plugin lets you use OneNote pages as input for your posts. That’s pretty convenient. You can write and scribble in OneNote every time you want and once you’re finished you can just move that page over to WordPress with a single click.

To make this work you need to install the OneNote published plugin in your WordPress blog. After you have installed it you need to configure the plugin according the instructions (you need to create an application so WordPress can access your OneNote files which are stored in your OneDrive)

After this you can add a post in WordPress and select one of the pages from OneNote. Pretty cool. This pages was written in OneNote as an example.

And of course a screen clip can be inserted in OneNote as well 🙂

SmartThings, how to handle guests and nanny’s in your house

Using SmartThings lets you automate most of the stuff in your house. Leaving the house automatically turns of all the lights and heating, but only when all of us leave the house. When one of us returns in the house, the lights go back on and the heating is on as well.
The last few weeks my mom was visiting and when both me and my wife left the house she got stuck in the dark because both presence sensors connected to our keys were gone and the rule in SmartThings is when everybody leaves the house switch everything off. Not a huge problem to switch back on the lights and heating but not something you would expect from your home automation system.
There are several ways to solve this. I could buy another presence sensor and give that to our guests. Only when the guests leave you have to switch it off. This might work for a nanny who gets out the house with the kids for example. The one thing which is missing in SmartThings is the ability to easily switch off the presence sensor. You either remove it from the system or remove the batteries when not used. I saw a suggestion creating a new device type with a enable/disable capability so you can switch off the presence sensor when it’s not used.
The other way is to create new ‘modes’ for your home and switch to these when you have a babysitter staying for example.
The 3rd one is what i used now. You can create a new device type which is called Virtual Presence Sensor. That’s a presence sensor you can create to develop your apps and test somebody leaving your house for example, but in my case it would work as well. Whenever my mom or the nanny stays home, I just enable the presence sensor and everything keeps working how it’s suppose to work. Lights will automatically switch on around sunset, or off around sunrise etc.
So how do you create one? Go to the web IDE login and go the My Devices at and click on +New Device

Select as Type the Simulated Presence Sensor
Give it a name (in my case Presence Sensor Guest). The Network Device Id can be anything. Select a location or your hub and finally click create.

Now you only have to change your different modes. For example the ‘I’m back’ responds to anybody arriving and you have to add this virtual presence sensor to the list of sensors you want to use (already mine and my wife’s sensor are in that list). Also ‘Goodbye’ needs changing when you want to lights to switch off when everybody is gone.

I thought this was a simple but neat trick.

My new Intel NUC desktop computer

A while ago my desktop at home started to acting up. So I decided I wanted it to replace it with something new. I was looking for something small yet powerful and it needs to be silent!. My colleague Galileo recommended the Intel NUC.
So after some searching and reading reviews I decided it looked good and would fulfill my requirements. It needs to be silent, powerful enough to use Visual Studio, enough memory, enough disk space. And it needs to be able to hook up different screens. (At least 3).

So i ordered the following parts at Amazon:

Enough memory, 512GB disk, a USB to VGA cable to hook up a 3rd screen. 2 short cables to hook up the mini display and mini HDMI connectors at the back to 2 other DVI screens I have.

So far I really like the device. It’s fast, quiet (you can hear it, and when the blower starts you can hear that too, but it’s not annoying, it’s a soft sound). I use a BT keyboard and Mouse. It’s fast enough to use Visual Studio. I can even build my own Windows enlistment which is a pretty heavy task. Happily running Windows 10 at the moment.
The NUC has a I5 processor. The case can hold a small notebook SSD drive (there is also an option to use M2 storage for future expansion).
Here are some pictures of the device. It is really small:WP_20150302_004

The package also contains a little Vesa mount so you can screw the device to the back of your monitorWP_20150302_005 WP_20150302_006 Enough USB3 connectors on the back and the fronts, 1 USB connector at the front you can use for charging (will have power when the device is shut down)WP_20150302_007

2 memory modules for 16GB total memory. Works great for running multiple emulators and hyper-v images.WP_20150302_008  WP_20150302_010 WP_20150302_011

The hard drive fits in neatly too (512GB SSD)

WP_20150302_009 WP_20150302_012

USB to VGA dongle for my 3rd screen. After installing the display adapter drivers it works great.WP_20150303_006

So all in all I am happy with the device. 1 wish would have been a TPM chip. That would made it easier for me to authenticate for work stuff with a virtual smartcard instead of my real smart card (and perhaps forget it to bring to the office because it’s still in my smartcard reader at the home office)

How to use a video as your account picture in Windows

I just found out you can use a video instead of an image as your account picture in Windows (works with Windows 8.1 and up). Pretty neat effect.


So this is how you set it up. Go to your start screen, click on your name, choose ‘change account picture’


Instead of browsing for a picture you click on camera. In the camera screen make sure you switch to vide mode.


That’s it. Pretty cool he?

Oh if you want to build your own app to do this, there is an API for that too: 

Pibow Coupe enclosure for my Raspberry Pi 2

When I ordered my Raspberry Pi 2 I also ordered a little enclosure called the Pibow Coupe. Since the layout of the Pi 2 is the same I assumed every case would fit. Unfortunately that was not the case for this specific enclosure. But with a little help of my Dremel I managed to adjust it a little bit and it now fits perfectly.

When you build the case around your Pi board they little layers are numbered. Number 1 and 2 are at the bottom, than you put your Pi on top of it, than layer 3. This layer needed some adjustments. I removed a little part of the plastic at 3 areas. After that it fitted perfectly.

WP_20150218_005 adjusted

I am happy with the end result


I like this case because it exposes all the GPIO ports so it’s easy to fool around and play with the device when adding sensors and other circuits.

Raspberry Pi 2 arrived

Last month Microsoft announced support for Windows 10 for Raspberry Pi 2. That was a perfect excuse to order one myself as well (I ordered mine at MCM Electronics).

Although it was in backorder it took less than a week to arrive. I also ordered a good power supply and a nice little case. Of course you need a memory card. 8Gb micro SD card should be enough for most situations.


Installing the Raspberry is easy. Download the Noob zip file. Unzip it to the already formatted micros SD, put it in the Raspberry, connect your screen with HDMI, mouse and keyboard through USB and a network cable in the network connector. Plug in the power and you are good to go.

First question is what you want to install. The Noobs install comes with a few choices. Pick the first one.


Wait a little bit.


And you will see a lot of linux stuff appearing on the screen.WP_20150217_005

Final choices. I just clicked Finish.WP_20150217_006

Et voila, a $35 computer is waiting for instructions.WP_20150217_007

Of course I want to put Windows 10 on this device. Yes I do have access to internal bits but I cannot blog about that stuff just yet.

SmartThings: Switch dimmer to 100% and return to original value when contact closes.

This was bothering me for some time. In the hallway we have a wardrobe closet but that part of the hallway is kind of dark. I was already planning to change the dimmers (2 way) for z-wave ones, but I want to have something smart here as well. Whenever I open the closet I want to lights to go to 100% but when I close the closet they should return to the original value (either it off, or dimmed etc).

That happens to be really easy, I found this thread in the SmartThings forum

You need a little smart app. When a contact opens it turns the dimmers to 100%, remembers the original value first and subscribes to the close event of the contact, when the contact closes again the original value is restored.

Sounds what I need is possible, so ordered the contact sensor from Amazon (click click Smile)

My SmartThings setup for my home (the logic)

In the recent blog posts I described how I setup the different sensors and connected my Nest thermostat. But the real automation or getting things convenient is by tying everything together. I have been struggling to get everything to work. One time 1 part was working but it didn’t go to another state automatically and suddenly the lights went out when I didn’t want it to happen etc.

What helped me was drawing the following diagram and after that go through the app to define/configure all the different states (in the end, SmartThings is nothing else than a state machine)


The states, Home, Night and Away are already defined in ST. If you go to the activities (those are in bold at the lines) you can configure them 1 by 1. For example you go to ‘I’m Back’. I have configured to turn on some lights and change the mode to ‘home’. At additional settings you can configure ‘automatically perform ‘I’m Back!’ when.. I have configured ‘Someone arrives’ (connected to Sandra’s and my presence sensor) and ‘Things start happening’ which is the motion sensor, so when I come home through the front door or garage and the presence sensor isn’t detected yet the lights turn on anyway.

The 1 thing left to do is connect all this to sunset/sunrise. If I return home during the day I don’t want the lights to turn on. So I want to add another state which is ‘Home sunrise’ or something like that which is a different state than home. That state doesn’t need the lights to come on. Creating a chart with that state added and the different transitions will help me configure the SmartThings hub the way I want.

Get the device name of your Windows Phone

I am updating my rubber duck app and I want to store the amount of ‘squeeck’s per device in roaming settings. So you can see the total but also how much you squeezed the duck on every device.

I am storing this as key value pair and the key is the device name.

So how do you get the device name? You can’t. There is (as far as I know) no API to get the device name.

So when searching around I found this trick which I am documenting for myself here in this post.

Windows.Networking.Proximity.PeerFinder.DisplayName will give you the name a user gave his device.

Not sure how robust it is yet. It seemed to work on my phone, but when I check the name in internet sharing in my emulators they say something like ‘Microsoft Virtual_6262’ but the API returns ‘Windows Phone’ so apparently these 2 aren’t the same. That’s ok since you can change the broadcast name for internet sharing in the UI and renaming your phone needs to be done when it’s connected to your PC.

Hmm, no neutral wire for my z-wave on/off switch, now what?

I tried to add another z-wave switch to my SmartThings network. I bought a on/off switch at Lowes (all the ‘works with Iris’ stuff you can use in your z-wave network), this is just a GE 1-way on/off z-wave switch, to connect to my outdoor lights so I can switch them on/off automatically with sunset/sunrise.

When I connected it to the 2 black wires which were used to the existing switch the lights didn’t come on. Although the led on the switch itself lighted up.

After some searching and reading the manual a little better I found out I needed to connect the neutral wire. Fortunately there is a neutral wire in this wall mount. I checked my study and that doesn’t have one. The weird thing is the z-wave dimmer works without the neutral wire.

So after wiring up the neutral wire the outdoor lights started working.


So I found some information on the SmartThings forum to explain what was going on.

No neutrals is a bad thing, unfortunately. You can use once of the switch types that don’t need a neutral, but they do have limitations.

First question: If these are three-way switches, there should be at least three wires. In the first box there should be a hot line (from the breaker/fuse box) and two wires (called traveler wires) going to the next box. At the second box there should also be three wires. The two traveler wires from the first box, and then one load wire leading to the light.

If this is what you have then you can look at Levitron which appears to have both switches and aux switches that do NO require neutrals. See this page: In particular, look at the setup in part 4B. This is what your setup should look like.

Second question: Why only Incandescent bulbs? The important thing to remember is that old “dumb” switches are simple mechanical devices. By flipping the switch you are mechanically connecting or disconnecting a circuit. The switch is nothing more than a path for power to move through.

However, a z-wave “smart” switch is an electronic device in and of itself. Yes it opens and closes the electrical circuit for your lights, but it also has a small radio built in as well as various other electronic components that control dimming, current state, etc. Because this is an electrical device it requires power all the time. This is whymost switches of this type need a neutral. The power used to “run the switch” comes from the hot, then goes out the neutral.

But some switches obviously don’t require a neutral… how do they operate then? They operate by allowing a small trickle of energy to move through the circuit. Enough to operate the switch, but not enough to make an incandescent bulb light up. These switches take advantage of the fact that incandescent’s need a (relatively speaking) high level of power before responding with light.

CFLs, on the other hand, take less juice and this constant trickle is enough to occasionally make them flicker or blink. Having a constant small level of juice probably isn’t very helpful to the ballast and other parts of the CFL either, potentially shortening their life considerably.

Similarly LEDs require a lot less juice too. Meaning that small trickle might be enough to make them come on at a dim level even when the switch is “off.” Theoretically if you have enough of a load of LED lights you might be able to get by without this switch lighting up your LEDs. For example, in one room of my house I have 4 LED lights each taking like 16 or so watts. That just might be enough to prevent them from lighting up (I don’t know for sure as I’ve got a switch with a neutral… just same it might be enough).

Okay… so this explanation ended up going long. Sorry ’bout that. Also, I hopefully I didn’t sound like I was talking down to you. Not sure how much you know or don’t know so thought I’d start with the basics.

In other words. if you don’t have a neutral wire, on/off could work with specific switches and regular light bulbs.