We have moved at community.getvera.com

Author Topic: VeraLite to Openhab conversion (using raspberry pi and razberry board)  (Read 138563 times)

Offline lolodomo

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #300 on: January 04, 2015, 06:29:30 am »
Thanks you Lolodomo.

I saw Guessed talked about a documentation, but I wasn't be able to find it.
I'm reviewing the 20 pages posts to find how to declare items :)

openHAB wiki page: https://github.com/openhab/openhab/wiki
MiOS binding wiki page: https://github.com/openhab/openhab/wiki/MiOS-Binding

In the Micasaverde wiki, there is a page ( http://wiki.micasaverde.com/index.php/OpenHAB ) with a lua script allowing to build initial files from the Vera setup. That could be a good start point.

Then openHAB 1.x requires time to understand and adjust config files for personal UI and rules. The openHAB wiki can help a lot for that. For rules, that is not always easy to know what can be done and what cannot be done, or what syntax to use.

PS: discussion in french still possible in the "other" forum :)
« Last Edit: January 04, 2015, 06:34:16 am by lolodomo »

Offline macfly92

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #301 on: January 04, 2015, 06:35:39 am »
Then openHAB 1.x requires time to understand and adjust config files for personal UI and rules.

Yeah I have already a OpenHab setup that handle my Philips HUE lights. It is a bit tricky :) It is for testing purpose ATM.

Thanks you for infos Lolodomo, this is a good start !

Offline guessed

  • Moderator
  • Master Member
  • *****
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #302 on: January 04, 2015, 11:24:17 am »
The one "main" update problem that's left occurs when editing the item files.  When this is done, openHAB is triggering a repository reload, which throws away the current value of each of the items and/or restores them from the Persistence layer (it's been a while, I can't remember which) but there's obviously no value for "new" Items, and won't be until they change.

Isn't it possible that you simply apply the same treatment as when openHAB is starting, that is fetching all values from the Vera ?

Yes, and no.  I use RRD for persistence, and it looks like some things (dates?) aren't persisted correctly.  If I rerun the entire sequence then those will get reloaded, which might trigger their Rules....

Still thinking about the right way to do this.  I may do it that way, but to avoid the RRD persistence bug I'd prefer something with a more localized impact.

Offline lolodomo

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #303 on: January 04, 2015, 01:20:34 pm »
In my case, I don't apply persistence on most of my items, I only use persistence (rrd) for few items like temperatures & humidities for which I want to display charts.

Offline guessed

  • Moderator
  • Master Member
  • *****
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #304 on: January 04, 2015, 06:11:25 pm »
Hi @macfly

The version available @ https://app.box.com/s/fbmp3b11sx3b9mtwxui5 is a recent patched version produced by @guessed for me to test few fix/enhancements.
I think the right place to download the last official Mios binding version is in the openHAB nightly builds. @guessed provided the right link few messages before.
But I am still running the version downloaded from app.box.com !

If you're using the cloudbees version, sometimes you'll have to navigate the current builds in order to get to the 1.7.0 version (vs the 1.6.1 version).  There are "Build History" links on the left that can be used to page through the latest build sets:

    https://openhab.ci.cloudbees.com/job/openHAB/

