We have moved at community.getvera.com

Author Topic: Plugin: Razberry support for openLuup/ALTUI  (Read 27096 times)

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Plugin: Razberry support for openLuup/ALTUI
« on: July 07, 2016, 02:54:23 pm »
as part of ALTUI package, I am adding a Razberry (http://razberry.z-wave.me/) support to build a fully autonomous zwave controller

WHAT DO YOU NEED
it will work on a platform made of a rasberry PI2 card and openLuup framework.

HOW TO INSTALL
prerequisite setup: a working OS, a working openLuup system, a working ZWAY software on http://<ip>:8083/smarthome/#/dashboard and on http://<ip>:8083/expert/#/

Installation: this is available in the ALT App Store ( as it runs only on openLuup , it wont work on VERA ).

FOR WHO
For now this is ALPHA, it is only recommended to technical users. it will be very disappointing for non techy users at this point. but it will improve
warning: until development stabilizes I cannot garantee compability between various versions

until I am in development mode it will be available to all in full open source mode, but once a critical mass of functionality is there, I will restrict it to registered users of ALTUI. Commercial use forbidden unless formally agreed otherwise.

I am open to any contributions from the community ( actually it would be cool to increase device support coverage ) and will offer ALTUI registration to significant contributors

WHAT IT DOES NOT DO (yet)
- Inclusion Exclusion : you have to do this using zway software
- various admin functions

WHAT IT INTENDS TO DO
- detect zwave devices and try to create the most appropriate VERA style shadow devices for it with the usual UPNP services and variables
- create a default dummy device otherwise
- updates status and run actions on these devices
- classical ALTUI features ( scene workflows watches etc )

WHAT WORKS SO FAR
- Fibaro Wall Plug:  on off status & actions, wattage display
- Fibaro Window Sensor : tripped status, armed status, lasttrip support
- Battery device battery level reporting

HOW TO CONTRIBUTE
a) bug fixes

b) making sure the cmd class decodes is correct and exhaustive to mimick Vera behavior and variables ( not trivial as not documented and sometime variable are only Vera's concept. like "Armed" for sensors

c) adding new zwave command class decodes

d) having a smart device recognition logic which create the right device type and variables at creation time ( when we got zway devices and sync the vera devices ), need to be a table driven algorythm so that later one we can deport it into a web service for instance to allways have an up to date table

e) implementing and adding more UPNP vera device actions into the ActionMap data structure

f) testing with more devices.

in case of issues, try to capture the result of http://<ip>:8083/ZWave.zway/Data/0 and send along with your bug report
« Last Edit: July 07, 2016, 03:17:17 pm by amg0 »

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +15/-5
  • Black Cat Control Systems
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #1 on: July 07, 2016, 06:03:01 pm »
This is great news, can you provide a link to your App Store?



Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline ShawnParr

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +4/-1
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #2 on: July 07, 2016, 06:34:35 pm »
Just ordered a Razberry board, and paid extra for Saturday delivery!  :)

I'm keeping this 100% isolated from my Vera Plus. Tonight (and maybe tomorrow depending on my luck) I'm going to see if I can get the Caseta plugin working on OpenLuup without the Vera Bridge bringing it along. Long term I'm hoping this can replace the buggy Vera (unless they actually fix the plus, then I'll let them play together). Otherwise I may have to finally learn some python and play with Home-Assistant.

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #3 on: July 07, 2016, 07:03:36 pm »
I have a spare rPi so I just placed my order for the raz... Have numerous/various z-wave products I can work with to assist in support.
As always, outstanding work...
openLuup, AltUI, Zway and HomeWave, enough said...

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #4 on: July 08, 2016, 02:34:24 am »
This is great news, can you provide a link to your App Store?
The App Store is built in altUI as a App Store page.
You do need ak's altappstore Lua plugin also

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #5 on: July 08, 2016, 02:49:31 am »
This is great news, can you provide a link to your App Store?
The App Store is built in altUI as a App Store page.
You do need ak's altappstore Lua plugin also

The latest openLuup versions include a pre-loaded AppStore plugin (required anyway to make AltUI updates!)

The plugin can update itself either from the Updates page (easiest and preferred method) or from the AppStore (if you specifically wanted to upload an old version for some reason.)
« Last Edit: July 08, 2016, 02:54:10 am by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline martynwendon

  • Full Member
  • ***
  • Posts: 120
  • Karma: +15/-1
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #6 on: July 08, 2016, 04:49:32 am »
Interesting, how are you handling status updates from Z-Way?  Polling or something on Z-Way to push them to altUI?

As an aside if you didn't already know, Z-Way is probably the most technically complaint Z-Wave controller there is and the way they approach Inclusion of devices is outstanding.  By splitting out the management of Z-Wave from the UI itself it means devices should always Include correctly and be fully exposed at the protocol level.

