Code/Snippet library

Share and discuss your lua creations here

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

    5
    0 Votes
    5 Posts
    247 Views

    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
    294 Views

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

  • 0 Votes
    4 Posts
    176 Views

    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.

  • 3 Votes
    2 Posts
    480 Views

    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
    179 Views
    No one has replied
  • Low battery alerts

    10
    0 Votes
    10 Posts
    273 Views

    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
    477 Views

    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
    139 Views
    No one has replied
  • Best way to check for http_async?

    5
    0 Votes
    5 Posts
    151 Views

    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
    514 Views

    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
    117 Views
    No one has replied
  • Roomba integration through Hass

    6
    1 Votes
    6 Posts
    400 Views

    @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...

  • 2 Votes
    1 Posts
    149 Views
    No one has replied
  • 0 Votes
    5 Posts
    238 Views

    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.

  • 2 Votes
    1 Posts
    184 Views
    No one has replied
  • 0 Votes
    4 Posts
    142 Views

    Device - control panel - configuration - controller

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

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

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

Recent Topics