Showing posts with label home automation. Show all posts
Showing posts with label home automation. Show all posts

2018-03-25

More MQTT

I have been receiving feedback and requests for more MQTT-Support in OpenNetHome. After some discussions and feedback rounds I have ended up with two new Items:

MqttCommander
This is item has four command-actions and when an action is triggered a corresponding MQTT-Message is sent to a configured topic.

MqttLamp
The MqttLamp behaves like a standard lamp, and controls a lamp/switch via MQTT. You configure the topic of the device you want to control and the messages used to turn the device on or off. The MqttLamp will also listen on that topic for those messages to update the state if it is changed from another source.

These Items makes it possible to include devices controlled via MQTT as Home Items.

As usual, the Items are available in the nightly build

2017-11-09

IKEA Increases security

In the latest firmware update of their gateway, IKEA has increased security by introducing DTLS Identities which means that each client (such as OpenNetHome) has to use its own client identity and has to request its own pre shared security key from the gateway.

Unfortunately this change is not backwards compatible, so as soon as you do a firmware upgrade of your gateway, the old IkeaGateway-Item in OpenNetHome stops working.

I have now implemented the needed changes in the IkeaGateway-Item, and it is available in the nightly build. When you upgrade, the IkeaGateway-Item will automatically request the client security key from the gateway. According to IKEA's recommendations the IkeaGateway-Item no longer stores the original security code once the client code is generated.

The new ClientName attribute does not normally have to be changed from the default value when you create a new IkeaGateway-Item, but if you have multiple Items connecting to the same gateway, each Item must have a different ClientName.

I think it is good that IKEA takes IoT-security seriously and works actively to increase it in their solutions.

2017-07-31

NetHomeServer 3.0

I am happy to announce a new official release of NetHomeServer! Originally the plan was to call the next release 2.1, but now so many new things has been added since the last release, so it made more sense to call it 3.0. All new features are listed in the release notes here, and the major additions are the Raspberry Pi installation, the REST interface and the support for IKEA Trådfri. As usual, the features have already been available in the nightly build for a while.



A new part of the WEB-Site is the Feature Index. This is a way to try to visualize all the features that are available in OpenNetHome, and to guide you to the proper HomeItems to use that feature. Welcome in to browse around the features!


2017-07-19

Prologue Thermometer

