Author Topic: openLuup: ZWay plugin for ZWave.me hardware  (Read 8938 times)

Offline CudaNet

  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #15 on: October 17, 2016, 03:07:01 pm »
Works perfectly ! This event shows the lock being locked from the outside keypad when I left for the office this morning...

Code: [Select]
0 {"invalidateTime":1475762555,"updateTime":1476716350,"type":"string","value":"Keypad Lock Operation"} 200

Plan B workie too?

...you don't have to delete the port_8083 file if you want to retain that for the moment.
openLuup, AltUI, Zway and HomeWave, enough said...

Offline CudaNet

  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #16 on: October 24, 2016, 04:52:51 pm »
Just had to drop in and say that I'm really loving the solution you provided here.. I've been able to isolate a lot of features that weren't available to me on Vera. I'll provide a more detailed write-up for those who have a Schlage and Yale unit once I've had more time.
openLuup, AltUI, Zway and HomeWave, enough said...

Offline jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #17 on: October 30, 2016, 11:49:33 pm »
How does this Zway plugin determine if a sensor is a motion sensor or a door/window sensor?  I have an Ecolink Door/Window Sensor (DWZWAVE2-ECO) that is seen as a motion sensor.  Did it get some information from the Zway server to make it think it is a motion sensor?  If so, what?  And is there any harm in changing the attributes for the device to the door sensor to resolve this?  I can't see anything on the Zway side to change to resolve this.  It seems to see the sensors as binary sensors.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6047
  • Karma: +265/-69
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #18 on: October 31, 2016, 06:40:53 am »
How does this Zway plugin determine if a sensor is a motion sensor or a door/window sensor? 

It uses the same ZWay API as the smarthome web interface (ie. not the advanced one.) 

Quote
I have an Ecolink Door/Window Sensor (DWZWAVE2-ECO) that is seen as a motion sensor.  Did it get some information from the Zway server to make it think it is a motion sensor?  If so, what? 

If the smarthome interface shows it as a motion sensor, then there may be nothing the plugin itself can do about it.  However, to make sure, if you post the output of this URL:

Code: [Select]
http://openLuupIP:3480/data_request?id=lr_zNNN

...replacing openLuupIP with your system's IP and NNN with the device number of the ZWay plugin, then I can ascertain is there's something we can do about it.

Quote
And is there any harm in changing the attributes for the device to the door sensor to resolve this?  I can't see anything on the Zway side to change to resolve this.  It seems to see the sensors as binary sensors.

No harm at all in changing the device_file attribute to a door sensor AFAIK.
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 jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #19 on: October 31, 2016, 11:44:30 am »
Here's the sensor of interest using the lr_z5 request as you mention (full output below).  Is this device wrongly identifying itself as a motion sensor?

{
  "creationTime":1476330511,
  "creatorId":1,
  "deviceType":"sensorBinary",
  "h":-1248874786,
  "hasHistory":false,
  "id":"ZWayVDev_zway_3-0-48-1",
  "location":1,
  "metrics":{
    "icon":"motion",
    "level":"off",
    "probeTitle":"General purpose",
    "scaleTitle":"",
    "title":"Garage Door Sensor"
  },
  "permanently_hidden":false,
  "probeType":"general_purpose",
  "tags":[],
  "updateTime":1477921114,
  "visibility":true
}



Full output of the command in case it helps:

[{
  "creationTime":1476043513,
  "creatorId":7,
  "deviceType":"battery",
  "h":-592588978,
  "hasHistory":false,
  "id":"BatteryPolling_7",
  "location":0,
  "metrics":{
    "level":100,
    "probeTitle":"Battery",
    "scaleTitle":"%",
    "title":"Battery digest 7"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477813556,
  "visibility":true
},{
  "creationTime":1476330581,
  "deviceType":"switchControl",
  "h":1320850420,
  "hasHistory":false,
  "id":"ZWayVDev_zway_Remote_3-0-0-B",
  "location":0,
  "metrics":{
    "change":"",
    "icon":"",
    "level":"on",
    "title":" (3.0.0) Button"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477921056,
  "visibility":true
},{
  "creationTime":1477445425,
  "creatorId":5,
  "deviceType":"text",
  "h":-1261400328,
  "hasHistory":false,
  "id":"InfoWidget_5_Int",
  "location":0,
  "metrics":{
    "icon":"app/img/logo-z-wave-z-only.png",
    "text":"<center>If you still want to use ExpertUI please go, after you are successfully logged in, to <br><strong> Menu > Devices > Manage with ExpertUI </strong> <br> or call <br><strong> http://MYRASP:8083/expert </strong><br> in your browser. <br> <br>You could hide or remove this widget in menu <br><strong>Apps > Active Tab</strong>. </center>",
    "title":"Dear Expert User"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477445425,
  "visibility":true
},{
  "creationTime":1476330511,
  "creatorId":1,
  "deviceType":"sensorBinary",
  "h":-1248874786,
  "hasHistory":false,
  "id":"ZWayVDev_zway_3-0-48-1",
  "location":1,
  "metrics":{
    "icon":"motion",
    "level":"off",
    "probeTitle":"General purpose",
    "scaleTitle":"",
    "title":"Garage Door Sensor"
  },
  "permanently_hidden":false,
  "probeType":"general_purpose",
  "tags":[],
  "updateTime":1477921114,
  "visibility":true
},{
  "creationTime":1476330512,
  "creatorId":1,
  "deviceType":"battery",
  "h":-40289343,
  "hasHistory":false,
  "id":"ZWayVDev_zway_3-0-128",
  "location":0,
  "metrics":{
    "icon":"battery",
    "level":100,
    "probeTitle":"Battery",
    "scaleTitle":"%",
    "title":"Battery (3.0)"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477813556,
  "visibility":true
},{
  "creationTime":1477108159,
  "creatorId":1,
  "deviceType":"switchBinary",
  "h":1135708217,
  "hasHistory":false,
  "id":"ZWayVDev_zway_4-0-37",
  "location":1,
  "metrics":{
    "icon":"switch",
    "level":"off",
    "title":"Plug In Power Switch"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477445426,
  "visibility":true
},{
  "creationTime":1477151255,
  "creatorId":1,
  "deviceType":"switchBinary",
  "h":1164337368,
  "hasHistory":false,
  "id":"ZWayVDev_zway_5-0-37",
  "location":0,
  "metrics":{
    "icon":"switch",
    "level":"off",
    "title":"Porch Light Switch"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477888407,
  "visibility":true
},{
  "creationTime":1477534875,
  "creatorId":1,
  "deviceType":"sensorBinary",
  "h":-315411077,
  "hasHistory":false,
  "id":"ZWayVDev_zway_6-0-48-1",
  "location":0,
  "metrics":{
    "icon":"motion",
    "level":"off",
    "probeTitle":"General purpose",
    "scaleTitle":"",
    "title":"Porch Motion Sensor (6.0.48.1)"
  },
  "permanently_hidden":false,
  "probeType":"general_purpose",
  "tags":[],
  "updateTime":1477888964,
  "visibility":true
},{
  "creationTime":1477534875,
  "creatorId":1,
  "deviceType":"battery",
  "h":-1672745596,
  "hasHistory":false,
  "id":"ZWayVDev_zway_6-0-128",
  "location":0,
  "metrics":{
    "icon":"battery",
    "level":100,
    "probeTitle":"Battery",
    "scaleTitle":"%",
    "title":"Battery (6.0)"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477812946,
  "visibility":true
},{
  "creationTime":1477664447,
  "creatorId":8,
  "deviceType":"switchControl",
  "h":-311605833,
  "hasHistory":false,
  "id":"ZWayVDev_zway_Remote_6-0-0-B",
  "location":0,
  "metrics":{
    "change":"",
    "icon":"",
    "level":"on",
    "title":" (6.0.0) Button"
  },
  "permanently_hidden":false,
  "probeType":"",
  "tags":[],
  "updateTime":1477888764,
  "visibility":true
}]

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6047
  • Karma: +265/-69
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #20 on: October 31, 2016, 12:01:37 pm »
Yes, that looks like a general purpose binary sensor. 

I've changed the appropriate device attributes:
  • device_file to D_DoorSensor1.xml
  • device_json to D_DoorSensor1.json

for a similar sensor on my development machine and that has the desired effect.
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 jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #21 on: December 10, 2016, 11:24:11 pm »
Is there any way to get this virtual button push in Z-way to somehow trigger a scene in openLuup?  This is from a HomeSeer dimmer with a 2 button push:

Code: [Select]
[2016-12-10 19:14:14.088] [D] [zway] RECEIVED: ( 01 0B 00 04 00 09 05 5B 03 13 03 01 B5 )
[2016-12-10 19:14:14.088] [D] [zway] SENT ACK
[2016-12-10 19:14:14.088] [D] [zway] SETDATA controller.data.incomingPacket.nodeId = 9 (0x00000009)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA controller.data.incomingPacket.frameType = "singlecast"
[2016-12-10 19:14:14.088] [D] [zway] SETDATA controller.data.incomingPacket = **********
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.9.data.lastReceived = 0 (0x00000000)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.9.instances.0.commandClasses.91.data.sequence = **********
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.1.instances.0.commandClasses.91.data.srcNodeId = 9 (0x00000009)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.1.instances.0.commandClasses.91.data.srcInstanceId = 0 (0x00000000)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.1.instances.0.commandClasses.91.data.keyAttribute = 3 (0x00000003)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.1.instances.0.commandClasses.91.data.currentScene = 1 (0x00000001)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.9.instances.0.commandClasses.91.data.keyAttribute = 3 (0x00000003)
[2016-12-10 19:14:14.088] [D] [zway] SETDATA devices.9.instances.0.commandClasses.91.data.currentScene = 1 (0x00000001)
[2016-12-10 19:14:14.106] [I] [core] Notification: device-info (device-OnOff): {"dev":" (9.0.0.1) Button","l":"on"}

Ideally there would be some way to know the keyAttribute since that changes based on how many times the button is pushed.  Also, the button is never turned off - if the opposite side of the paddle is pushed, button 9.0.0.2 gets the "on" instead of 9.0.0.1.  As far as I can tell no "off" is ever sent.  So I need some way to detect this message and act on it without depending on the state of this device.

thanks

Offline jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #22 on: December 11, 2016, 01:11:43 pm »
One more question on this: is there a way to see the virtual devices in Z-way in openLuup?  That would also be useful although it doesn't solve the problem above since they don't seem to see the keyAttribute.  Thanks.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6047
  • Karma: +265/-69
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #23 on: December 11, 2016, 04:18:55 pm »
Is there any way to get this virtual button push in Z-way to somehow trigger a scene in openLuup?  This is from a HomeSeer dimmer with a 2 button push:

[...]

Ideally there would be some way to know the keyAttribute since that changes based on how many times the button is pushed.  Also, the button is never turned off - if the opposite side of the paddle is pushed, button 9.0.0.2 gets the "on" instead of 9.0.0.1.  As far as I can tell no "off" is ever sent.  So I need some way to detect this message and act on it without depending on the state of this device.

Indeed, it seems that the ZWay Virtual device interface, doesn't report the value of some switches.  What I have tried to do, in some cases, is to update the "LastTrip" variable with the time of the change.  This way, you can, at least, trigger a scene.

One more question on this: is there a way to see the virtual devices in Z-way in openLuup?  That would also be useful although it doesn't solve the problem above since they don't seem to see the keyAttribute.

My approach with the ZWay plugin has been to try and emulate the arrangement of devices which Vera shows when presented with the same ZWave device.  This, however, turns out to be hard, if not impossible, in any generic way, and it seems as though Vera has a large look-up table, manufacturer dependent, to define how it should look.  So, at the moment, the emulation is imperfect to say the least.

Having said that, your question prompts to to investigate further the initial thoughts I had for this interface, and that would be simply to echo the appearance of the ZWay virtual device interface.  This leads to single devices presenting individual sensors as separate (child?) devices.  It would seems to be a much more straight-forward approach and I might give that a go in the next few weeks.  It would means that things would be less Vera-like, but so what?

However, it does also seem that the ZWay Virtual Device API is both incomplete and imperfectly implemented, so some things just don't seem to work from their own software.  However, perhaps we can hope that this improves in time (faster than Vera's firmware does.)

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 logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #24 on: December 11, 2016, 04:49:54 pm »
Quote
My approach with the ZWay plugin has been to try and emulate the arrangement of devices which Vera shows when presented with the same ZWave device.  This, however, turns out to be hard, if not impossible, in any generic way, and it seems as though Vera has a large look-up table, manufacturer dependent, to define how it should look.  So, at the moment, the emulation is imperfect to say the least.

I think I am facing same issue with my Domoticz bridge.... no perfect match at all but I became impressed with openZwave embedded into Domoticz... up to date with new devices and though it does not yet support scene controllers, even Fibaro Buttons work well through associations... That's why I am spending a lot of efforts right now at making my DomoticzBridge plugin more robust. ..
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.

Offline jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #25 on: December 16, 2016, 12:24:46 pm »
I think it would be helpful to be able to see and access the child devices as in Z-way, but I agree it's not perfect.  In this particular case, as far as I can tell, Z-way doesn't retain the keyAttribute anywhere, so I did the ugly brute force approach and created a script that tails the Z-way log file and watches for the central scene command class messages to float by.  It works...

Offline jswim788

  • Hero Member
  • *****
  • Posts: 753
  • Karma: +51/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #26 on: February 02, 2017, 08:16:38 pm »
Has anyone tried the new v2.3.0 Z-way code?  It adds central scene keyAttribute via an 'n-state' vDev - this will be very useful with Homeseer switches and other other switches that support central scene.

Offline CudaNet

  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #27 on: February 02, 2017, 10:07:26 pm »
I upgraded to 2.3.0 (was 2.2.3) last Saturday. It's an improvement (stable) and it seems to have resolved the interview issue (having to re-interview specific devices after a set period of time) but I can't see any state changes for locks and GE binary/dimmer switches (which I was using Niffler). PoltoS is/was looking into it, logs submitted and he indicated he would implement differently which leads me to believe they have more developers assisting with code.

Has anyone tried the new v2.3.0 Z-way code?  It adds central scene keyAttribute via an 'n-state' vDev - this will be very useful with Homeseer switches and other other switches that support central scene.
openLuup, AltUI, Zway and HomeWave, enough said...

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6047
  • Karma: +265/-69
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #28 on: February 03, 2017, 03:26:22 am »
I must give this a go ... was waiting for favourable reports for the update!
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 CudaNet

  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #29 on: February 03, 2017, 09:14:48 am »
AK,

Hope all is well, I haven't been on as much lately due to work and our re-org/management shakeup (it's been insane)... Yes, 2.3.0 has lots of changes and fixes. Just make sure to backup the z-wave network beforehand. I've only been using this release for a week but so far so good as I can live with the locks not giving a status update (can still control them though). The ExpertUI is now sluggish (e.g Routing) but it's rare to have visit that area. Perhaps they'll perform a maintenance release and things will be near perfect. Did you end up upgrading to V2 of the board?

--CN

I must give this a go ... was waiting for favourable reports for the update!
openLuup, AltUI, Zway and HomeWave, enough said...