Skip to content

Code/Snippet library

Share and discuss your lua creations here

39 Topics 230 Posts
  • Help with luup.call_delay()

    5
    0 Votes
    5 Posts
    349 Views
    T

    Thanks been wanting to get rid of that luup.sleep for a while now.

  • io.popen: cannot allocate memory error

    4
    0 Votes
    4 Posts
    401 Views
    akbooerA

    Oh, Vera, my mistake. Anything possible, then.

  • Something smarter than string.format for user-defined patterns?

    4
    0 Votes
    4 Posts
    258 Views
    akbooerA

    Yes, easiest!

    I was thinking (along the lines of regular expressions) that you could use \ and add code to ensure that user % were properly escaped, and then convert the \ to %. So it looks to the user that they write regular expressions.

  • List of plugins available at the Alternative App Store

    2
    3 Votes
    2 Posts
    589 Views
    akbooerA

    Under openLuup, you can use the native App Store page...

    http://openLuupIP:3480/openLuup?page=app_store

    ...which, of course, shows only openLuup compatible plugins. It's also very responsive.

    Hovering over the plugin icon shows the description, and there are links to the App Store JSON and GitHub repository if you're a developer wanting to browse those.

    Screenshot_2020-11-07 openLuup.png

  • node-red Alexa OpenLuup/Vera voice integration

    1
    2 Votes
    1 Posts
    221 Views
    No one has replied
  • Low battery alerts

    10
    0 Votes
    10 Posts
    410 Views
    rafale77R

    yeah it can be done through a scene as well but if I have a bunch of them, I just create the watches in a batch in my startup lua. Seems faster than using scenes.

  • How to parse JSON path in LUA?

    3
    0 Votes
    3 Posts
    818 Views
    therealdbT

    Thanks @akbooer!

    It's now implemented in v 2.1 on https://github.com/dbochicchio/Vera-VirtualDevices/

  • Humidity/Mold sensor

    1
    0 Votes
    1 Posts
    164 Views
    No one has replied
  • Best way to check for http_async?

    5
    0 Votes
    5 Posts
    217 Views
    akbooerA

    The LuaSocket library is a bit flakey on timeouts. It’s also somewhat version-specific.

    What, I think, should happen is that the request timeout picks up the current value of the socket library’s global TIMEOUT when the request is made. You could try setting that before he call (and perhaps then reverting to its previous value.)

  • Sun position or light sensor for blinds?

    15
    0 Votes
    15 Posts
    707 Views
    therealdbT

    Just to update this thread, I've installed my sensor, added my virtual sensor and this seems to work. I'm still operating the blinds at specified time (but looking at the real amount of light to choose to operate them or not), but weather is starting to suck here in Italy, so I'm working on something smarter than this. I'll probably write some averaging logic, in order to avoid to operate the blings too frequently.

  • Luup : Report - Last Trip

    1
    2 Votes
    1 Posts
    136 Views
    No one has replied
  • Roomba integration through Hass

    6
    1 Votes
    6 Posts
    532 Views
    rafale77R

    @PrincessClevage

    Unfortunately at this point there is no commercial offering which can cover absolutely everything.
    The closest platform to doing this that I know of is actually home assistant which is open source and as I explained here:

    https://smarthome.community/topic/123/the-home-automation-controller-pyramid

    Even IT often needs to be paired with something else to be fully complete. Some people are content with some compromises they have to make with the platform they have chosen: For home assistant, it is currently a slightly lacking zwave support and a not so easy and complete automation builder which is why people are running it either with node-red or like most of us here, with openLuup and are living with their zwave support or bridging it to hubitat, homeseer or for some, with vera. It is however the fastest and most complete local API integration hub...

    All others are good at one thing and not at others. Vera was very innovative with their lua logic and plugin layer but were catastrophic at RF network management. Homeseer are very good at network management but lack zigbee and are expensive. Hubitat is very good overall for device management but lacks some cross platform and API integration...

    OpenLuup offers the advantage of being very transparent to vera. It runs all the same plugins, scenes and has the same API/logic architecture. It only lacks radio management which is brought it through bridge pluging like zway bridge or vera bridge.
    The work required to reverse engineer the home assistant plugin to roomba and make an equivalent for openLuup is possible but to me, it is a lot more work than to install home-assistant and bridge the device through it. It is a lot more efficient also because it opens the door to doing the same thing with all the home-assistant integrations which, let's be honest, we (with openLuup) won't be able to compete with given the relative size of that community and the speed at which they are going. OpenLuup+HomeAssitant+Z-way is the best approach for someone coming from Vera. That's just my opinion...
    Besides all three together are a lot less work and a lot less maintenance than vera alone... Infinitely less. That's my experience. Staying with one platform may not be the simplest way to go...

  • Virtual Rain Sensor using Site Sensor and Weatherbit API

    1
    2 Votes
    1 Posts
    177 Views
    No one has replied
  • 0 Votes
    5 Posts
    334 Views
    rafale77R

    I agree with you and I don't know why but the first time I tested it, it broke the function.
    I just ran another test and it seems to be ok. Not sure why.

  • Change Parameter of Z-wave device through Z-way API

    1
    2 Votes
    1 Posts
    225 Views
    No one has replied
  • Disable vera wakeup nnu (battery operated device abusive heal)

    4
    0 Votes
    4 Posts
    195 Views
    S

    Device - control panel - configuration - controller

  • Disable Vera Zwave device polling at the device level

    1
    0 Votes
    1 Posts
    184 Views
    No one has replied
  • Lua match device

    1
    0 Votes
    1 Posts
    121 Views
    No one has replied
  • Lua example http post request with json body

    1
    2 Votes
    1 Posts
    6k Views
    No one has replied

Recent Topics