Tuesday, 19 November 2013

Razberry: config cleanup and add temperature sensor

The very simple config last time had silly icons and didn't really do the right things, so the first thing is to clean up the config a bit. After that I'm aiming to get a temperature sensor on a fibaro universal sensor working


(Previously: )

First find (or even draw) some icons to use for the zones to appear in your sitemap. There are lots of icons already in the homehab/webapps/images folder as well to choose from or a quick rumage on the web might find some.

New icons should just be saved into the webapps/images folder as .png files, I name mine room_kitchen and room_living so I can easily add more and find them later.

Also the simple summary line needs fixing to display properly, so here now is my sitemap file:
sitemap demo label="Pootle's place"
{
    Frame label="rooms" {
        Group item=gKitchen label="kitchen" icon="room_kitchen"
        Group item=gLiving label="living room" icon="room_living"
    }
    Frame label="status" {
        Group item=allLights icon="light-on"
    }
   
}
This cleans up the display nicely and looks OK on web browser and habdroid

adding a new device with temperature sensor

I have a Fibaro universal sensor and a bunch of sensors. To initially test this I have just hooked up 1 sensor.

To get it working I have used z-way to get the device set up and then used the info to update the openhab config files.

  1. start an ssh(terminal) session to raspberry pi :
    ssh -l <loginname> <ip address here>
  2. shut down openhab (assumes running a service as in the previous post)
    sudo service openhab stop
  3. this takes a minute or so to complete, then start up z-way...
    sudo service Z-Way start

Pick up and configure the device in z-way

This is covered in detail in the z-way documentation here, here is a quick guide
  1. now on some other machine, run up a web browser to z-way URL should be something like...
    http://192.168.0.139:8083/
  2. then put into config update mode
    (Network - Network management - (Re-)include device
    and on the device click the button or whatever is needed to make it configure itself and join the network (in the case of the Fibaro universal sensor this the 3 clicks)
  3. Now go to the Devices configuration tab and the new device should be in the list.
  4. select the device type and apply the configuration
  5. now check on the device and its parts - go to the Device control - sensors page and the device should show up, my Fibaro showed up as 3 things:
    Device 5 (#1) - input switch A
    Device 5 (#2) - input switch B
    Device 5 (#3) - temperature sensor 1 showing current temperature (so it is working....)

now return to openhab and update the configuration

  1. in the ssh session:
    sudo service Z-Way stop
    sudo service openhab start
  2. update the config files...
here's my updated items file:
Group             gKitchen        "kitchen"    <room_kitchen>
Group             gLiving            "living room"    <room_living>
Group:Number:SUM     allLights        "[%d]Lights"    <switch>

Switch living_light_main    "ceiling"    (gLiving,allLights)   {zwave="2"}
Switch living_light_down   "downlights"  (gLiving,allLights) {zwave="3"}
Number living_temp1 "Temperature [%.1f °C]" (gLiving)    {zwave="5:3"}
 There's no need to change the sitemap yet...

But the temperature isn't shown, cos openhab 1.3 has only the beginnings of z-wave support. As of now however there is enough in 1.4 snapshot to support this config.

No comments:

Post a Comment