Re: ImperiHAB, new ImperiHome action and binding

3,035 views
Skip to first unread message

Ben Jones

unread,
Feb 8, 2015, 2:22:55 PM2/8/15
to ope...@googlegroups.com
This is AWESOME reven - been waiting for this type of UI to be available for openHAB! Can't wait to give this a go.

Davor Fikais

unread,
Feb 9, 2015, 2:01:36 AM2/9/15
to ope...@googlegroups.com
Hello!

This looks great. Is there any place where we can download binding and alarm servlet from, and some place with instructions for using alarm servlet?

Best regards,
Davor

reven

unread,
Feb 9, 2015, 2:04:08 AM2/9/15
to ope...@googlegroups.com
What's the best way to upload a in progress servlet?  Attaching here could work, but not sure of the protocol for such things (or if there even is one).

Davor Fikais

unread,
Feb 9, 2015, 2:15:17 AM2/9/15
to ope...@googlegroups.com
Hello!

I know some of the developers use their github with clone of the main branch, but you could send a pull request on the main branch too. In the meantime I don't think anyone will have anything against some kind of link on dropbox or something similar.

Best regards,
Davor

Ben Jones

unread,
Feb 9, 2015, 2:18:39 AM2/9/15
to ope...@googlegroups.com
It is fine to post compiled jars in these groups for testing etc. 

reven

unread,
Feb 9, 2015, 2:44:44 AM2/9/15
to
Attached is the first alpha.  Instructions are in the zip file, as well as sample configuration.

Hopefully it makes sense, let me know if you get stuck.

Davor Fikais

unread,
Feb 9, 2015, 11:20:11 AM2/9/15
to ope...@googlegroups.com
Hello Reven!

I was just wondering if configuration lines from imperihab_openhab.cfg should go to standard openhab.cfg, or I should leave them in this file? Also, could you tell me where can I find jpeg files for slideshow? Are there any default ones (like on the screenshots), or I should make them myself?

Best regards,
Davor

Davor Fikais

unread,
Feb 9, 2015, 12:11:13 PM2/9/15
to ope...@googlegroups.com
Hello again!

I've tried configuring ImperiHAB, but upon entering configuration parameters in ImperiHome android app it says: "Unable to connect. Please check your parameters.". In openhab.cfg file, under imperihab:default, do I enter IP address of server running OpenHAB? Do I enter the same IP address in ImperiHome android app? I'm not sure, but it looks like I've been missing some important part. Maybe I've misunderstood you - do you need some hardware to be able to run this (besides server with OpenHAB and some items inside of it)?

Best regards, 
Davor

reven

unread,
Feb 9, 2015, 12:56:07 PM2/9/15
to
The configuration goes into the main openhab.cfg file, I didn't call it that in case someone just copied the file across replacing their existing configuration.

The slideshow are meant to be your own images, e.g. I use family photos to show on my tablet when not in use.

The IP Address is for the ImperiHome server, this is only needed for the actions.  So when you want imperihome to say some text, the action needs to know the address of the device to send the request to.  You also need to turn on the http server in imperihome for this to work, via Settings > General Preferences > Enable API HTTP Server.

There is also a action method for imperiHabGotoPage(int PageIndex).  Which allows you to make imperihome change dashboard screens (page index is zero based).

So one might have a rule

Rule "outdoor motion"
when
    Item Outdoor_Motion changed from CLOSED to OPEN
then
    imperiHabGotoPage(3) // where 3 is the page one may have configured for an outdoor camera in imperihome
end


For "Unable to connect. Please check your parameters." can you provide the settings you used.  If your openhab server is located at 192.168.1.10 on port 8080 for example, you should put in http://192.168.1.10:8080/imperihab/ as the address.  You can also try manually browsing to see if its working by pointing your browser to http://192.168.1.10:8080/imperihab/rooms or http://192.168.1.10:8080/imperihab/devices

Davor Fikais

unread,
Feb 9, 2015, 1:30:22 PM2/9/15
to
Hello Reven!

This is my openhab.cfg portion for imperihab configuration:

###################################   ImperiHab  ######################################
#
# The address of the ImperiHome device
imperihab:default=192.168.12.100:8080 

# The pin code for the alarm, default is 0000
imperihab:pincode=0000

# The slide show directory which contains jpg's for the alarm panel
imperihab:slideshowdir=C:\OpenHAB\webapps\imperihab\slideshow

# The arming countdown, before the alarm is turned on (only for "Away" mode)
imperihab:armingCountdown=60

# The intrusion countdown, the number of seconds after motion is detected before the alarm "goes off"
imperihab:intrusionCountdown=60

# Items need for the alarm 
imperihab:alarmAwaySwitch=General_Alarm_Away
imperihab:alarmHomeSwitch=General_Alarm_Home
imperihab:alarmCountdownNumber=General_Alarm_Countdown

# a number item to record the state of the alarm, 0=disarmed,1=armed away, 2=armed home, 3=arming away, 4=intrusion confirmed, 5=intrusion detected
imperihab:alarmStateNumber=General_Alarm_State

# these are the names of the groups to "watch" for on/open events
imperihab:alarmAwayGroup=General_Alarm_Away_Items
imperihab:alarmHomeGroup=General_Alarm_Home_Items

The item I was going to use for test is: 

Dimmer Bedroom_Dimmer_MainLight "Bedroom - Dimmer - Main Light" <slider> (Bedroom_Dimmer,Dimmers) { zwave="3:command=switch_multilevel",imperihab="room:Bedroom" } 

After opening ImperiHome I went to Settings -> My systems -> Add a new system -> ImperiHome Standard System and in the Local API base Url I've entered http://192.168.12.3:8080/imperihab (tried with and without / at the end). I have both, binding and action jar in my OpenHAB addon folder. Upon starting OpenHAB, I can only see one message regarding imperihab (2015-02-09 19:10:43.650 [INFO ] [.service.AbstractActiveService] - imperiHab Ref
resh Service has been started). At the moment, I'm not trying to use actions (say and GoToPage), but I've entered IP address of my smartphone with ImperiHome in the cfg file too. If I try to access http://192.168.12.3:8080/imperihab/devices or http://192.168.12.3:8080/imperihab/devices/rooms it just gives me error message:

Problem accessing /imperihab/devices/. Reason:
    Not Found

and

Problem accessing /imperihab/rooms/. Reason:
    Not Found

Do you have any idea what else could go wrong? I forgot to mention that (at the moment) I'm trying to use it with free version on ImperiHome (until I see if it has what I'm expecting of it)/

Best regards,
Davor

reven

unread,
Feb 9, 2015, 1:35:22 PM2/9/15
to ope...@googlegroups.com
I know the issue, I had this happen to me once :)

If you create a folder in the webapps directory the servlet won't be accessible on that address, it will try and show whats in the physical path.

So move the folder C:\OpenHAB\webapps\imperihab\slideshow to say C:\OpenHAB\imperihab\slideshow and update the config.

That should fix it.

Davor Fikais

unread,
Feb 9, 2015, 1:52:55 PM2/9/15
to ope...@googlegroups.com
Hello again! 

I've moved folder to OpenHAB root, and after that, I was able to add new system in ImperiHome. Thank you a lot for your help. You've done great job with those addons.

Best regards,
Davor

reven

unread,
Feb 9, 2015, 1:55:41 PM2/9/15
to ope...@googlegroups.com
no problem glad you got it working.

Davor Fikais

unread,
Feb 10, 2015, 6:32:49 AM2/10/15
to
Hello Reven!

I would like to ask few more questions regarding imperiHAB binding and alarm control. I've bought ImperiHome pro, so I have all layouts available. After adding web page widget, and entering alarm URL (Openhab IP/imperihab/alarm), it shows small rectangle with question mark, which I have to touch first, so it would show me Arm Away and Arm Home buttons (if I press back button, reload or change page while I'm on the Arm Home/Away buttons page, I get the same question mark button). Is there some setting I'm missing, or that's expected behavior? Second question is more of a cosmetic nature - particularly, the alarm widget is only fully visible in full page widget using portrait mode - even on 7" tablet. Is there any way to scale those widgets, or they have fixed height/width?

Best regards,
Davor

