My first steps at Home automation and PCB design: OTGW – LED Panel design with Eagle software

Due to my line of work (IT) I got interested in home automation. Everything that can be automated, means less things to do by hand 😉 So while looking around at the internet I came across the ESP-12E and Arduino. Bought some Arduino nano’s and ESP-12E modules. As network engineer I was more interested in the ESP-12E because it’s a small wifi enabled module. Handy for small sensors. After playing around with those I also came across the OTGW –

How awesome is that! Controlling your home heating system! You could buy something like Toon (in the Netherlands) but it has some strange drawbacks and building your own system is much more fun.

Since I got my own solder iron for my birthday I ordered only the PCB and the components to build it yourself. And as I wanted to do it all by myself, I thought, just by the PIC’s and also program them myself. On Aliexpress I found the PICs and the programmer. Both received really quickly

So I first soldered the gateway together:
















After struggling with programming the PIC, I finally managed to have it programmed. [link to post will follow]

Added all together and had a working gateway. This gateway has also connections for status LED’s. However, I didn’t find anything about getting the LED’s connected and build in the housing. So there started the first idea of designing my own PCB. I’m someone who takes the difficult road just for the fun of it. And now I had a real goal for designing a real PCB. I downloaded the Eagle PCB design software and just started “drawing”.

After couple of hours (read: days ;o) ) I finally got it and managed to create my PCB. Yeah!















Now I needed to have my design manufactured and found DirtyPCB’s – – which is quite cheap as far as I know. Their standard sizes are 5×5 and 10×10; 5×5 happened to be the perfect size for my project! win-win!
If you like the PCB and want to order it, and you value the time I’ve put in it, please use this link to order it:
When you do, thank you! It will help me create more great stuff. Also, Post a comment when you’ve PCB’s left so other can contact you to buy your leftovers. 😉

So I send them my files, actually I send it 4 times because I didn’t know all the needed file formats yet but I got there. They even provide a graphic preview of the design you upload so that’s really handy! At least for a n00b like me.




After waiting some time I got my own, first self designed PCB! That was really cool.
As soon as I received the PCB’s I soldered the components and installed it in the housing. As I already thought, all fitted like it should be! As a drilling template I printed the PCB export and glued it onto a piece of cardboard. You can download the template PDF at the end of the post.

Template1 Template2


Case1 Case2 Case3 Case4 Case5









So I’m quite happy about my first ‘steps’ in PCB design. As resistor values I’ve used the following:

Yellow/R1: 2k Ohm
Green/R2: 2k Ohm
Blue/R3: 20k Ohm
Red/R4: 10k Ohm

Side note: As I had to order 10 pcs of the PCB, and only needed one for myself, I’ve 9 left, so if you’re interested in buying one, let me know! Costs are 2 EUR plus shipping. In the Netherlands it would cost a stamp or two, but let me know where you live and I’ll let you know the costs with regular mail.

That was all for this post. I hope it (will) help you on your own quest 😉

Links and downloads
– Template PDF for drilling: gateway-LED-DrillingTemplate
– PCB Ordering:

Posted in How To | Tagged , , , , , , | 5 Comments

Juniper SRX – error: Could not format alternate root | Solution

srx-01This week I encountered this error for the first time in the years I’m working with JunOS now. Last week I installed two SRX’s at a remote datacenter location in NJ, US. All working fine and once back in my home country I added some monitoring checks to the devices and thought, well lets sync the JunOS alternate partition with the primary. This went just fine:

onno@net> show system snapshot media internal
Information for snapshot on       internal (/dev/da0s1a) (backup)
Creation date: Aug 29 13:54:23 2015
JUNOS version on snapshot:
junos  : 12.1X44-D35.5-domestic
Information for snapshot on       internal (/dev/da0s2a) (primary)
Creation date: Apr 7 13:29:14 2016
JUNOS version on snapshot:
junos  : 12.1X46-D40.2-domestic

onno@net> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
Copying ‘/dev/da0s2a’ to ‘/dev/da0s1a’ .. (this may take a few minutes)
The following filesystems were archived: /

Then I wanted to double check it both partitions contained the same version, and then I got the error:

onno@net> show system snapshot media internal
error: cannot mount /dev/da0s1a

Eehhh .. wait .. what? That’s not something you want to see on a SRX more than 6000km away. (this is a location with, for now, single internet connection)
So I retried the request snapshot command, without success:

onno@net> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
error: Could not format alternate root

After digging around I found similar issues on EX’s which were cause by the backup partition still mounted. However I didn’t find the /dev/da0s1a mounted, but did find the following:

onno@net> start shell
% mount
/dev/altroot on /altroot (ufs, local, noatime, soft-updates)


Looking at the other SRX, there was no /dev/altroot mounted. So I just unmounted it, and ran the same commands again. Now there’s no error and all fine:

onno@net> start shell
% su –
root@net% umount /altroot
root@net% exit
% exit
onno@net> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
Copying ‘/dev/da0s2a’ to ‘/dev/da0s1a’ .. (this may take a few minutes)
The following filesystems were archived: /

onno@net> show system snapshot media internal
Information for snapshot on       internal (/dev/da0s1a) (backup)
Creation date: Apr 15 07:30:11 2016
JUNOS version on snapshot:
junos  : 12.1X46-D40.2-domestic
Information for snapshot on       internal (/dev/da0s2a) (primary)
Creation date: Apr 7 13:29:14 2016
JUNOS version on snapshot:
junos  : 12.1X46-D40.2-domestic