The Box.net version doesn't have some of the latest changes, mostly minor stuff, but it's missing things like the new ServiceId aliases (openHAB PR #1909)

Offline macfly92

  • Full Member
  • ***
  • Posts: 132
  • Karma: +1/-0
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #305 on: January 09, 2015, 05:20:26 pm »
It appear that modifying item's file while OpenHAB is running load the new items but destroy all the Vera status until the state of each item changed.

Maybe try to restart OpenHAB after editing the items file, because the Vera's states are correctly loaded at startup.

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #306 on: January 13, 2015, 01:54:33 am »
guessed,

Thanks for the information on the Odroid C1. I have been eyeing it for some time. Right now I have been running my OpenHAB test instance on a VM which is working well. I may move it over to something more dedicated. My OpenHAB instance is no where near production ready. I still have a lot to learn and am currently working on writing getting my ISY controller integrated.

For the ISY integration, I am not writing a direct plugin for OpenHAB. Since OpenHAB2 changes how the plugins work and I do not have time to figure out how the plugins work in OpenHAB1, I will be writing separate code to tie it in. The code will be written in node.js and communicate via mqtt. I have a proof of concept running and listening for events on the ISY and passing them along to mqtt which is running on the same instance as OpenHAB. I then have OpenHAB listen to messages via mqtt. So far it looks very promising. I now have some code that will take commands from OpenHAB and pass them to the ISY via mqtt and the ISY rest api. Right now I am struggling with mappings in OpenHAB and trying to figure out the best way to handle some of the controls. As soon as I have something decent I will be posting the code for others to use.

Hopefully I can get the rest of my OpenHAB instance running with rules etc and just have my vera act as a zwave gateway and all other functions via OpenHAB. I may be picking your brain a little on thoughts / opinions for my ISY tie in and the inner workings of OpenHAB.

- Garrett

Offline shmixx

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #307 on: January 22, 2015, 09:31:42 pm »
Aha, gotcha. Is it possible this could also further enhance the viability of a dimmer switch having an on/off/dim level setting? I know we would likely still need a mapping for the dimmer, but it makes me think I could add 2 buttons to a single line or choose a percent item, allowing me to turn on/off and set a dim level with a single item? In this case allowing something other than just a Dim level being called to a dimmer? I really wish OH would plumb in this capability to simply map 2 devices to a single item, or a single sitemap item at least for dimmers rather than 2 switches. Same boat with the arm/disarm trip/untrip of motion sensors, contact sensors, etc.

I guess these are complaints of a strictly ZWave compliant HA setup vs the vast majority of integrations for bindings others are using. ;)

Offline guessed

  • Moderator
  • Master Member
  • *****
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #308 on: January 22, 2015, 09:44:17 pm »
Aha, gotcha. Is it possible this could also further enhance the viability of a dimmer switch having an on/off/dim level setting? I know we would likely still need a mapping for the dimmer, but it makes me think I could add 2 buttons to a single line or choose a percent item, allowing me to turn on/off and set a dim level with a single item? In this case allowing something other than just a Dim level being called to a dimmer? I really wish OH would plumb in this capability to simply map 2 devices to a single item, or a single sitemap item at least for dimmers rather than 2 switches. Same boat with the arm/disarm trip/untrip of motion sensors, contact sensors, etc.

I guess these are complaints of a strictly ZWave compliant HA setup vs the vast majority of integrations for bindings others are using. ;)

The openHAB SiteMap UI will still restrict you to one-item-per-line, and that Item can only have a single-value at any time (well, except Color, where it has RGB).

This is more about needing to call things, like Say, via a script where the "binding" can't [natively] handle that it has more than one parameter that might need to be bound to the arguments (or that it would be convoluted if it did)

Offline jpete7683

  • Sr. Member
  • ****
  • Posts: 363
  • Karma: +10/-9
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #309 on: January 23, 2015, 02:45:52 pm »
I am proud to announce that I have been running stable for a little over 4 months using this binding.  I originally used the razberry board but realized that the Vera Unit has a much better z-wave chip in it.  This binding has allowed me to take a once crashing VeraLite with all of the automation loaded on it, split the automation onto an ubuntu system and just keep z-wave components on the VeraLite.  I am now 4 months and running without a single crash on the Veralite and without any issues to speak of with the vera openhab binding.  Amazing work @Guessed!
I am the developer of iViri.  iViri is available in Apple Store.  Check out its Voice Control and Geofence integration, which causes less battery drain than the other options for locating an iphone.

Offline guessed

  • Moderator
  • Master Member
  • *****
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: VeraLite to Openhab conversion (using raspberry pi and razberry board)
« Reply #310 on: January 29, 2015, 11:59:00 am »
Folks,
We now have a dedicated openHAB MiOS Binding sub-forum for this discussion, so I'm going to lock this thread while I (mostly) pull it apart into the relevant sub-threads.

Please feel free to post new threads in the [above] openHAB MiOS Binding sub-forum, or to contribute to the ones already there.