On Sunday, February 8, 2015 at 7:36:23 PM UTC+1, reven wrote:
Hi Guys,

I'm working on an ImperiHome action and binding.  They're pretty much working now (I just need to get persistent data working to provide imperihome the ability to chart data).

Was wondering what's the best way to provide these to the community?  Create a clone of openHAB git repo?

The Action only provides one method currently "imperiHabSay("text to say")", this will send a text to speech command to your configured ImperiHome device (will add support for multiple ImperiHome devices shortly).  I use this for an alarm countdown, whenever I have new voicemails, someone is approaching the front door, caller id etc.

The binding provides the API for ImperiHome to load the devices from openHAB and to control it.  To use the binding you just need to add {imperihab="room:[#room],type:[#type],watts:[#wattsitem]"}
Where
#room = the room you want the item to appear under in ImperiHome
#type = Optional, only needed if the type of the device cannot be guessed from the item.  It first tries to find the type based on the values it support OpenClose, OnOff, Percentage etc and there's some best guesses for the item names e.g. if item name contains "Humidity" it thinks its a humidity sensor).  If none of these work, or if you want to override the type it guesses, you can specify it.  Using the device types for imperihome, eg. DevTemperature 
#wattsitem = Optional, this lets you specify another item to be the "energy" value for an item, e.g. for a z-wave power outlet Switch Item, you can link this to the Number item that has the power reading.  Then in imperihome it will show the power usage for that switch.

I've also created a webpage widget for ImperiHome for an alarm keypad/slidehow.  This requires a few switches/number items to be created in openHAB to work, but basically in imperiHome you can add a "website" and point it to the imperihab servlet http://[openhabserver]/imperihab/alarm.  
That webpage will display a slide show of images (images from a directory you specify in the openhab.cfg for imperihab), when you touch/click that:
  • If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttons
    • If you click "Alarm Home", the Alarm_Home switch in imperihab will be turned on
    • If you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be set
  • If, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
The alarm will watch 2 groups (names configured, defaults are AlarmAway and AlarmHome), any items in these groups that recieved a Open/ON update will trigger the alarm mode "Intrusion Detected", then a countdown will start giving you time to disarm the alarm.

This alarm thing is completely optional, and just a added bonus of the ImperiHAB binding.  I had this alarm setup in php and was using it on vera.    


Note: bug in first alpha where the slideshow images must end with lowercase .jpg (fixed in next build) and reported issue with spaces in linux paths to that directory.

reven

unread,
Feb 10, 2015, 12:50:41 PM2/10/15
to ope...@googlegroups.com
1.  It sounds like your slideshow directory hasn't been configured, current build requires you to point to a directory (without spaces on linux) to a directory containing *.jpg files (current build needs the extension to be .jpg in lowercase)
2.  Can you post a screenshot of the layout you are using?  I've only tested at the screenshot I posted and on a 5" smartphone with the 1x1 dashboard.

Davor Fikais

unread,
Feb 10, 2015, 1:14:23 PM2/10/15
to ope...@googlegroups.com
Hello Reven,

First problem is solved by changing extension to lowercase. Now it shows that image, instead of small rectangular with question mark. I have Samsung Galaxy S4 with 1920 x 1080 resolution, and Prestigio MultiPad 7" with 1024 x 600 resolution. On both devices, the only way to display whole numeric pad (or all 3 buttons on the first page - home, away and back) without having to scroll up/down is to use fullscreen widget in ImperiHome. I'm not sure how this alarm widget is made, but is there any way to have setting in openhab.cfg that you could use to scale down (or up, if someone needs it that way) everything on this webpage (alarm widget)?

Best regards, 
Davor

reven

unread,
Feb 10, 2015, 1:20:45 PM2/10/15
to ope...@googlegroups.com
The alarm is just HTML, so I would need to scale it in CSS.  

Can you change the URL (or make a same size widget) and point it to http://whatsmy.browsersize.com/ then tell me the values for Browser window width and Browser window height.

Davor Fikais

unread,
Feb 10, 2015, 1:39:32 PM2/10/15
to ope...@googlegroups.com
Hello Reven,

I've tried measuring using landscape 2 side by side widgets (280 X 235), and portrait 2 side by side widgets (320 X 234).

Best regards,
Davor

reven

unread,
Feb 10, 2015, 1:44:28 PM2/10/15
to ope...@googlegroups.com
Can you take some screenshots of your dashboard and post those, those resolutions are incredible small.

Davor Fikais

unread,
Feb 10, 2015, 3:01:04 PM2/10/15
to ope...@googlegroups.com
Hello Reven,

here are screenshots of 2 side-by-side widgets from Galaxy S4.

Best regards,
Davor
> If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttonsIf you click "Alarm Home", the Alarm_Home switch in imperihab will be turned onIf you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be setIf, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
Screenshot_2015-02-10-20-57-02.png
Screenshot_2015-02-10-20-57-43.png

reven

unread,
Feb 10, 2015, 3:22:17 PM2/10/15
to ope...@googlegroups.com
Yeah there's the issue, it was never designed to be on a small widget like that, for a phone I made it work as the full screen dashboard.   I can try and see what I can do with CSS, but the images for Arm Away/Home might be scaled poorly.  

Davor Fikais

unread,
Feb 11, 2015, 7:53:12 AM2/11/15
to ope...@googlegroups.com
Hello Reven!

It does work on phone/table on the full screen dashboard, but even with full screen dashboard, it has to be in portrait mode, which is not handy for wall-mounted tablet. Would it be easier to have those images/html files outside of java library, so they could be manipulated accordingly?

Best regards,
Davor

John Andrews

unread,
Feb 11, 2015, 8:31:50 AM2/11/15
to ope...@googlegroups.com

The screen shots you provide were a phone.  I didn't want the images outside of the jar to simplify the installation.  I'll try with my 7" tablet

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/aba758b7-a6b8-425c-a2f3-ccfdbb88810e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Davor Fikais

unread,
Feb 11, 2015, 12:04:19 PM2/11/15
to ope...@googlegroups.com
Hello Reven!

I took screenshot with phone, just because S4 has screenshot utility by default, and I haven't had any installed on tablet (it doesn't have enough application storage atm to download any additional application, so I would have to clean some stuff first). Regarding installation simplification, I think OpenHAB is not simple to install itself, and I wouldn't mind few more steps if I would have more customization options available, but that's just my opinion. It would be nice to hear other users opinion on this topic too. 

Best regards,
Davor

John Andrews

unread,
Feb 11, 2015, 12:20:33 PM2/11/15
to ope...@googlegroups.com
I could add an option for an external css file, however I rather get one working that dynamically fits to the screen.  It's possible, if I was using bootstrap it would be simple, but I wanted to keep the code light to reduce the processing power needed (my TF300T can't really handle this webpage widget).

Davor Fikais

unread,
Feb 13, 2015, 12:29:11 PM2/13/15
to ope...@googlegroups.com
Hello Reven!

I saw you made some changes to both imperihab binding and imperihab action, and I was wondering if you use cloudbees, or some other tool where we could download latest .jar of binding and action?

Best regards,
Davor

reven

unread,
Feb 13, 2015, 5:12:46 PM2/13/15
to ope...@googlegroups.com
Nah haven't got anything like that setup, not sure how easy it is since I just need one project from the larger workspace built..  I'm a C# developer so java IDEs/build environments etc are all new to me (well I haven't touched Java since univeristy 9 years ago).

Added new build to original post

Aaron Koolen-Bourke

unread,
Feb 16, 2015, 3:30:54 PM2/16/15
to ope...@googlegroups.com
OK, I have just installed this and I have to say it is pretty damned amazing so far. As Ben already knows I've been getting my HA up and running as part of our extension/renovation and I've been less than impressed with the UI in OpenHab. As a software engineer myself I have been contemplating what to do; write a complete UI config system for OpenHab or build something just for my own needs - both being rather huge projects to undertake with my limited time.

Then I come across ImperiHome and this addon (Thanks Ben). In about 1/2 an hour I had it running on my OpenHab and had my my fan switches, lights, motion detection all working in the free version of ImperiHome (On my crusty Android tablet) and I'll be upgrading to the pro version soon. 