Since Clas Ohlson in Sweden has a sale on Prologe wireless thermometers (http://www.clasohlson.com), I added support for their wireless sensors in OpenNetHome. It is in the nightly build and the Item is called PrologueThermometer. It supports auto create, so as soon as a sensor is detected it pops up on the Detected Devices Window ready to use.

Unfortunately, Telldus has not (yet) added support for it in the TellstickDuo firmware, so it can not be used if you are using TellstickDuo as RF receiver.

2017-05-07

Support for IKEA Trådfri


IKEA has made a slightly unexpected entry in the Home Automation space with the new product line Trådfri. Currently it includes a variety of different remote controlled LED-bulbs and some interesting LED-surfaces. They can be controlled via a set of different remote controls or via an app (requires a gateway). All of them are very aggressively priced and best of all, the LED-bulbs are very powerful, with a max of 1000lm which is like a 75W incandescent bulb!

I have now added support for controlling the IKEA lamps with OpenNetHome. It requires the Trådfri Gateway to work (as the app do), but no other hardware.

The IkeaGateway-Item supports auto create, so when the gateway is connected in your local network, it shows up in the create-page as a detected device. When you create the IkeaGateway-Item, you have to enter the security code that is printed on the bottom of the Gateway.

Once the Gateway Item is created, all connected lamps will be auto detected and also show up as detected devices.

There are two lamp types supported, IkeaLamp and IkeaColorTemperatureLamp. The IkeaLamp represents the standard dimmable lamp with fixed color temperature where the brightness can be set between 0 and 100%. The IkeaColorTemperatureLamp represents the lamps with variable color temperature and for them the color temperature can be set between 0 and 100%, where 0 represents the coldest light. They both support the standard features with four configurable preset dim levels,

All Items are available in the Nightly build.

2016-08-17

MQTT

I have received a new great contribution to the project - MQTT-support! MQTT is a standard for sending and receiving small messages, or events via an MQTT server. It is being used more and more for IoT (Internet of Things), to send messages from small devices like sensors or thermometers.
Support for MQTT is something that has been asked for by other users, but I have not had the time to learn about it and build the support. Now this contribution solves the problem!

The contribution consists of four new HomeItems:

MqttClient
This is the item which actually listens to MQTT. Here you can specify the address to your MQTT broker, and the topic on which OpenNetHome subscribes.

MqttHygrometer
A moisture sensor, listening on a specific MQTT topic.

MqttThermometer
A temperaturesensor, listening on a specific MQTT topic.

MqttRemapButton
Listens to a specific topic, and can execute six different actions depending on the message received.

These functions are contributed by Jocke G and Patrik Gustavsson - thanks a lot guys!

The Items are in the nightly build.

2015-11-13

Save color

I have now added the possibility to save a color and dim setting as a preset dim value in the HueLamp-Item. You simply set the color and dim level via the Hue phone app for example, and then press the new "LearnDim1"-button in the Home Item. The current settings will then be stored in the Dim1 position and can later be recalled by selecting "Dim1". The HueLamp-Item has four Dim-positions where you can store color/dim-values.

I have also adapted the HueBridge-Item for the coming security changes in the Hue API. I must take the opportunity to thank the PhilipsHue developer support team for their excellent support! They have sent out mails and described the coming changes, but they have even looked in my source code and given detailed advice on how to adapt for the changes. Look at this support ticket to see what I mean. Really great developer support!

2015-03-19

RollerTrol


I have now added support for the first actuator in OpenNetHome - the RollerTrol automation systems. RollerTrol manufactures motors for automating shades and blinds. Most of their products are very DIY-friendly, and one of their more popular products is a small tubular motor that fits in the IKEA Tupplur Blind.
RollerTrol uses remote controls on the 433MHz band, so they can be controlled with Tellstick, Bitbanger or home made RF-Transmitters from OpenNetHome.

The RollerTrolBlind-Item in OpenNetHome, can send the standard Up, Down and Stop commands, but also the configuration commands: Confirm, Limit and Reverse.
The Item presents the current position of the blind in real time, as percentage of the full travel. You can also define two custom stop positions where you can send the blind.
The Item is available in the nightly build.

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-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.


2014-05-01

Fine Offset


Support for the FineOffset protocol for temperature and humidity sensors is now added to OpenNetHome. As usual, the brand names of the products vary between countries, and in Sweden for example they are sold under the name “Viking”. The usage in NetHomeServer is similar to the Oregon Scientific, so there are two new HomeItems: FineOffsetThermometer and FineOffsetHygrometer. As with the Oregon sensor, auto discovery is supported in OpenNetHome, so if there are sensors in range, they will automatically be presented on the Create/Edit-page. Note that not all FineOffset-sensors actually have a humidity sensor included. Graphing of values is of course supported as for the other sensors. Implementation is available in the nightly build. 

I am also working on support for the FineOffset Rain Gauge, but that is not finished yet.

2014-03-20

NetHomeServer 2.0


I have now finally released NetHomeServer 2.0! Release notes are available here. The final struggle was to get the drivers for Tellstick to work on Windows 8, but with great help from Telldus support we got that working. They signed the VCP-drivers needed for NetHomeServer - thanks!

For those who have been using the nightly builds, there are no other new things in there, instead there are two other things that have changed: The first is that NetHomeServer is now also open source, distributed under GPL V3. It is available on GitHub. Previously I have opened my private repository for those who have wanted to contribute, but now I can just say: Clone us on GitHub!

The second thing is that NetHomeServer now has a new site. Since it is an open source project, I thought a .org-address would be more appropriate, so www.opennethome.org is the new home - please visit and have a look. The old wiki will still be there for a while, I have not moved everything over yet.

2013-04-27

RF-Bitbanger

I have been working a bit with T Andersson, who has written rf-bitbanger. Rf-bitbanger is a device driver for Raspberry Pi that allows writing of pulse sequences to the GPIO-pins. This makes it possible to connect for example a 9€ 433MHz transmitter directly to the RPi and control remote switches without any additional interface components (see picture above).
I have now made a first version of a rf-bitbanger-HomeItem which can transmit all protocols supported by NetHome via a rf-bitbanger port. This means that for only 9€ you can turn RPi into a complete home control system!

2012-08-05

Home Automation on RaspberryPI


Finally, my RaspberryPi arrived, the $25 Linux computer the size of a credit card. So of course I had to get NethomeServer  running on it.

The only real problem was actually to find a good Java virtual machine to use. The only one I have managed to get going with all needed features is OpenJDK, which unfortunately is a bit slow, but now there is a new start-script  for NethomeServer in the nightly build which will start and run NethomeServer on a RasberryPi with the Raspian Linux distribution!

The only feature that does not work so far is the desktop GUI, but the new WEB-GUI works fine, and that is the preferred GUI right now, so this means that all the home automation features may be run on a $25 box consuming less than 5W!

New fixes and features are constatntly being added to RaspberryPi, so faster Java virtual machines (JVM:S) will hopefully come available soon.

2010-10-25

Speed Record

I have now a new personal development speed record. One of the more active NetHomeServer users (Walter) had bought a pair of smoke detectors with wireless connection (one goes off -> both goes off) which uses the standard 433.92MHz band. He sent me a raw dump of how the protocol RF signal looks (as a ProtocolAnalyzer .jir-file). It proved to be a pretty simple 3 byte space length encoded protocol which simply sends an address of the smoke detector.

And on the standard development time window (between supper and the late news) I managed to implement a protocol decoder for the protocol, test it and build new versions of ProtocolAnalyzer and NetHomeServer which supports the protocol - and which actually worked directly when Walter tested them!

Ok, ok, I know I am bragging now, but this was actually part of the goals with NetHomeServer - to have a framework where it is possible and easy to implement in small increments. To be honest, It took another evening to implement the unit test and the HomeItem which uses the protocol.

So now the nightly builds of NetHomeServer supports the new protocol "NexaFire" and there is a new Item called "NexaSmokeDetector" which can invoke commands when it receives a fire alarm via RF.

2010-10-04

Home made hardware

One of the nice things about NetHomeServer is that it is relatively easy to build your own low cost hardware to control radio and IR devices for home automation via the speaker output of the computer. You can also receive messages via the microphone input. NetHomeServer has encoders which can encode and decode a lot of protocols over the audio channel.

To my surprise I get questions from people that have designed such interfaces. I didn't think there were so many hardware designers out there! I have now collected a few such designs that I have made and some that users has sent to me on a new hardware page. So if you are one of those who have built a nice interface to NetHomeServer (or ProtocolAnalyzer), mail me some pictures and I will publish them too on the HW pages.

2010-09-20

New WEB GUI

The weakest spot of NetHomeServer is probably currently the GUI. The current WEB GUI works for configuration, but to be honest – it is kind of geeky (See Link).

So, I am currently working on the next generation of WEB GUI. WEB development is not one of my strong points, so the development goes painfully slow. The new GUI is more oriented towards operating the devices than configuration. There are two main views where the Items are presented, one classic “map”-view where the devices are represented on an image. The controls for each Item “pop up” as a small semi transparent window when the mouse moves over the device. See below:



The other view is a more strict portlet style view, where Items are organized after the room they are located in. See:



I intended the portlet view to be the main GUI and added the map view more for demo or show. The funny thing is that when I have tried them at home for a couple of weeks, I tend to use the map view most, it feels more natural to really point at the location than to remember what I called each lamp. The development is still very much work in progress, but now it works enough for me to try it in real use. One truth remains – GUI development is hard!

2010-08-14

Waveman support

I have now added support for Waveman devices in NetHomeServer. Waveman sell remote controlled switches which use the 433.92MHz RF band. I got a request for the support of that protocol, and he could send samples of how the protocol looked. It proved to be almost identical to Nexa, only the off-signal differs. This in now available in the nightly builds. I have added a WavemanLamp-item and encoder/decoder for the protocol.