2014-11-09

Nethome Sending Messages

Nethome now have the ability to send messages! I have been wanting to add this for quite some time, but now it is done. I have been looking at a number of ways of communication, but I finally chose XMPP (Jabber). First I looked at ordinary mail, but messages from Nethome would typically be more of real time messages. Then I looked at SMS, but the problem is that you need to have payed accounts to have reliable service for that. XMPP is an instant messaging protocol, and there are a number of free XMPP (Jabber) servers available where you can get an account. There are also a number of clients for IPhone and Android. Messages pop up in your phone just like SMS (provided that you have internet connection).

There are two new Items added for this: XmppClient, which has the configuration for the connection to the server and Message which holds a message and has the send-action.

The message text may refer to attribute values of other Home Items, so the text in the picture above is really: "Freezer is too warm, currently at ${Freezer.Temperature} degrees"

I am using the excellent Babbler-library by Christian Schudt for the xmpp-communication.

So all you need to do is to create one account for your Nethome-server and one account for yourself at one of the jabber servers and then your nethome server can start sending messages to you.


2014-09-27

Give your home a REST

OpenNetHome have always had a TCP/IP interface for integration in the TCPCommandPort-Item. But it is time to add a more modern interface to my home. I have now implemented a REST-interface with json encoding to OpenNetHome which exposes HomeItems as REST-resources. Since basically everything in OpenNetHome is HomeItems (lamps, thermometers, timers, web-server and so on) this means that most of the features in the server can be reached via this interface. The URL to turn off the lamp in my bedroom window is for example:

POST http://ssgserver2:8020/rest/items/108/actions/off/invoke

and to get the temperature on the balcony i do a get on the URL:

GET http://ssgserver2:8020/rest/items/52

The "108" and "52" are the identities of the corresponding HomeItems, and you can get the identities by listing all HomeItems in the server with:

GET http://ssgserver2:8020/rest/items

This kind of interface works well with modern WEB-frameworks like ember.js and AngularJS but also for integration with phone apps and other home control systems.

The full documentation of the interface is available here on the OpenNethome-site. The implementation is as usual available in the nightly build. Note that details of the interface my still change and feedback on the interface is welcome!

2014-09-13

Raspberry Pi Installation

Since the majority of the OpenNetHome users are using raspberry pi as platform, I have made it easier to install and upgrade on that platform.
I have now added a plug&play installation script for Raspberry Pi which installs the files in the appropriate locations in the file system, configures serial drivers and installs the OpenNetHome server as a daemon that runs in the background with its own user account. All you have to do is to run this script and then you can plug in a TellstickDuo and start controlling your home!

A complete installation instruction including download of the release is:

wget http://wiki.nethome.nu/lib/exe/fetch.php/nethomeservernightly.zip
unzip nethomeservernightly.zip
cd nethomeservernightly/install/raspbian/
chmod +x *.sh
sudo ./install.sh

Included is also an automated upgrade script, which will download the current nightly build and upgrade the installation to that. This script should be copied to your home directory and run whenever you want to upgrade your installation:

sudo ./upgrade_nethome_nightly.sh

The daemon installation is built on the earlier nhs installation contributed by Peter Lagerhem, but is modified quite a bit, so if you are using that you have to uninstall it according to the instructions in the readme-file before you can do this installation.

The installation scripts are available in the nightly build

2014-08-19

Lamp Repeater

Since the common remote switches on the 433MHz band only have one way communication, we never know if the command was really received. There are a lot of different products using this frequency band so it is not uncommon that the command is not received by the switch due to interference. This can be very annoying if the lamp was controlled by a timer in NetHome, since the lamp is not turned on/off as expected.

I have added a new Item to overcome this weakness in these protocols - a LampRepeater-Item.


You configure which lamps you want it to guard, and when one of those lamps is turned on or off the Item will repeat the command three times with 15 seconds interval. This increases the likelihood that the lamp really behaves as expected when it is controlled by a timer in a noisy radio environment. The Item is available in the nightly build.

2014-06-15

Units

I have now finally added the possibility to specify units of attributes in HomeItems. This has been a request from users for some time. The units are shown on the Plan-page, the Room-page and in Item details as below:
This makes the values easier to read and understand. The feature is available in the nightly build.

Linux Serial Port

I got reports from several users that communication via the serial port to Tellstick stopped working when they upgraded their Linux installations. They saw the errors:

[  146.590245] ftdi_sio: unknown parameter 'vendor' ignored                                      
[  146.590254] ftdi_sio: unknown parameter 'product' ignored

The problem proved to be that in kernel 3.12 the old interface to add custom VID/PID to the ftdi_sio drivers was removed (see commit link).
I have now made new installation scripts using the new official interface, and the installation page on the opennethome site is updated. The new scripts are also in the nightly build.

2014-06-07

Power Meter

OpenNetHome now finally has support for a Power Meter that can measure electricity consumption. The new FooGadgetPulse-Item  supports the FooGadget Wireless Pulse Counter from FooGadgets, which can be connected to the standard blinking power meters often used in apartments and houses.

The Item presents the current consumption in kW (average over 1 minute), how much energy has been used so far today in kWh, how much energy has been used so far current week in kWh and the total consumption so far. It also shows the total consumption for yesterday and last week.

It uses the latest version of the FooGadget protocol where it can lose hundreds of the transmissions from the sensor and still get the total consumption right. This is useful when you upgrade the server for example, even if the OpenNetHome is down for a while, the measurements of the energy consumption will still be correct for that period. The old protocol is also supported by the Item FooGadgetLegacy.

The FooGadgetPulse-Item can show a graph of the consumption over time. The graph shows the consumption in kW sampled and averaged over 15 minute periods:


I have also added a new Item called ValueLogger, which can log any attribute value of an Item and present the value as a graph.This is very useful in combination with FooGadgetPulse. You can for example put a log on the EnergyToday-attribute. This will present a graph over the total consumption for each day, and also show how the consumption was distributed over the day:


Both FooGadgetPulse and ValueLogger are available in the nightly build.