The only thing ImperiHome needs now is iOS support and I'm sussed for when I'm away from home.

Many thanks again reven.

Aaron

John Andrews

unread,
Feb 16, 2015, 3:35:25 PM2/16/15
to ope...@googlegroups.com
I believe they are working on an iOS version now and should be released in a few months.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Dirk Boon

unread,
Feb 18, 2015, 6:02:31 AM2/18/15
to ope...@googlegroups.com
Hi Reven,

GREAT WORK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Really excellent and thank you very much for this !

I've been waiting for this since I started with OH.
I've just installed and tested some basic items, and so far no issues :-)

Keep it up !
Grtz,
DirkB


Op zondag 8 februari 2015 19:36:23 UTC+1 schreef reven:

Davor Fikais

unread,
Feb 18, 2015, 8:00:47 AM2/18/15
to ope...@googlegroups.com
Hello Reven!

I have one quick question. Do you know why standard Web View in OpenHAB sitemap can't display alarm widget from Imperihab binding? I can access it directly from browser though. It would be great if we could use it in WebUI and HABdroid too, besides ImperiHome, because OpenHAB UI lacks this kind of input.

Best regards,
Davor

On Sunday, February 8, 2015 at 7:36:23 PM UTC+1, reven wrote:

reven

unread,
Feb 18, 2015, 12:43:44 PM2/18/15
to ope...@googlegroups.com
To be honest I've never even used the webview  of openHAB (I basically wrote this when I switched to openHAB so just use imperihome for the gui).  However, it's just a basic webpage, there's some javascript on it but its basic and designed to be light weight.  So there's no reason it shouldnt work.   I'll see if I can play around and get it to work some time over the weekend.

Davor Fikais

unread,
Feb 19, 2015, 3:36:38 AM2/19/15
to ope...@googlegroups.com
Hello Reven!

If it's basic web page, then maybe I should address the problem to someone else (probably someone who wrote implementation of webview component). Thank you for your help.

Best regards,
Davor

Dirk Boon

unread,
Feb 19, 2015, 3:24:32 PM2/19/15
to ope...@googlegroups.com
Hi Reven,
How does the label parameter work ?
I tried a few syntaxes but no luck so far.
I would guess something like :
Number Node23_TempDS "T. Living [%.1f °C]" (gITempSensors) { mqtt="<[RPIBroker:MyMQTT/23/0/V_TEMP:state:default]", imperihab="room:LIVING,label:TLiving,type:DevTemperature" }

or

Number Node23_TempDS "T. Living [%.1f °C]" (gITempSensors) { mqtt="<[RPIBroker:MyMQTT/23/0/V_TEMP:state:default]", imperihab="room:LIVING,label:"TLiving",type:DevTemperature" }

Thx,
DirkB

Op zondag 8 februari 2015 19:36:23 UTC+1 schreef reven:
Hi Guys,

I'm working on an ImperiHome action and binding.  They're pretty much working now (I just need to get persistent data working to provide imperihome the ability to chart data).

Was wondering what's the best way to provide these to the community?  Create a clone of openHAB git repo?

The Action only provides one method currently "imperiHabSay("text to say")", this will send a text to speech command to your configured ImperiHome device (will add support for multiple ImperiHome devices shortly).  I use this for an alarm countdown, whenever I have new voicemails, someone is approaching the front door, caller id etc.

The binding provides the API for ImperiHome to load the devices from openHAB and to control it.  To use the binding you just need to add {imperihab="room:[#room],type:[#type],watts:[#wattsitem]"}
Where
#room = the room you want the item to appear under in ImperiHome
#type = Optional, only needed if the type of the device cannot be guessed from the item.  It first tries to find the type based on the values it support OpenClose, OnOff, Percentage etc and there's some best guesses for the item names e.g. if item name contains "Humidity" it thinks its a humidity sensor).  If none of these work, or if you want to override the type it guesses, you can specify it.  Using the device types for imperihome, eg. DevTemperature 
#wattsitem = Optional, this lets you specify another item to be the "energy" value for an item, e.g. for a z-wave power outlet Switch Item, you can link this to the Number item that has the power reading.  Then in imperihome it will show the power usage for that switch.

I've also created a webpage widget for ImperiHome for an alarm keypad/slidehow.  This requires a few switches/number items to be created in openHAB to work, but basically in imperiHome you can add a "website" and point it to the imperihab servlet http://[openhabserver]/imperihab/alarm.  
That webpage will display a slide show of images (images from a directory you specify in the openhab.cfg for imperihab), when you touch/click that:
  • If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttons
    • If you click "Alarm Home", the Alarm_Home switch in imperihab will be turned on
    • If you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be set
  • If, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
The alarm will watch 2 groups (names configured, defaults are AlarmAway and AlarmHome), any items in these groups that recieved a Open/ON update will trigger the alarm mode "Intrusion Detected", then a countdown will start giving you time to disarm the alarm.

This alarm thing is completely optional, and just a added bonus of the ImperiHAB binding.  I had this alarm setup in php and was using it on vera.    


Note: bug in first alpha where the slideshow images must end with lowercase .jpg (fixed in next build) and reported issue with spaces in linux paths to that directory. (FIXED IN SECOND ALPHA)

reven

unread,
Feb 19, 2015, 3:29:47 PM2/19/15
to ope...@googlegroups.com
First one should work (second should put quotes in the name).  I might not have actually tested out the labels, I'll try it out after work (8hours or so from now).  If there's a bug, I'll put a new build up then.

Dirk Boon

unread,
Feb 19, 2015, 4:15:39 PM2/19/15
to ope...@googlegroups.com
Ok, I found it works using single quotes like this : label:'my label' so in my case this works :
Number Node23_TempDS "T. Living [%.1f °C]" (gITempSensors) { mqtt="<[RPIBroker:MyMQTT/23/0/V_TEMP:state:default]", imperihab="room:LIVING,label:'Temp LIVING',type:DevTemperature" }

I'm also playing around with DevDoor and DevMotion types.
For example my item is :
Switch DETZ "PIR LIVING" (RPiContacts) { mqtt="<[RPIBroker:/mqtt-gpio-monitor/out/35:state:JS(gpio2sw.js)]", imperihab="room:LIVING,label:'PIR LIVING',type:DevMotion"}
The item shows up in ImperiHome but it remains fixed even if the PIR is detecting motion, I guess this has to do with the transform ?
the gpio2sw.js contents is :
if (input =="1") {
"ON";
} else {
"OFF";
}

In 8 hours I'll be in bed, but no stress man, I can live with that :-)
Read you tomorrow,
Grtz,
DirkB

Op donderdag 19 februari 2015 21:29:47 UTC+1 schreef reven:

Dirk Boon

unread,
Feb 19, 2015, 4:45:29 PM2/19/15
to ope...@googlegroups.com
Another thing, I tried a Humidity like this :
Number Node20_HumiDH "Hum Veranda [%.1f %%]" (gHumidSensors) { mqtt="<[RPIBroker:MyMQTT/20/10/V_HUM:state:default]" , imperihab="room:VERANDA,label:'Humidity VERANDA',type:DevHygrometry" }

==> Item shows up in IH but the value is always 0% while on the OH app on my android it shows the right value 56%

Grtz,
DirkB

Op donderdag 19 februari 2015 22:15:39 UTC+1 schreef Dirk Boon:

reven

unread,
Feb 20, 2015, 2:19:00 AM2/20/15
to ope...@googlegroups.com
Regarding the label, I tried the following variations and they all worked....

Switch Hallway_Lights "Hallway Lights" (Light) {zwave="4",imperihab="room:Hallway,label=The Hallway Lights"}
Switch Hallway_Lights "Hallway Lights" (Light) {zwave="4",imperihab="room:Hallway;label=The Hallway Lights"}
Switch Liams_TV "Liam's TV" (TV) {zwave="6:command=SWITCH_BINARY,respond_to_basic=TRUE",imperihab="room:Liam's Room;label=Liam's TV;watts:Liams_TV_Watts"}

