How to reset ILO controller from linux (without loosing config)

If you ever need to reset ILO controller from linux CLI ( without loosing the configs ) you can use the following trick:

Create an xml file (reset.xml) on server containing:

<LOGIN USER_LOGIN="admin" PASSWORD="something">
<RIB_INFO MODE="write">

and then issue the following command:

hponcfg -f reset.xml

You will see a message like this :

root@pveg7:~# hponcfg -f reset.xml
HP Lights-Out Online Configuration utility
Version 4.2.0 Date 6/10/2013 (c) Hewlett-Packard Company, 2013
Firmware Revision = 1.87 Device type = iLO 3 Driver name = hpilo
Integrated Lights-Out will reset at the end of the script.

Please wait while the firmware is reset. This might take a minute
Script succeeded


At this point controller should be up again. Hope it helps.

Unifi controller in ubuntu 18.04 fix

To my disappointment Unifi Controller install on Ubuntu 18.04 fails big time. Their packages … Error message is somehow cryptic enough :

[2018-06-22 16:18:14,046]  INFO  db     - waiting for db connection...
[2018-06-22 16:18:14,546]  INFO  db     - Connecting to mongodb://
[2018-06-22 16:18:15,164]  ERROR system - [exec] error, rc=2
[2018-06-22 16:18:15,164]  INFO  db     - DbServer stopped
[2018-06-22 16:18:19,209]  ERROR system - [exec] error, rc=2
[2018-06-22 16:18:19,211]  INFO  db     - DbServer stopped
[2018-06-22 16:18:23,247]  ERROR system - [exec] error, rc=2

However i needed Unifi controller in order to control / setup an UniFi AP-AC-Pro ( we have one testing for one of our clients ). After some searching and tweaking around here how we fixed it:

cd /usr/bin
sudo mv mongod mongod.bin

And replace mongod with:

cleaned_args=$(echo $* | sed -e 's/--nohttpinterface//')
exec /usr/bin/mongod.bin ${cleaned_args}


chmod +x mongod

Restart unifi service and point your browser to: http://localhost:8843/ and enjoy.

TFM IOT – Home automation. Part 1 . Introduction

A project with simple requirements is beautiful . However simple requirements might turn into hard to achieve implementations . This is the case in this home automation project.
Requirement for this project is simple … automate everything
in the house

  • Lights
  • Shades
  • Music and video
  • Heating / ventilation
  • Air quality
  • Security

What exactly we are trying to achieve :

  • Control any device in the house remotely
  • Monitor and graph all sensors
  • Take action if events are happening in t
    he house
  • Have a secure, simple and  beautiful user interface so anyone can use
  • WIFI everything
  • Take action by using scenarios

So in this article series we will try to come up with a complete solution that will fulfill all requirements. And we will take it one device at a time

TFM IOT Home automation Part 2 – How smart a lamp can be ?

A simple lamp. How much intelligence can we add to a simple lamp  ? Well that depends …

What we can control?

  • We can power on and power off the lamp.

What we can measure?

  • Power consumption
  • Check if the light bulb needs to be replaced

On first iteration we will power on and power off.

The results:

To put things one step forward we need to be have all the controls from all the devices across the house in one single place ( a central hub for the house and be able to control it from anywhere )


Setup and run a standalone private docker registry v2


This document will describe the process to setup / run an private docker registry v2. This come handy when you need to have a private image repository. Why you might need this ? Imagine that you need a fast local registry or if you feel uncomfortable pushing you private work to docker hub.

If you search the docker documentation they recommend to use it as a container. That will work in most of the cases. In our case we wanted to have it running on a standalone server, to store the data on a shared storage and several other reasons (speed is one of the reasons).


What we need is epel repo installed and we need to install docker-distribution

root@tfm-swrm01: yum search docker-distribution
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel:
======================= N/S matched: docker-distribution =======================
docker-distribution.x86_64 : Docker toolset to pack, ship, store, and deliver
                           : content
  Name and summary matches only, use "search all" for everything.

at the time of writing this article the version available is 2.4.1:

[root@tfm-swrm01 registry]# yum info docker-distribution
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * epel:
Installed Packages
Name        : docker-distribution
Arch        : x86_64
Version     : 2.4.1
Release     : 2.el7
Size        : 15 M
Repo        : installed
From repo   : extras
Summary     : Docker toolset to pack, ship, store, and deliver content
URL         :
License     : ASL 2.0
Description : Docker toolset to pack, ship, store, and deliver content


Installing it is pretty forward:

yum install -y docker-distribution


To enable docker registry to run at boot

systemctl enable docker-distribution.service

and to start it:

systemctl start docker-distribution.service


Configuration is done via /etc/docker-distribution/registry/config.yml . We decided to start with a minimal configuration file and add additional setting later.  Below is a configuration file that works :

version: 0.1
    service: registry
        layerinfo: inmemory
        rootdirectory: /data/docker-registry
    addr: :5000

Our shared storage is mounted in /data so keeping images in /data/docker-registry makes sense.

Remember that docker registry supports a lot of storage backend drivers (Local file system,Microsoft’s Azure Blob Storage,Google Cloud Storage, Amazon’s Simple Storage Service (S3) , Openstack Swift object storage, Aliyun OSS for object storage) but we will use local filesystem for now.

Docker has comprehensive documentation regarding parameters supported in config.yml, you can find it at Registry Configuration Reference and we recommend to check it in order to understand what are all the options you can configure.

Using it

1) Build a container and tag it to use the custom repository

docker build /tmp/grafana -t

2) Push the image to repository:

docker push