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 )

 

Creating a TFM Vagrant Box from Scratch

tfm logoCreating a Vagrant box from a TFM/GNU Linux image tutorial. It’s an easy 10 step tutorial that will alow you to have a development box based on TFM/GNU Linux

1) Create a new Virtual Machine in VirtualBox

Type: Linux
Version: Linux (64-bit)
Memory Size: 2048MB
New Virtual Disk:
Type: VMDK (Dynamically allocated)
Max Size: 40GB

2) Modify Virtual Machine settings:

* Disable audio
* Disable USB
* Ensure Network Adapter 1 is set to NAT
* Mount the TFM Linux ISO

3) Add the vagrant group and user and set password to vagrant

groupadd vagrant
useradd -m -g vagrant
passwd vagrant

4) Modify /etc/sudoers

Defaults:vagrant !requiretty
#Defaults !visiblepw
Defaults env_keep = “SSH_AUTH_SOCK”
vagrant ALL=NOPASSWD: ALL

5) Add vagrant ssh key to allow logins

mkdir -p /home/vagrant/.ssh
chmod 0700 /home/vagrant/.ssh
wget –no-check-certificate \
https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub \
-O /home/vagrant/.ssh/authorized_keys
chmod 0600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant /home/vagrant/.ssh

6) modify /etc/ssd/sshd_config

Port 22
PubKeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PermitEmptyPasswords no
PasswordAuthentication no

7) Install the Guest Tools for our VM package.
* From Virtualbox Install Guest Additions…
* from linux prompt:

mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
/mnt/cdrom/VBoxLinuxAdditions.run
umount /mnt/cdrom

8) Adjust the base settings of the configuration

echo “dhclient eth0” > /etc/init.d/local
echo “nameserver 8.8.8.8” >/etc/resolv.conf
ln -s /etc/init.d/local /etc/rc.d/rc3.d/S99local
ln -s /etc/init.d/vboxadd /etc/rc.d/rc3.d/S25vboxadd

9) Shutdown the TFM guest OS .

shutdown -h now

10) Pack and distribute the image

vagrant package –base vagrant-tfm

vagrant box add dev-new http://hq.tfm.ro/vagrant/vagrant-tfm.box
vagrant init dev-new
vagrant up

So … Happy developing .

Some thoughts ( depending on what you want that machine for ):
– You will probably want to mount a local directory into VM
– You probably want to start nginx / mysql / php-fpm
– Maybe the you want to add the logs on the local machine …

Work in progress. Getting TFM Workstation up to date . Part 1

For a long time we didn’t got time to get TFM Workstation up to date. The old version served it’s purpose but now some packages are simply too old and new features are now missing. This is a tedious work since we have to maintain certain level of compatibility with Fedora core.

At this point we are working on KDE and we are here:

 

— The following external packages were located on your system.
— This installation will have the extra features provided by these packages.
—————————————————————————–
* Perl – Needed for building kdelibs
* ZLib – Support for gzip compressed files and data streams
* X Rendering Extension (libXrender) – Support for compositing, rendering operations, and alpha-blending
* X Screensaver Extension (libXss) – Support for KIdleTime (fallback mode)
* X Sync Extension (libXext) – Efficient operation of KIdleTime
* OpenSSL – Support for secure network communications (SSL and TLS)
* Libintl – Support for multiple languages
* LibACL – Support for manipulating access control lists
* BZip2 – Support for BZip2 compressed files and data streams
* LZMA/XZ – Support for xz compressed files and data streams
* PCRE – Perl-compatible regular expressions in KJS
* UDev – UDev support for Solid
* Flex – Allows the Solid predicate parser to be updated
* Bison – Allows the Solid predicate parser to be updated
* LibXSLT – Required by the KDE help system to process DocBook XML
* LibXML2 – Required by the KDE help system to process DocBook XML
* xmllint – Required by the KDE help system to process DocBook XML
* DocBook XML – Required by the KDE help system to process DocBook XML
* DocBook XSL – Required by the KDE help system to process DocBook XML
* GSSAPI – Allows KIO to make use of certain HTTP authentication services
* shared-mime-info – Allows KDE applications to determine file types
* libjpeg – JPEG image format support
* libpng – PNG image format support
* JasPer – Support for JPEG-2000 images
* OpenEXR – Support for OpenEXR images

—————————————————————————–
— The following OPTIONAL packages could NOT be located on your system.
— Consider installing them to enable more features from this software.
—————————————————————————–
* Soprano (2.7.56 or higher)  <http://soprano.sourceforge.net>
Support for the Nepomuk semantic desktop system
* Soprano Raptor Parser  <http://soprano.sourceforge.net>
Support for the Nepomuk semantic desktop system
* Soprano Redland Backend  <http://soprano.sourceforge.net>
Support for the Nepomuk semantic desktop system
* Shared desktop ontologies (0.10 or higher)  <http://oscaf.sourceforge.net>
Support for the Nepomuk semantic desktop system
* QCA2 (2.0.0 or higher)  <http://delta.affinix.com/qca>
Support for remote plasma widgets
* PolkitQt-1  <http://techbase.kde.org/Polkit-Qt-1>
Support for executing priviledged actions in a controlled way (KAuth)
STRONGLY RECOMMENDED: Required to make KAuth work, and hence enable certain workspace functionalities
* FAM  <http://oss.sgi.com/projects/fam>
File alteration notification support via a separate service
Provides file alteration notification facilities using a separate service.
* Grantlee (0.1.0 or higher)  <http://www.grantlee.org>
ModelEventLogger code generation (part of the ProxyModel test suite)
Grantlee is used for generating compilable code by the ModelEventLogger. Without Grantlee, the logger will do nothing.
* HUPnP  <http://www.herqq.org>
UPnP support for Solid
Allows Solid to provide information about UPnP devices on the network
* media-player-info  <http://www.freedesktop.org/wiki/Software/media-player-info>
Enables identification and querying of portable media players
Runtime-only dependency of the udev solid backend. Support for m-p-i is included even if not found during build
* Aspell  <http://aspell.net/>
Spell checking support via Aspell
This is not needed for spell checking if Enchant is provided or only Hebrew spell checking is required
* HSpell  <http://ivrix.org.il/projects/spell-checker/>
Spell checking support for Hebrew
Hebrew support can also be provided via Enchant, providing the correct Enchant backends are installed
* Enchant  <http://www.abisource.com/projects/enchant/>
Spell checking support via Enchant
* Avahi  <http://avahi.org>
Facilities for service discovery on a local network (DNSSD)
Either Avahi or DNSSD is required for KDE applications to make use of multicast DNS/DNS-SD service discovery
* DNSSD  <http://avahi.org>
Facilities for service discovery on a local network
Either Avahi or DNSSD is required for KDE applications to make use of multicast DNS/DNS-SD service discovery

—————————————————————————–
— The following REQUIRED packages could NOT be located on your system.
— You must install these packages before continuing.
—————————————————————————–
* Strigi (0.6.3 or higher)  <http://strigi.sourceforge.net>
Desktop indexing and search support
Required by some critical kioslaves
* libattica (0.1.90 or higher)  <git://anongit.kde.org/attica>
Support for Get Hot New Stuff
* DBusMenuQt  <https://launchpad.net/libdbusmenu-qt>
Support for notification area menus via the DBusMenu protocol
* giflib  <http://sourceforge.net/projects/giflib>
GIF image format support
Required by khtml.

—————————————————————————–