So with ; and , separators and with and without a ' in the label.  No sure why the label isn't working for you without single quotes.  The regex (if anyone is interested) to split the string is just 
\G(\w+)[\s]*[=:][\s]*([\w' ]+)[\s]*[,;]?
so it looks for \w (word character), a apostrophe and a space.   There's no looking for starting/ending quotes (single or double).  
Also this worked for me
Number Ensuite_Humidity "Ensuite Humidity [%.0f %%]" <humidity> (SensorHumidity) { zwave="11:command=SENSOR_MULTILEVEL,SENSOR_TYPE=5",imperihab="room:VERANDA,label:Humidity VERANDA,type:DevHygrometry"}

reven

unread,
Feb 20, 2015, 2:30:10 AM2/20/15
to ope...@googlegroups.com
I think I fixed the problem with this, if the value was a double (had a decimal point) the parsing would fail.  Assuming that was the issue, the latest build (Alpha3, should call this a beta now), should fix it.  Let me know how you get on.

Davor Fikais

unread,
Feb 20, 2015, 2:42:42 AM2/20/15
to ope...@googlegroups.com
Hello Reven!

While you are still working on this binding, I have one question. Namely, could this RegEx make problems with characters with diacritical mark (čćđšž)? If I use them in, lets say, room name, I can't see my device in ImperiHome. Could this be binding or ImperiHome issue?

Best regards,
Davor

reven

unread,
Feb 20, 2015, 2:58:41 AM2/20/15
to ope...@googlegroups.com
Try Alpha 4, hopefully that fixes it.

Davor Fikais

unread,
Feb 20, 2015, 4:01:05 AM2/20/15
to ope...@googlegroups.com
Hello Reven!

Thank you a lot. I will try it as soon as I get home.

Best regards,
Davor

Dirk Boon

unread,
Feb 21, 2015, 10:20:54 AM2/21/15
to ope...@googlegroups.com
Hi again Reven,

Just installed Alpha 4 and "humidity"-values are showing up correctly now.
My "Labels" issue was already solved.
Thank you very much.

Remaining issue :
DevDoor and DevMotion not showing any update in IH.

Feature request ( ... no pressure, when u feel like it  :-) :
I would love to be able to switch IH Dashboard page nr from an OH rule.
If this works, I think it provides also a way to "wake-up" a tablet with IH for example when you arrive in the room (via motiondetection) where the tablet is.

I consider myself still as "newbie", so if this feature is already availble then don't shoot me, ok ?

Grtz,
DirkB



Op zondag 8 februari 2015 19:36:23 UTC+1 schreef reven:
Hi Guys,

I'm working on an ImperiHome action and binding.  They're pretty much working now (I just need to get persistent data working to provide imperihome the ability to chart data).

Was wondering what's the best way to provide these to the community?  Create a clone of openHAB git repo?

The Action only provides one method currently "imperiHabSay("text to say")", this will send a text to speech command to your configured ImperiHome device (will add support for multiple ImperiHome devices shortly).  I use this for an alarm countdown, whenever I have new voicemails, someone is approaching the front door, caller id etc.

The binding provides the API for ImperiHome to load the devices from openHAB and to control it.  To use the binding you just need to add {imperihab="room:[#room],type:[#type],watts:[#wattsitem]"}
Where
#room = the room you want the item to appear under in ImperiHome
#type = Optional, only needed if the type of the device cannot be guessed from the item.  It first tries to find the type based on the values it support OpenClose, OnOff, Percentage etc and there's some best guesses for the item names e.g. if item name contains "Humidity" it thinks its a humidity sensor).  If none of these work, or if you want to override the type it guesses, you can specify it.  Using the device types for imperihome, eg. DevTemperature 
#wattsitem = Optional, this lets you specify another item to be the "energy" value for an item, e.g. for a z-wave power outlet Switch Item, you can link this to the Number item that has the power reading.  Then in imperihome it will show the power usage for that switch.

I've also created a webpage widget for ImperiHome for an alarm keypad/slidehow.  This requires a few switches/number items to be created in openHAB to work, but basically in imperiHome you can add a "website" and point it to the imperihab servlet http://[openhabserver]/imperihab/alarm.  
That webpage will display a slide show of images (images from a directory you specify in the openhab.cfg for imperihab), when you touch/click that:
  • If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttons
    • If you click "Alarm Home", the Alarm_Home switch in imperihab will be turned on
    • If you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be set
  • If, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
The alarm will watch 2 groups (names configured, defaults are AlarmAway and AlarmHome), any items in these groups that recieved a Open/ON update will trigger the alarm mode "Intrusion Detected", then a countdown will start giving you time to disarm the alarm.

This alarm thing is completely optional, and just a added bonus of the ImperiHAB binding.  I had this alarm setup in php and was using it on vera.    


Note: bug in first alpha where the slideshow images must end with lowercase .jpg (fixed in next build) and reported issue with spaces in linux paths to that directory. (FIXED IN SECOND ALPHA)

Alpha 3 
- Small change to parsing of humidity, pressure, electricity, noise, luminosity values.  The were being parsed as ints, and if they had a decimal point (meaning there were doubles) the value would be returned as 0.

Alpha 4
- Hopefully umlauts etc are now supported

Davor Fikais

unread,
Feb 21, 2015, 4:11:41 PM2/21/15
to ope...@googlegroups.com
Hello Reven!

Sorry I didn't reply earlier, but I was pretty busy, so I haven't had time to test new version of binding. I've tried it now and it works (it shows devices in rooms that contain characters with diacritical marks in ImperiHome), but it shows those characters as question mark instead of character. I'm not sure if this is due to limitation of ImperiHome or something else. I have those characters in item name in OpenHAB, and in this case, ImperiHome shows them correctly. 

Best regards,
Davor

On Friday, February 20, 2015 at 8:58:41 AM UTC+1, reven wrote:

reven

unread,
Feb 21, 2015, 4:14:08 PM2/21/15
to ope...@googlegroups.com
You can check by going to
on the machine that has openHAB or replace localhost with the openhab machine name or ip.

I checked to make sure it was UTF-8 encoded and supported the characters you posted, so I'm pretty sure it's an issue with ImperiHome.  But check that URL first to be 100% sure.

Davor Fikais

unread,
Feb 21, 2015, 4:18:00 PM2/21/15
to ope...@googlegroups.com
Hello Reven!

Here is what I got from imperihab:

{"devices":[{"id":"Bedroom_Dimmer_MainLight","name":"Bedroom Dimmer MainLight","type":"DevDimmer","room":"Spavaća soba","params":[{"key":"Level","value":"99"},{"key":"Status","value":"1"}]}], "_comment":"generated by binding:1 !"}

Thank you for your help.

Best regards,
Davor

reven

unread,
Feb 21, 2015, 4:21:54 PM2/21/15
to ope...@googlegroups.com
You can already switch in a rule :)

imperiHabGotoPage([int] index) (0 based)

DevDoor and DevMotion are working for me, for motion items you don't need to specify the type it defaults to motion if the item support ContactType.  For doors, if the id has Door in it, it defaults to door for contact items eg Contact Front_Door {zwave="...",imperihab="room:Entrance}.       Can you check the state of the items against http://[openhab]/rest/items 

reven

unread,
Feb 21, 2015, 4:25:16 PM2/21/15
to ope...@googlegroups.com
So yeah that looks like it's ok, but... thats probably a gzipped response, because your browser will support gzip and imperihome currently doesnt, so there's 2 possible response streams.  I did utf8 both, but you'll need to check one without gzip to verify.

You can test this via these instructions just revert when done.  I'm 99.999% confident the response will be the same and contain the  Ä character, but that will prove its imperiHome and I'll email them for a fix.

Davor Fikais

unread,
Feb 21, 2015, 4:34:38 PM2/21/15
to ope...@googlegroups.com
Hi!

I'm not sure if it's relevant, but I don't have Ä character in room name. Room name is Spavaća soba, so it's ć character that's problematic. I've tried to modify headers as instructed in the link you've posted, but with same result as the one I've had. I've tried character ć in Notepad++ and it shows correctly with UTF-8 encoding, but shows ć (like it shows in the link) if I convert it to ANSI.

Best regards, 
Davor

John Andrews

unread,
Feb 21, 2015, 5:01:21 PM2/21/15
to ope...@googlegroups.com
Paste whats exactly in your .items binding, and I'll recreate it and test it.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Davor Fikais

unread,
Feb 21, 2015, 5:17:06 PM2/21/15
to ope...@googlegroups.com
Hello!

Here is binding part of my item:

{ imperihab="room:Spavaća soba", zwave="3:command=switch_multilevel" }

Best regards,
Davor

Dirk Boon

unread,
Feb 22, 2015, 9:36:44 AM2/22/15
to ope...@googlegroups.com
Reven,

Sorry for jumping around, but I noticed that  this item gets "N/A" in IH :

Number TempTuinhuis "Temp @ Tuinhuis [%.2f degC]" <temperature> (gOTempSensors) { rfxcom="<19214:Temperature", imperihab="room:OUTSIDE,label:'Temp. TUINHUIS',type:DevTemperature" }

Here's the /rest/items for it :

<item>
<type>NumberItem</type>
<name>TempTuinhuis</name>
<state>
6.60000000000000053290705182007513940334320068359375
</state>
</item>

I'll get back to you on the Door & Motion issue.
Grtz,
DirkB

Op zondag 8 februari 2015 19:36:23 UTC+1 schreef reven:
Hi Guys,

I'm working on an ImperiHome action and binding.  They're pretty much working now (I just need to get persistent data working to provide imperihome the ability to chart data).

Was wondering what's the best way to provide these to the community?  Create a clone of openHAB git repo?

The Action only provides one method currently "imperiHabSay("text to say")", this will send a text to speech command to your configured ImperiHome device (will add support for multiple ImperiHome devices shortly).  I use this for an alarm countdown, whenever I have new voicemails, someone is approaching the front door, caller id etc.

The binding provides the API for ImperiHome to load the devices from openHAB and to control it.  To use the binding you just need to add {imperihab="room:[#room],type:[#type],watts:[#wattsitem]"}
Where
#room = the room you want the item to appear under in ImperiHome
#type = Optional, only needed if the type of the device cannot be guessed from the item.  It first tries to find the type based on the values it support OpenClose, OnOff, Percentage etc and there's some best guesses for the item names e.g. if item name contains "Humidity" it thinks its a humidity sensor).  If none of these work, or if you want to override the type it guesses, you can specify it.  Using the device types for imperihome, eg. DevTemperature 
#wattsitem = Optional, this lets you specify another item to be the "energy" value for an item, e.g. for a z-wave power outlet Switch Item, you can link this to the Number item that has the power reading.  Then in imperihome it will show the power usage for that switch.

I've also created a webpage widget for ImperiHome for an alarm keypad/slidehow.  This requires a few switches/number items to be created in openHAB to work, but basically in imperiHome you can add a "website" and point it to the imperihab servlet http://[openhabserver]/imperihab/alarm.  
That webpage will display a slide show of images (images from a directory you specify in the openhab.cfg for imperihab), when you touch/click that:
  • If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttons
    • If you click "Alarm Home", the Alarm_Home switch in imperihab will be turned on
    • If you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be set
  • If, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
The alarm will watch 2 groups (names configured, defaults are AlarmAway and AlarmHome), any items in these groups that recieved a Open/ON update will trigger the alarm mode "Intrusion Detected", then a countdown will start giving you time to disarm the alarm.

This alarm thing is completely optional, and just a added bonus of the ImperiHAB binding.  I had this alarm setup in php and was using it on vera.    


Note: bug in first alpha where the slideshow images must end with lowercase .jpg (fixed in next build) and reported issue with spaces in linux paths to that directory. (FIXED IN SECOND ALPHA)

Patrik Gfeller

unread,
Feb 26, 2015, 5:49:45 AM2/26/15
to ope...@googlegroups.com
Hi Reven,

a great addition openHAB :-) ... I've started to create a wiki page for the binding to make it more popular (even as alpha) and to have a place to create documentation.
I'll start to configure the binding for my system and update the page along the way:


I hope that's ok for you.

with kind regards,
Patrik

Patrik Gfeller

unread,
Feb 26, 2015, 12:21:46 PM2/26/15
to ope...@googlegroups.com
A first feedback to alpha 4,

I was able to setup some first sensor and actuators; here a question - is there a way to invert rollershutters:

{zwave="6:0:command=SWITCH_MULTILEVEL,invert_state=true", imperihab="room:TV,label:Rollladen,type:DevShutter,watts:zWaveShutterEGTV"}

As currently the ImperiHome app controls those the wrong way ( up <=> down).

thanks for the great work done and kind regards,
Patrik

John Andrews

unread,
Feb 26, 2015, 12:52:19 PM2/26/15
to ope...@googlegroups.com
Thanks for the wiki page, didn't even think of that :)

To invert the sensor, if you sign up for the beta program of ImperiHome, you can invert the icons. I requested this feature a few weeks ago and they added it like 2 days later, I was using vera at the time and my garage door state was wrong off = closed, but their garage icon was around the wrong way.

If that doesn't solve the problem, I can easily add an invert flag.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Patrik Gfeller

unread,
Feb 26, 2015, 1:02:04 PM2/26/15
to ope...@googlegroups.com
If it is not too much work an invert flag would be much appreciated :-).

with kind regards,
Patrik

John Andrews

unread,
Feb 26, 2015, 1:03:13 PM2/26/15
to ope...@googlegroups.com
I'll add it this weekend.

On 2/27/15, Patrik Gfeller <patrik....@gmail.com> wrote:
> If it is not too much work an invert flag would be much appreciated :-).
>
> with kind regards,
> Patrik
>
>
> Am Donnerstag, 26. Februar 2015 18:52:19 UTC+1 schrieb reven:
>>
>> Thanks for the wiki page, didn't even think of that :)
>>
>> To invert the sensor, if you sign up for the beta program of ImperiHome,
>> you can invert the icons. I requested this feature a few weeks ago and
>> they
>> added it like 2 days later, I was using vera at the time and my garage
>> door
>> state was wrong off = closed, but their garage icon was around the wrong
>> way.
>>
>> If that doesn't solve the problem, I can easily add an invert flag.
>>
>> On Fri, Feb 27, 2015 at 6:21 AM, Patrik Gfeller <patrik....@gmail.com
>> <javascript:>> wrote:
>>
>>> A first feedback to alpha 4,
>>>
>>> I was able to setup some first sensor and actuators; here a question - is
>>>
>>> there a way to invert rollershutters:
>>>
>>> {zwave="6:0:command=SWITCH_MULTILEVEL,*invert_state=true*",
>>> imperihab="room:TV,label:Rollladen,type:DevShutter,watts:zWaveShutterEGTV"}
>>>
>>> As currently the ImperiHome app controls those the wrong way ( up <=>
>>> down).
>>>
>>> thanks for the great work done and kind regards,
>>> Patrik
>>>
>>> Am Donnerstag, 26. Februar 2015 11:49:45 UTC+1 schrieb Patrik Gfeller:
>>>
>>>> Hi Reven,
>>>>
>>>> a great addition openHAB :-) ... I've started to create a wiki page for
>>>>
>>>> the binding to make it more popular (even as alpha) and to have a place
>>>> to
>>>> create documentation.
>>>> I'll start to configure the binding for my system and update the page
>>>> along the way:
>>>>
>>>> https://github.com/openhab/openhab/wiki/ImperiHome-Binding
>>>>
>>>> I hope that's ok for you.
>>>>
>>>> with kind regards,
>>>> Patrik
>>>>
>>>> Am Sonntag, 8. Februar 2015 19:36:23 UTC+1 schrieb reven:
>>>>>
>>>>> Hi Guys,
>>>>>
>>>>> I'm working on an ImperiHome <http://www.imperihome.com/>action and
>>>>> - If, the alarm is not set, it will show "Alarm Away", "Alarm Home"
>>>>>
>>>>> and "Back" buttons
>>>>> - If you click "Alarm Home", the Alarm_Home switch in imperihab
>>>>> will be turned on
>>>>> - If you click "Alarm Away" a countdown (configured in cfg file)
>>>>>
>>>>> that updates a countdown item (so you can use it in a rule to get
>>>>>
>>>>> imperihome to TTS the number, it will say 40, 39, 38 etc). When
>>>>> the
>>>>> countdown is over the switch Alarm_Away will be set
>>>>> - If, the alarm is set, a keypad will be shown, when a pin is
>>>>> entered it will send a request to the servlet that checks the pin
>>>>> against
>>>>> the one configured
>>>>>
>>>>> The alarm will watch 2 groups (names configured, defaults are AlarmAway
>>>>>
>>>>> and AlarmHome), any items in these groups that recieved a Open/ON
>>>>> update
>>>>> will trigger the alarm mode "Intrusion Detected", then a countdown will
>>>>>
>>>>> start giving you time to disarm the alarm.
>>>>>
>>>>> This alarm thing is completely optional, and just a added bonus of the
>>>>>
>>>>> ImperiHAB binding. I had this alarm setup in php and was using it on
>>>>> vera.
>>>>>
>>>>>
>>>>> UPDATE: Github repo https://github.com/revenz/openhab/
>>>>>
>>>>> *Note: bug in first alpha where the slideshow images must end with
>>>>> lowercase .jpg (fixed in next build) and reported issue with spaces in
>>>>>
>>>>> linux paths to that directory. (FIXED IN SECOND ALPHA)*
>>>>>
>>>>> *Alpha 3 *
>>>>> *- Small change to parsing of humidity, pressure, electricity, noise,
>>>>> luminosity values. The were being parsed as ints, and if they had a
>>>>> decimal point (meaning there were doubles) the value would be returned
>>>>> as
>>>>> 0.*
>>>>>
>>>>> *Alpha 4*
>>>>> *- Hopefully umlauts etc are now supported*
>>>>>
>>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "openhab" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> openhab+u...@googlegroups.com <javascript:>.
>>> To post to this group, send email to ope...@googlegroups.com
>>> <javascript:>.
>>> <https://groups.google.com/d/msgid/openhab/7f16926b-44e4-4737-a6c3-e7fa44dd3cc3%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "openhab" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openhab+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at http://groups.google.com/group/openhab.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openhab/6c4cc072-bfd0-4f99-a4e2-4eb627a43b98%40googlegroups.com.

