We have moved at community.getvera.com

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

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #30 on: February 03, 2017, 10:03:52 am »
@CudaNet

Hi there.  Yes, all OK, except that my Arduino Yun has just given up the ghost.  So now looking at putting a MySensors gateway natively on the RPi or BBB before I can play with 2.3.0.   No, didn't get the latest board, yet.

Still thinking about refactoring the ZWay plugin to simply mirror the simple interface rather than trying to emulate Vera so much.  Your thoughts?
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

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #31 on: February 11, 2017, 09:46:27 am »
@Akbooer,

So what exactly is happening to the Arduino? I'm curious as I want to start using them to manage my ductless units (pretty cool write up by someone on here) - also WAY cheaper than buying Mitsubishi thermostats and wireless controller ($250 USD) for each unit. I can say that all of my RPI's are still running strong but in fairness, you've had that Arduino way longer than any of my Pi's...

As for refactoring, I'm all in... I think it's a great idea .. Just let me know how I can help...

--CN

@CudaNet

Hi there.  Yes, all OK, except that my Arduino Yun has just given up the ghost.  So now looking at putting a MySensors gateway natively on the RPi or BBB before I can play with 2.3.0.   No, didn't get the latest board, yet.

Still thinking about refactoring the ZWay plugin to simply mirror the simple interface rather than trying to emulate Vera so much.  Your thoughts?
openLuup, AltUI, Zway and HomeWave, enough said...

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #32 on: February 11, 2017, 10:06:14 am »
So what exactly is happening to the Arduino?

