We have moved at community.getvera.com

Author Topic: openLuup: Suggestions  (Read 25363 times)

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Suggestions
« Reply #150 on: June 17, 2018, 02:57:30 pm »
Can't be done that way because it needs to work for arbitrary implementation files and also for devices which don't have any implementation at all.

As I said, there's no difficulty in how to implement it.  It's already done.
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 rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: openLuup: Suggestions
« Reply #151 on: November 01, 2018, 12:09:34 am »
@akbooer,

One potentially crazy idea: Have you ever thought of integrating OpenZWave into openLuup? I see that there is a lua wrapper for it on github but it appears quite old.

https://github.com/OpenZWave/OZW4Lua
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Suggestions
« Reply #152 on: November 01, 2018, 06:04:42 am »
One potentially crazy idea: Have you ever thought of integrating OpenZWave into openLuup? I see that there is a lua wrapper for it on github but it appears quite old.

I looked very carefully at this and all the other options, and eventually settled on the Zwave.me stick (and/or Razberry board) because of the simplicity of its ZWay API, when I was looking for a Vera replacement.

My only use for Vera, now, is as a Zwave gateway, accessed through the VeraBridge plugin.  Similarly the Zwave.me USB stick has the ZWay plugin.  In like manner, it would certainly be possible to write a plugin to interface to any OpenZWave hardware, but it would be a fair amount of work.

My priority is actually to rewrite the current ZWay plugin to make it more comprehensive and more like the VeraBridge in functionality, including rooms and scenes, plus the potential for multiple ZWave networks from a single controller.
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 rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: openLuup: Suggestions
« Reply #153 on: November 01, 2018, 09:52:40 am »
Thanks AK. I can see that it would be quite a bit of work.
Having had OpenZWave and Z-way up as secondary zwave controllers on my network, I am finding that they each have their pros and cons. OpenHab, Homeassistant and a number of others actually use OpenZWave as their zwave api. It seems to be a lot more active and is open source unlike zway. The big advantage I found with it is the secure class key which can be manually configured. Zway currently does not support this and therefore cannot control any of my secure class devices on my network. Only OpenZWave and Vera can. I have been struggling to get any support from the zway forum. It has other advantages though in terms of UI but homeassistant/openzwave is catching up fast. One can now manually assign associations like on the Zway.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline martynwendon

  • Full Member
  • ***
  • Posts: 120
  • Karma: +15/-1
Re: openLuup: Suggestions
« Reply #154 on: November 01, 2018, 12:54:43 pm »
The big advantage I found with it is the secure class key which can be manually configured. Only OpenZWave and Vera can.

Out of interest, did you manage to extract the Security key from Vera? Or configure Vera with a different key from a different network?

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: openLuup: Suggestions
« Reply #155 on: November 01, 2018, 05:47:09 pm »
Yes, I extracted the key from the vera. I opened a ticket with CC and one agent was kind enough to point me to where it is.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline martynwendon

  • Full Member
  • ***
  • Posts: 120
  • Karma: +15/-1
Re: openLuup: Suggestions
« Reply #156 on: November 01, 2018, 06:13:59 pm »
Yes, I extracted the key from the vera. I opened a ticket with CC and one agent was kind enough to point me to where it is.

Care to share the method? By PM if needed ..... I've been trying to do this to allow my ZNiffer to decode Secure device communications, but couldn't see the key in any obvious locations.

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: openLuup: Suggestions
« Reply #157 on: November 01, 2018, 11:26:25 pm »
Yes, I extracted the key from the vera. I opened a ticket with CC and one agent was kind enough to point me to where it is.

Care to share the method? By PM if needed ..... I've been trying to do this to allow my ZNiffer to decode Secure device communications, but couldn't see the key in any obvious locations.

Will send you a PM
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Suggestions
« Reply #158 on: March 11, 2019, 09:33:05 am »
On and off, for a very long while now, I've been considering the best way to address asynchronous I/O.

In keeping with the platform-independent nature of openLuup, I've wanted to stick with pure Lua code and minimize links with particular OS libraries (especially, I still want this all to work on Windows.)

For HTTP(S) requests, it seems that a very good option would have been this library:

https://github.com/daurnimator/lua-http

BUT, alas, I read in the documentation:

Quote
lua-http is pure Lua code with dependencies on the following external libraries:

    cqueues - Posix API library for Lua
    luaossl - Lua bindings for TLS/SSL
    lua-zlib - Optional Lua bindings for zlib

lua-http can run on any operating system supported by cqueues and openssl, which at the time of writing is GNU/Linux, FreeBSD, NetBSD, OpenBSD, OSX and Solaris.

One of the biggest users of this would be the VeraBridge plugin, which actually spends quite a while polling Veras, so it would improve response times to Vera events considerably.

So no Windows solution yet.  Thoughts anyone?
« Last Edit: March 11, 2019, 10:02:52 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 Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: openLuup: Suggestions
« Reply #159 on: March 11, 2019, 12:14:19 pm »
I'd say leave it up to Windows users to make the dependencies  work.  You're talking about an environment where Windows curl barely functions!!  Getting anything to work out of the box cross platform is almost impossible without some sort virtualization.  And that's coming from someone who uses Windows for most computer related work.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: openLuup: Suggestions
« Reply #160 on: March 12, 2019, 06:58:57 am »
Hi AK,

I'm with Buxton here. I use Oracle VM to run a PI emulator. Runs faster than any PI and is perfect for testing as well. If you trash it, you just restore the image. Back up running in seconds.

Not sure who or why would like to run on just Windows for an application like this.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Suggestions
« Reply #161 on: March 12, 2019, 07:46:52 am »
@Buxton, @reneboer, thanks for the feedback!

Actually, it's now a moot point, since I have just discovered a valid and robust way to access the low-level HTTP routines in the LuaSocket library.  This means that I can now easily (well, fairly easily) split the HTTP request and responses into asynchronous activities and use the intervening latency for normal plugin processing.

I'll be testing this first on the VeraBridge plugin which will allow me to use the proper lazy polling afforded by the lu_status request Timeout and MinimumDelay parameters, and, as a side-effect, get much better response times to Vera status changes.

This may a take a while to implement, but now I do know that it's possible... have been wanting to do this for years!



Further discussion on the topic moved to here openLuup: Asynchronous I/O

« Last Edit: March 15, 2019, 07:18:11 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.