Dirk Boon

unread,
Feb 26, 2015, 3:34:32 PM2/26/15
to ope...@googlegroups.com
I noticed on the Wiki page the DevCamera device type.
Could somebody explain how this works ?

Now, for my 2 cams , I only have sitemap definitions as follows :
Video label="Oprit" icon="door" url="http://192.168.2.171:19030/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=yyy" encoding="mjpeg"

Image label="Tuin1" icon="door" url="http://xxx:y...@192.168.2.5:8081/cgi/jpg/image.cgi" refresh=1000

Since I have no definitions for these in my .items file, I don't know where to put the imperihab= definition ?

Grtz,
DirkB


Op zondag 8 februari 2015 19:36:23 UTC+1 schreef reven:
Hi Guys,

I'm working on an ImperiHome action and binding.  They're pretty much working now (I just need to get persistent data working to provide imperihome the ability to chart data).

Was wondering what's the best way to provide these to the community?  Create a clone of openHAB git repo?

The Action only provides one method currently "imperiHabSay("text to say")", this will send a text to speech command to your configured ImperiHome device (will add support for multiple ImperiHome devices shortly).  I use this for an alarm countdown, whenever I have new voicemails, someone is approaching the front door, caller id etc.

The binding provides the API for ImperiHome to load the devices from openHAB and to control it.  To use the binding you just need to add {imperihab="room:[#room],type:[#type],watts:[#wattsitem]"}
Where
#room = the room you want the item to appear under in ImperiHome
#type = Optional, only needed if the type of the device cannot be guessed from the item.  It first tries to find the type based on the values it support OpenClose, OnOff, Percentage etc and there's some best guesses for the item names e.g. if item name contains "Humidity" it thinks its a humidity sensor).  If none of these work, or if you want to override the type it guesses, you can specify it.  Using the device types for imperihome, eg. DevTemperature 
#wattsitem = Optional, this lets you specify another item to be the "energy" value for an item, e.g. for a z-wave power outlet Switch Item, you can link this to the Number item that has the power reading.  Then in imperihome it will show the power usage for that switch.

I've also created a webpage widget for ImperiHome for an alarm keypad/slidehow.  This requires a few switches/number items to be created in openHAB to work, but basically in imperiHome you can add a "website" and point it to the imperihab servlet http://[openhabserver]/imperihab/alarm.  
That webpage will display a slide show of images (images from a directory you specify in the openhab.cfg for imperihab), when you touch/click that:
  • If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttons
    • If you click "Alarm Home", the Alarm_Home switch in imperihab will be turned on
    • If you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be set
  • If, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
The alarm will watch 2 groups (names configured, defaults are AlarmAway and AlarmHome), any items in these groups that recieved a Open/ON update will trigger the alarm mode "Intrusion Detected", then a countdown will start giving you time to disarm the alarm.

This alarm thing is completely optional, and just a added bonus of the ImperiHAB binding.  I had this alarm setup in php and was using it on vera.    


Note: bug in first alpha where the slideshow images must end with lowercase .jpg (fixed in next build) and reported issue with spaces in linux paths to that directory. (FIXED IN SECOND ALPHA)

Alpha 3 
- Small change to parsing of humidity, pressure, electricity, noise, luminosity values.  The were being parsed as ints, and if they had a decimal point (meaning there were doubles) the value would be returned as 0.

Alpha 4

Patrik Gfeller

unread,
Feb 26, 2015, 5:16:06 PM2/26/15
to ope...@googlegroups.com
Hi Dirk,

Probably the easiest way might be to add the cameras directly in ImperiHome.

With kind regards,
Patrik

reven

unread,
Feb 26, 2015, 10:35:57 PM2/26/15
to ope...@googlegroups.com
Alpha 5 adds this invert flag, didn't test it, but hopefully works :D

You can use it 
imperihab="room:Garage,invert=true"
or
imperihab="room:Garage,invert=on"
or
imperihab="room:Garage,invert=1"
Figured cover all basis in case someone forgets what the value is.

Also updated the wiki with this item and a couple of more options.   Should probably put info on the Alarm up there too...

Dirk Boon

unread,
Feb 28, 2015, 6:09:34 AM2/28/15
to ope...@googlegroups.com
Hi Patrik,

Thanks for the tip. I got it working, which is great since I can now auto-switch to the right camera in Imperihome based on PIR movement.
Nice.

Grtz,
DirkB

Op donderdag 26 februari 2015 23:16:06 UTC+1 schreef Patrik Gfeller:

frederic bodart

unread,
Mar 9, 2015, 2:11:00 PM3/9/15
to ope...@googlegroups.com

Hi,
Great, job.I've started to use it and have a question : how to manage Imperihome devices with more than 1 key ?.

Regards 

John Andrews

unread,
Mar 9, 2015, 2:15:08 PM3/9/15
to ope...@googlegroups.com
What do you mean more than 1 key?

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

frederic bodart

unread,
Mar 9, 2015, 2:34:05 PM3/9/15
to ope...@googlegroups.com


Hi John,

There are some devices defined with more than one key/value.
For example :
DevDimmer 2 keys : key1= value key2=status
DevRain 2 keys : key1= Rain key2=Total Rain
 Develectricity 2 keys : key1= Watts key2=Total Conso
....
Some of devices have up to 4 keys.

Regards

John Andrews

unread,
Mar 9, 2015, 2:43:55 PM3/9/15
to ope...@googlegroups.com
For dimmers, you just add the {imperihab="room:whatever"} and it will get the correct on/off state as well as the percentage.

For electricity, for the number item for total conso add {imperihab="room:whatever;watts:[the_number_item_for_watts]"} eg

Number my_energy {imperihab="room:whatever;watts:my_energy_watts;type=DevElectricity"}
Number my_energy_watts 