Essentially they use the Inclusion process to create entities to match every Command Class that the device reports to support - it's then up to the UI to interpret those and create a UI device for each - and then finally up to the end-user to disable / delete anything that they don't need.  This approach means that you will often get duplication, for example where the device supports multiple Command Classes that do similar things (for example Basic Command Class for a PIR as well as Notification Command Class).  But that's a much better way to handle things than other controllers that may just present a single or subset of functions from a complicated device.

Once you know your way around the ExpertUI of Z-Way and how the front-end (simple) UI works you can pretty much get *any* Z-Wave device fully functional - I tested recently with a lot of funky devices that prove problematic in other controllers - MS6, Fibaro Motion (with tamper, vibration, acceleration, etc), Qubino devices (with multiple inputs, multi-instance end-points, etc) and managed to get them all working well.

So an altUI / openLuup / Z-Way mash-up has a great deal of promise IMO  ;D

Offline d55m14

  • Sr. Member
  • ****
  • Posts: 449
  • Karma: +8/-1
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #7 on: July 08, 2016, 05:41:44 am »
Hi amg0 it's fantastic ,

I asked akbooer about this solution and its feasibility some posts ago .
I'm very interested to partecipate to the tests .

Donato

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #8 on: July 08, 2016, 04:32:00 pm »
I asked akbooer about this solution and its feasibility some posts ago .

Yes, and at that point I said:

Other radio protocols, like the one used by MySensors Arduino and similar solutions, are also easily supported by the appropriate plugin.  In fact, that plugin shows just how easy it should be to decouple any protocol from openLuup
...
So all you need is a ZWave to IP (or serial) bridge with a coherent API and you can link it to openLuup.   For the time being, Vera is the only ZWave bridge in openLuup.

...and way back last year I also said:

I've taken a look at USB sticks, and the Razberry, and for the most part they seem to support a fairly low-level serial protocol.  There is a Zway library which also supports a higher-level JSON interface, which I think would be the one to use.  But it would be a lot of work, which, for the moment, I'm not considering. 

...so the only change is that @amg0 has actually 'bitten the bullet' and made a start!


« Last Edit: July 08, 2016, 05:02:14 pm by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +15/-5
  • Black Cat Control Systems
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #9 on: July 08, 2016, 08:50:08 pm »
I'm a bit confused here as to the setup procedure.


I have RP2 with Z Wave daughter board and Z-Wave whatever loaded and am starting from the opposite end.
I'm not clear on how to load OpenLuup and ALTUI onto it and make them work?

Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #10 on: July 09, 2016, 02:51:13 am »
Use the documentation on GitHub to do a baseline install of openLuup.  It's nowadays very easy:
  • three commands to install the Lua libraries you need...
    • # apt-get install lua-socket
    • # apt-get install lua-filesystem
    • # apt-get install lua-sec
  • run the install script in openLuup_install.lua from GitHub...
    • # lua5.1 openLuup_install.lua

... leaves you with a new openLuup system, running AltUI, with the AltAppStore plugin installed.
« Last Edit: July 09, 2016, 03:14:34 am by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1224
  • Karma: +15/-5
  • Black Cat Control Systems
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #11 on: July 09, 2016, 02:56:55 am »
I appreciate all our help, now and in the past but..... is this all a fresh install or am I overwriting the ZWave.me install?
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #12 on: July 09, 2016, 05:12:41 am »
I appreciate all our help, now and in the past but..... is this all a fresh install or am I overwriting the ZWave.me install?

It is parallel , the 2 do not interfere at install time. Get a working openLuup & altUI first following ak's doc and you should be running

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #13 on: July 09, 2016, 04:46:22 pm »
Install was very straightforward.

[1] Loaded my Raspbian turn-key image to my spare Pi2.
[2] With the unit powered down, inserted the daughter board within the proper GPIO slot (will include photo if anyone is in question where to insert).
[3] Booted the Pi.
[4] Installed z.way > wget -q -O - http://razberry.z-wave.me/install | bash
[5] Loaded latest v8(dev branch) openLuup files. Reload..
[6] Navigated to App Store and installed RaZberry (ALPHA).
[7] Navigatedt http://{ip_address}:8083 and setup my admin password.
[8] Added my Admin password within AltUI/RaZberry.

I navigated to http://{ip_address}:8083 then Network Control. I first started an exclusion for my MultiSensor 6. Then ran the inclusion.
Puts a major shame on MCV... I added a few screen shots... Looks like a single device was created (Routing Multilevel Sensor_2) within AltUI. I'll add more screen shots...
« Last Edit: July 09, 2016, 05:02:04 pm by CudaNet »
openLuup, AltUI, Zway and HomeWave, enough said...

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Plugin: Razberry support for openLuup/ALTUI
« Reply #14 on: July 09, 2016, 04:49:25 pm »
And the device within AltUI. Edit: Added logs... If anyone is adding logs be careful to remove your credentials (Admin password) from the log...
« Last Edit: July 09, 2016, 05:38:32 pm by CudaNet »
openLuup, AltUI, Zway and HomeWave, enough said...