The problem seem to be with the Atheros processor on the Yun board, not the actual Arduino chip itself. (There's a fizzing sound when the power is applied... not good!)

All of my other MySensor devices with mini- and nano- Arduinos are rock solid, and have been since the day I built/installed them.

The Yun board was convenient because it could run both the gateway and openLuup on the two separate processors.  But now things have moved on: you can't buy a Yun here in Europe, and you can now directly connect a radio to the RPi.
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: 809
  • Karma: +58/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #33 on: February 11, 2017, 04:09:32 pm »
The new Zway 2.3.0 supports central scene through virtual devices that have the 'metrics.level' (see https://forum.z-wave.me/viewtopic.php?f=3419&t=24449#p67128).  Can we get that exposed through the Zway plugin?  Thanks.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #34 on: February 11, 2017, 04:15:59 pm »
The new Zway 2.3.0 supports central scene through virtual devices that have the 'metrics.level' (see https://forum.z-wave.me/viewtopic.php?f=3419&t=24449#p67128).  Can we get that exposed through the Zway plugin?  Thanks.

Ooh, that sounds interesting.  I'll take a look.
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

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #35 on: February 12, 2017, 10:41:24 am »
Many thanks for that, I'll go ahead and move forward with the Arduino.

So what exactly is happening to the Arduino?

The problem seem to be with the Atheros processor on the Yun board, not the actual Arduino chip itself. (There's a fizzing sound when the power is applied... not good!)

All of my other MySensor devices with mini- and nano- Arduinos are rock solid, and have been since the day I built/installed them.

The Yun board was convenient because it could run both the gateway and openLuup on the two separate processors.  But now things have moved on: you can't buy a Yun here in Europe, and you can now directly connect a radio to the RPi.
openLuup, AltUI, Zway and HomeWave, enough said...

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #36 on: March 01, 2017, 09:04:29 am »
Just a quick update..

PoltoS confirmed they'll look into the lock issue (which they introduced; Schlage and Yales) but I'm concerned for others who may be using Niffler for GE/Jasco products. I've been slowly moving all my Jasco switches over to my parents house and opting for Leviton's with instant status.

Aside from that, 2.3.0 is very stable.. I've not had to re-interview devices (a terrible bug) so that's good news. IF only they'd correct Niffler and lock support..

--CN

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 jswim788

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +58/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #37 on: March 27, 2017, 04:14:45 pm »
The new Zway 2.3.0 supports central scene through virtual devices that have the 'metrics.level' (see https://forum.z-wave.me/viewtopic.php?f=3419&t=24449#p67128).  Can we get that exposed through the Zway plugin?  Thanks.

Ooh, that sounds interesting.  I'll take a look.
Just wondering if you had a chance to look at the central scene activity from the virtual devices in Z-way 2.3.0?  Thanks!

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #38 on: March 27, 2017, 04:36:58 pm »
I did upgrade but am yet to look seriously at it.  At the same time I also transferred by MySensors gateway to the RPi and that's giving me a bit of grief.

What's the easiest way to set up a test for this, do you think?
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: 809
  • Karma: +58/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #39 on: March 28, 2017, 08:23:15 pm »
Note that Z-way 2.3.1 is now out.  Looks like they fixed the lock problem reported by @CudaNet: https://forum.z-wave.me/viewtopic.php?f=3417&t=24713

Offline jswim788

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +58/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #40 on: April 21, 2017, 11:32:50 pm »
I'm trying to use the method below in a lua script.  It works fine in a browser, but I always get a timeout with a script such as this in the AltUI test code window.  Any ideas?  Thanks.

Code: [Select]
local http = require ("socket.http")
http.TIMEOUT = 5
local result, status, content = http.request("http://192.168.1.205:3480/ZWaveAPI/Run/devices[17].Alarm.data.V1event")
print("Status:" .. status)
if status == 200 then
  local json = require("dkjson")
  local obj, pos, err = json.decode(result)
  if err then
    print("json decode error: " .. err)
  else
    print("obj is " .. obj.updateTime)
  end
end

OK, plan B (even better, might actually work, it does for me, but, there again, so did plan A) ...

  • update openLuup from the development branch
  • add the attached file as /etc/cmh-ludl/cgi/zway_cgi.lua (NB. with the .lua extension)
  • delete /etc/cmh-ludl/cgi/port_8083

Now, any Zway-related requests made to port 3480 are simply relayed to the ZWay interface on port 8083, no special syntax required.

Code: [Select]
http://openLuupIP:3480/ZWaveAPI/Run/devices

Better luck this time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #41 on: April 22, 2017, 04:04:32 am »
Never use socket.request() in openLuup to access the same IP and port as openLuup itself.  It will always deadlock.

It is for this reason that luup.inet.wget() exists, but note that the return parameters are in a different order.  Try that instead.
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: 809
  • Karma: +58/-2
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #42 on: April 22, 2017, 12:51:27 pm »
Thank you.  That works.  This is ridiculously complex, but it works: Door lock Z-wave -> Z-way server -> Niffler -> Z-way server -> Z-wave query -> Z-way server -> openLuup scene -> Z-way server query -> openLuup scene -> openHAB -> DSC Alarm panel.   :)
It is for this reason that luup.inet.wget() exists, but note that the return parameters are in a different order.  Try that instead.

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #43 on: September 20, 2017, 10:11:12 pm »
Hi AK,

With the latest AltUI version (v2129) I noticed that my Z-way communication seems to be having an issue. So I checked the logs (openLuup v17.3.9) after a reload and ...

Code: [Select]
2017-09-20 20:53:20.260   luup.chdev.sync:: [118]  63: Garage  Combo, syncing children
2017-09-20 20:53:20.260   luup.chdev.sync:: [143]  71: Master Dimmable, syncing children
2017-09-20 20:53:20.260   luup.chdev.sync:: [147]  72: Media Dimmable, syncing children
2017-09-20 20:53:20.260   luup.chdev.sync:: [151]  76: Repeater (Den), syncing children
2017-09-20 20:53:20.260   luup.chdev.sync:: [148]  75: Doorbell, syncing children
2017-09-20 20:53:20.260   luup.chdev.sync:: [152]  77: Repeater (Master), syncing children
2017-09-20 20:53:20.260   luup.chdev.sync:: [137]  67: Hallway Plug, syncing children
2017-09-20 20:53:20.261   luup.chdev.sync:: [141]  69: West Landscape, syncing children
2017-09-20 20:53:20.261   luup.chdev.sync:: [145]  74: North Landscape, syncing children
2017-09-20 20:53:20.261   luup.chdev.sync:: [157]  46: Garage Binary, syncing children
2017-09-20 20:53:20.261   luup.chdev.sync:: [146]  73: Laundry Dimmable, syncing children
2017-09-20 20:53:20.261   openLuup.context_switch::  ERROR: ./L_ZWay.lua:1034: attempt to index local 'this' (a nil value)
2017-09-20 20:53:20.261   openLuup.scheduler:: job aborted : ./L_ZWay.lua:1034: attempt to index local 'this' (a nil value)

Lots/perhaps all of my Z-way devices are not reporting but scenes are operating as my outside lights are coming on and off per schedule. Just don't see updates (all my sensors indicate the last update was yesterday when I performed the AltUI upgrade). Let me know if you need more detail.

Thanks
--CN
openLuup, AltUI, Zway and HomeWave, enough said...

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup: ZWay plugin for ZWave.me hardware
« Reply #44 on: September 21, 2017, 12:47:47 pm »
(Thanks for your reminder on another thread.)

This appears to be related to a non-existent node.  Can you check the attributes of the ZWay child nodes (or maybe just one) and see that the do, indeed, refer to the ZWay device?

I'm a bit stumped as to how an AltUI version change can do this, but...

(I'm running the latest AltUI in my development system, but not currently with ZWay.)
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.