For the rain, it currently only supports the one value (I didn't have a rain item to test this).  Ill make it support two values (similar to the way watts does)

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

frederic bodart

unread,
Mar 9, 2015, 2:51:20 PM3/9/15
to ope...@googlegroups.com
John,
Thanks for your help. I'll try it and keep informed.

Regards

frederic bodart

unread,
Mar 13, 2015, 12:18:50 PM3/13/15
to ope...@googlegroups.com
Hi ,

I've tried to configure Imperihome to access 2 instances of Openhab with Imperihab on both.
But Imperihab return always "imperiHAB" as system name, so Imperihome refuse to create two systems with  same name.

Is it possible to update imperhab binding by sending a custom system name ?
This could be valued in the openhab.cfg by adding , for example :

imperihab:system=xxxxxxx (default=imperiHAB)

Regards 

reven

unread,
Mar 13, 2015, 2:21:09 PM3/13/15
to ope...@googlegroups.com
I've added "accumulation" as an option for the rain sensor, see the first post Beta 1 notes for how to configure

reven

unread,
Mar 13, 2015, 2:23:05 PM3/13/15
to ope...@googlegroups.com
I've added the configuration option imperihab:name.  Default is ImperiHAB, but you can override it if you like.   Chances are you'll have to restart openHAB after the config change, unless you have your openHAB to automatically reload the config (default is not to do that).

Included in Beta 1 which has just been posted

frederic bodart

unread,
Mar 14, 2015, 4:22:34 AM3/14/15
to ope...@googlegroups.com
Imperihab:name works fine.
I've an issue with Dev_Rain device type.
It seems that accumulation is not set :

OpenHab Items:
Number Oregon_Pluie "Precipitations sur 1 heure [%.1f mm]"      (Oregon) { rfxcom="<41984:RainRate" ,                imperihab="room:Outside,label:MaPluie,accumulation:Oregon_Pluie_Total,type:Dev_Rain"}
Number Oregon_Pluie_Total "Precipitations cumulees (2015)  [%.1f mm]"      (Oregon) { rfxcom="<41984:RainTotal" }

But Imperihome doesn't detect this device.
I've use Http direct access (http://xxx:8080/imperihab/devices :
.....{"id":"Oregon_Pluie","name":"MaPluie","type":"Dev_Rain","room":"Outside","params":[{"key":"Value","value":"0"}]} ....

Accumulation key missing.

In the events.lg, all values are well updated.
2015-03-14 09:21:47 - Oregon_Pluie_Sig state updated to 5 2015-03-14 09:21:47 - Oregon_Pluie state updated to 0 2015-03-14 09:21:47 - Oregon_Pluie_Total state updated to 82 2015-03-14 09:21:47 - Oregon_Pluie_Bat state updated to 9


Regards

frederic bodart

unread,
Mar 14, 2015, 1:31:35 PM3/14/15
to ope...@googlegroups.com
Imperihome type should be DevRain  not Dev_Rain : Correct ?

{"id":"Oregon_Pluie","name":"MaPluie","type":"Dev_Rain","room":"Outside","params":[{"key":"Value","value":"0"}]}

Regards


reven

unread,
Mar 14, 2015, 3:57:08 PM3/14/15
to ope...@googlegroups.com
Sorry yes it should be DevRain not Dev_Rain

Dirk Boon

unread,
Mar 15, 2015, 5:36:52 PM3/15/15
to ope...@googlegroups.com
Hi Reven,

I'm still a huge fan of your work and have my old Nexus7 tablet running IH as interface to my OH. Works great !
Would be nice to have 'persistence' and get the charts working in IH,

Thanks and keep up the good work,
DirkB

Op zondag 8 februari 2015 19:36:23 UTC+1 schreef reven:
Hi Guys,

I'm working on an ImperiHome action and binding.  They're pretty much working now (I just need to get persistent data working to provide imperihome the ability to chart data).

Was wondering what's the best way to provide these to the community?  Create a clone of openHAB git repo?

The Action only provides one method currently "imperiHabSay("text to say")", this will send a text to speech command to your configured ImperiHome device (will add support for multiple ImperiHome devices shortly).  I use this for an alarm countdown, whenever I have new voicemails, someone is approaching the front door, caller id etc.

The binding provides the API for ImperiHome to load the devices from openHAB and to control it.  To use the binding you just need to add {imperihab="room:[#room],type:[#type],watts:[#wattsitem]"}
Where
#room = the room you want the item to appear under in ImperiHome
#type = Optional, only needed if the type of the device cannot be guessed from the item.  It first tries to find the type based on the values it support OpenClose, OnOff, Percentage etc and there's some best guesses for the item names e.g. if item name contains "Humidity" it thinks its a humidity sensor).  If none of these work, or if you want to override the type it guesses, you can specify it.  Using the device types for imperihome, eg. DevTemperature 
#wattsitem = Optional, this lets you specify another item to be the "energy" value for an item, e.g. for a z-wave power outlet Switch Item, you can link this to the Number item that has the power reading.  Then in imperihome it will show the power usage for that switch.

I've also created a webpage widget for ImperiHome for an alarm keypad/slidehow.  This requires a few switches/number items to be created in openHAB to work, but basically in imperiHome you can add a "website" and point it to the imperihab servlet http://[openhabserver]/imperihab/alarm.  
That webpage will display a slide show of images (images from a directory you specify in the openhab.cfg for imperihab), when you touch/click that:
  • If, the alarm is not set, it will show "Alarm Away", "Alarm Home" and "Back" buttons
    • If you click "Alarm Home", the Alarm_Home switch in imperihab will be turned on
    • If you click "Alarm Away" a countdown (configured in cfg file) that updates a countdown item (so you can use it in a rule to get imperihome to TTS the number, it will say 40, 39, 38 etc).  When the countdown is over the switch Alarm_Away will be set
  • If, the alarm is set, a keypad will be shown, when a pin is entered it will send a request to the servlet that checks the pin against the one configured
The alarm will watch 2 groups (names configured, defaults are AlarmAway and AlarmHome), any items in these groups that recieved a Open/ON update will trigger the alarm mode "Intrusion Detected", then a countdown will start giving you time to disarm the alarm.

This alarm thing is completely optional, and just a added bonus of the ImperiHAB binding.  I had this alarm setup in php and was using it on vera.    


Note: bug in first alpha where the slideshow images must end with lowercase .jpg (fixed in next build) and reported issue with spaces in linux paths to that directory. (FIXED IN SECOND ALPHA)

Alpha 3 
- Small change to parsing of humidity, pressure, electricity, noise, luminosity values.  The were being parsed as ints, and if they had a decimal point (meaning there were doubles) the value would be returned as 0.

Alpha 4
- Hopefully umlauts etc are now supported

Alpha 5
- Added an "invert" flag to swap on/off, open/close values, defaults to false.  imperihab="room:GarageDoor;invert=true"  will work with true, on, or 1.

Beta 1
- Added "accumulation" option which is used for the rain sensor.  imperihab="room:Outside;accumulation:Other_Item_Name;type=DEV_RAIN"
- Added configuration option imperihab:name, this defaults to ImperiHAB.  But if you have more than one openHAB instance this lets you name each imperiHAB

John Andrews

unread,
Mar 15, 2015, 5:38:58 PM3/15/15
to ope...@googlegroups.com
Persistent data should be working, I added that ages about before the first alpha was released.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Ben Jones

unread,
Mar 15, 2015, 6:06:55 PM3/15/15
to ope...@googlegroups.com
I also added the ability to override the persistence engine but I was unable to get it working and since I cannot get a dev environment building on my PC I haven't been able to test/debug. 

@reven - I can't even remember the syntax for the option to specify the persistence engine to use - can you recall?

John Andrews

unread,
Mar 15, 2015, 6:08:32 PM3/15/15
to ope...@googlegroups.com
The default persistent data should still be working though. I havent
actually got persistent data setup so it may have been broken.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "openhab" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> openhab+u...@googlegroups.com.
> To post to this group, send email to ope...@googlegroups.com.
> Visit this group at http://groups.google.com/group/openhab.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openhab/b12ec771-eaa8-4092-b7de-5844f15e92e7%40googlegroups.com.

Christophe Jordens

unread,
Mar 16, 2015, 6:47:48 AM3/16/15
to ope...@googlegroups.com
Hi,

I love your job, could you say me if you plan to make the DevScene item? For the moment I can display it in imperihome but if I click on it nothing happen, only in log I see "GET /imperihab/devices/Scene_Away/action/launchScene HTTP/1.1" 200 10 
I see nothing in your code for the launchScene action.

Thanks.

John Andrews

unread,
Mar 16, 2015, 1:46:23 PM3/16/15
to ope...@googlegroups.com
I'll put it on the todo list and hopefully get to it in a few days.  In the meantime you could create a switch and a rule in openhab that triggers that scene.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

frederic bodart

unread,
Mar 27, 2015, 8:07:04 AM3/27/15
to ope...@googlegroups.com
Hi Reven,

Have you forecast a Beta02 to fix this issue ?

Regards

Gary Wes

unread,
Mar 27, 2015, 1:42:29 PM3/27/15
to ope...@googlegroups.com
Hi Reven,

As Dirk Boon, DevMotion not showing any update in IH :/
When my item has no defined type, ImperiHome considers as a light. When motion is detected, the state change and the lamp light (screen 1 & 2)
But when I define as DevMotion, I have non status change... (screen 3)

Can you help me ?

John Andrews

unread,
Mar 29, 2015, 2:52:11 PM3/29/15
to ope...@googlegroups.com
I'll try and have a release ready for the upcoming weekend (easter) or the very least the week after (I have that week off work).  

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

reven

unread,
Apr 8, 2015, 4:47:44 PM4/8/15
to ope...@googlegroups.com
Gary Wes, what type do you have the motion sensors set to in openHAB?  You should be using Contact types, which shouldn't need the type to be set for imperiHAB, as it will automatically detect Contact types as motion sensors.  I just tested my motion sensors and they are updating in imperiHome using Contact types.

Gary Wes

unread,
Apr 9, 2015, 1:15:56 AM4/9/15
to ope...@googlegroups.com
Reven,

I use a Switch Item and I define the imperihab binding as DevMotion.

John Andrews

unread,
Apr 9, 2015, 1:24:01 AM4/9/15
to ope...@googlegroups.com
Yeah that's why it won't work.  For DevMotion it looks for an Open State, which obviously doesn't exist for a Switch item.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Andrzej Szymkowicz

unread,
Apr 12, 2015, 5:44:25 PM4/12/15
to ope...@googlegroups.com
Great project!

I'm wondering how to use thermostat device. My openhab items are as follow:
Number knxLivingRoomTemperature         "Temperature [%.1f °C]"                 {knx="<4/6/30"}
Number knxLivingRoomTemperatureSet "Set temperature [%.1f °C]"        {knx="<4/7/30"}
Number knxLivingRoomTemperatureMode "Mode [%d]"                        {knx="<4/1/30"}   //comfort,standby, night ..
Dimmer knxLivingRoomTemperatureValve "Valve [%.1f %%]"        {knx="<4/4/30"}

If possible I would like to use mode setting instead of direct setting temeprature (or both, the best option :-) )