Posted in Juniper | Tagged , , , , , , | 4 Comments

vMotion Fails At 14% – with at least one solution

Every found your self with an issue and spending hours trying to find a solution while none of the Google (or bing) search(find)engine results fixed you’re problem? Well I did just this today. Trying to update our VMWare clusters I noticed some VM’s not willing to vMotion to another node and that the task stalled at 14%. With off course the all clarifying error: “Operation timed out” and from Tasks & Events “Cannot migrate <VM> from host X, datastore X to host Y, datastore X”

My solution:
It turns out that, in my case, there was a vmx-***.vswp file left over from a failed DRS migration. During a DRS migration, because the VMX is started at both nodes, each VMX process create a process swap file, with or -1 of -2 in the name. At a successful DRS migration one of the two will be removed.

So when you browse the datastore you’re failing VM is located on, and you open up the folder of the VM, you should see those two vmx-***.vswp files, as presented in the image below. If you only see one file, sorry, than this solution is not the one you’re looking for.
NOTE: There could be also a vswp file for the VM itself! Leave that one alone!

The oldest one is most likely the one you need to delete. You can do this while the VM is running and most of the time just from the DS browser. If you try to delete the wrong one, or when it’s not possible to delete it from the DS browser, you’ll the following error:

If you’re unsure which one to delete, than the only way is to power down the VM and than the file that remains is the one you need to delete.

If you’re unable to delete the file from the file browser, than you need to start SSH daemon on the host on which the VM is registered and then login through SSH. Navigate to the right datastore and folder and delete it from there:
# cd /vmfs/volumes/<datastore_name>
# cd <VM folder>
# ls -lash *.vswp (just to verify the timestamps and locate the right file)
# rm vmx-<VM name>-[1-2].vswp

That’s it, now you should be able to migrate the VM again while it’s running.

Posted in Software, VMWare | Tagged , , , , | 6 Comments

Reset vSphere / ESX root password with host profiles

Ever found yourself breaking your head on a root password for your ESX(i) host, while it’s still manageable through vCenter? Well, I did!

After searching the internet, I found that there are numerous methods of resetting the root password. Even by using a LiveCD! While most are just working fine, the mostly require you to turn off your host. Something I didn’t want to do. Also, vCenter was still able to manage the host in question, so why can’t we just use vCenter?

vCenter has the ability of configuring VMWare hosts with host profiles, and in these profiles we can configure the ‘administrator’, aka root, account. So why not use it? This post will show you how to use it.

Are you unable to use vCenter or host profiles? Maybe these links are useful for you:

Let’s start with opening the host profiles option in your vSphere client.

Then we choose to create a new profile, name is something like ‘resetPassword’ and select any baseline host.

Now we wait until the creation is completed.

On the left pane select your new host profile and right-click and select edit profile. Then go to security configuration -> administrator password.

Now on the right pane, select ‘configure a fixed administrator password’ from the drop down box and fill-in the new password.

Click OK and right-click your host profile again. Select ‘enable/disable profile configuration’. By default all options are selected. Make sure that everything except “Security configuration” is deselected. This makes sure that only the security configuration is checked and updated, and ignores all other configuration options in the profile. So there’s less to go wrong. ;o)

Now click OK and we’ll start attaching the host of which we want to reset the password. Click ‘Attach Host/Cluster’ and select the right host, click Attach and then OK.

Select the host and first click ‘check compliance’ so we can double check that there are no other issues and we did not forget to disable a portion of the profile. The compliance should be OK.

When there is something wrong, like you forgot to disable portions of the profile, you see something like this, together with the part which is causing the error.

Fix the issue and repeat the compliance check until it’s OK.
Now we’re going to apply the host profile, and make sure again that only the administrator password will be changed.

NOTE: The host needs to be in maintenance mode before you can apply a host profile. If the host isn’t yet in maintenance mode, you’ll receive this error:


Click finish and wait for the job to complete.

Voila, the root account of the host has been reconfigured and you should be able to log in again. Now the only thing left is to detach the host from the profile:

Posted in How To, Software, VMWare | Tagged , , , , , , , | 2 Comments

Setup SRX1400 in cluster over layer2 switching network

This post is about my experience of setting up two SRX1400 nodes in a cluster, geographically separated by a layer2 switching network.

The lab setup had to be redundant and spread over two locations. So I updated both SRX’en to JunOS 11.2R4.3, this version supports clustering and redundant fabric and control links.

This post consists of the following topics:
1. Connecting the SRX’s to the switches
2. Configuring the switchports for the fabric, control links and the 2 Gbps traffic links
3. Configuring the cluster
4. Troubleshooting several issues with SRX1400 clustering

I’ll be using not just plain traffic and basic configuration, but I’ll be also using vlan tagging to reduce cabling in the future and will be configuring a routing instance just to be prepared for the future.

Also I’m paying attention to some issues I encountered during my tests. Things you don’t find in the Juniper documentation. ;o) I’m talking about different VLAN’s for control links, and a issue with the current JunOS releases and using T-SFP modules for your control links causing your control links to fail during setup.

So the complete setup will be like below.

Posted in How To, Juniper | Tagged , , , , , , , , , , | Leave a comment

Upcoming: Setup Juniper SA with Tecti MobileID

Coming soon, my blog about setting up a Juniper SA with Tecti MobileID for Authentication and OTP/SMS. I’ll try to complete the page this month. 😀

Ok sorry, please hang on a little longer..

Posted in Hardware, Juniper, Tecti MobileID | Leave a comment