Romain GOUYET

unread,
Jun 10, 2015, 3:59:55 PM6/10/15
to ope...@googlegroups.com
Hi,
Very nice Binding, easy to setup.

Most of my device are working well ... except my X10 RollerShutters. They are X10 SW10 devices.

I define them as 

Switch VoletRoulant "Volet" <rollershutter> (RDC,Shutters) { rfxcom=">D.7:LIGHTING1.X10:Command", imperihab="room:Bureau" }

I get a shutter icon in OpenHab website  and a switch 0-1 to open or close it : it works.
I get a ON/OFF button in Imperihome : it works but it's not the best...

In fact, I want to define it as a DevShutter in Imperihome.

So I set it up like that : 

Switch VoletRoulant "Volet" <rollershutter> (RDC,Shutters) { rfxcom=">D.7:LIGHTING1.X10:Command", imperihab="room:Bureau,type:DevShutter" }

In this case, I get the right icon in Imperihome, but the button doesn't wotk because OpenHab receives:

Received command (item='VoletRoulant', state='100', class='class org.openhab.core.library.types.PercentType')
[ERROR] [.rfxcom.internal.RFXComBinding] - Message sending to RFXCOM controller failed.
org.openhab.binding.rfxcom.internal.RFXComException: Can't convert 100 to Command

I tried  too use the rfxcom "Shutter" command  :
Rollershutter VoletRoulant "Volet" <rollershutter> (RDC,Shutters) { rfxcom=">D.7:LIGHTING1.X10:Shutter", imperihab="room:Bureau,type:DevShutter" }

but it sent 
ERROR] [.rfxcom.internal.RFXComBinding] - Message sending to RFXCOM controller failed.
org.openhab.binding.rfxcom.internal.RFXComException: Can't convert UP to Shutter

What is the right setup to be able to use the type:DevShutter of Imperihome with X10 device thru RFXCOM controler?

Thanks

John Andrews

unread,
Jun 10, 2015, 4:03:28 PM6/10/15
to ope...@googlegroups.com
I havent got shutters so I never tried it, but should be easy to fix.

In the meantime you could create a ShutterButton device or similar, and then create a rule in openHAB that when 0/100 is recieved actually close/open the shutter.

It's another step/rule, but its a work around until I find the time to fix it (unless someone else wants to push the fix into the repo?)

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Romain GOUYET

unread,
Jun 10, 2015, 4:41:42 PM6/10/15
to ope...@googlegroups.com

In the meantime you could create a ShutterButton device or similar, and then create a rule in openHAB that when 0/100 is recieved actually close/open the shutter.

Thanks for this hint, I now have a good interaction between openhab, rfxcom and Imperihome. But it need to extra setup...
I hope their will be a way to fix that case.

Romain GOUYET

unread,
Jun 10, 2015, 5:58:23 PM6/10/15
to ope...@googlegroups.com
Control is now OK but my item linked with imperihab still have the ON or OFF value, then the actual state is not OK in Imperihome because is only understand a value between 0 or 100 ...

reven

unread,
Feb 8, 2015, 1:36:23 PM2/8/15
to ope...@googlegroups.com
Beta 2
- Added Cameras
- Added Thermostats
- Added support for temperature unit

Beta 3
- Added Shutter stopable
disarmed.png
pincode.png
arming.png
selection.png
3.jpg
5.jpg
ImperiHabBeta03.zip

Torgeir

unread,
Jul 9, 2015, 3:17:43 PM7/9/15
to ope...@googlegroups.com
Thanks for this! Imperihome is a fantastic app to use on wall mounted tabs etc.

Do anyone have an example on how to use (configure) a DevMultiSwitch type item (how do you define the multiple choices)?

A small feature request is adding the DevTempHygro type, this can save some widget space since you can combine both humidity and temperature on the same widget. :-)

John Andrews

unread,
Jul 9, 2015, 3:22:42 PM7/9/15
to ope...@googlegroups.com
Thanks for pointing out DevTempHygro, when I started this I don't believe that was there (I emailed the ImperiHome developer about it and he said it wasn't possible).  Hopefully I'll be able to add this next week (I too have 2 widgets on a dashboard I would like to combine).

I just formatted my machine so need to get the development environment setup again.

--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/TWrvCd1fens/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Ted Loomos

unread,
Aug 14, 2015, 2:06:26 PM8/14/15
to openhab
I was wondering if an answer to this was provided. I have a thermostat with similar settings and can't seem to get it to show up as a thermostat in ImperiHome.

Murk

unread,
Sep 7, 2015, 3:31:42 PM9/7/15
to openhab
Hi reven,

I discovered your binding a couple of days ago and my family loves it because my old Nexus is now serving as a beautiful fool-proof interface between my family and openhab. I played around with several parameters and would also like to display a 'weather station'. However I can not get the devWind device up and running. I have the following items

Number Wind_Direction   "Buiten Windrichting [%.0f °]"  <windspeed>  {weather="locationId=thuis1, type=wind, property=degree"}
Number Wind_Speed   "Buiten Wind [%.1f m/s]"   <windspeed>  {weather="locationId=thuis1, type=wind, property=speed", imperihab="room:buiten,label:wind,direction:Wind_Direction,type:DevWind"}

The Wind_Direction and Wind_Speed show up correctly in Openhab. Is this 2-paramaters item allready supported in Imperihab or am I doing something wrong ?

Great work ! Hope you will continue to support it 


Reply all
Reply to author
Forward
0 new messages