(Last Updated: October 2, 2020)

openLuup: Version Log



  • A long while ago (May, 2015) I wrote my 2000-th post on another forum: openLuup - running unmodified plugins on any machine. Here’s the gist of it:


    ...I want to work in a more open and stable [Vera] environment...

    ...All would be solved if Luup was open source and could be run on the plethora of cheap and reliable hardware available today. But it’s not. But we could get something like that effect if we engineered a sufficient subset of Luup to run on such a platform. Could it be done? What would we need?

    1. UI
    2. scheduler
    3. web server
    4. Luup compatible API
    5. Device and Implementation xml file reader
    6. Zwave bridge to Vera
    7. runs most plugins without modification

    What we wouldn’t need is UPnP.

    What have we (nearly) got already?

    • We have, courtesy of @amg0, the most excellent AltUI: Alternate UI to UI7, and that, I think, is probably the hardest one to do in the above list.
    • Items 2 - 5, and 7, I’ve prototyped, in pure Lua, and posted elsewhere: DataYours on Raspberry Pi, running selected plugins unmodified, including: DataYours, EventWatcher, Netatmo, RBLuaTest, altUI. See screenshot attached.

    Is it worth the effort? Probably not. Will I pursue this quest? Yes.


    openLuup was the result.

    DE2056BF-E548-4611-972B-40276F00BFEB.jpeg



  • Development Branch: 2020 Release 5.1

    • Startup log shows JSON module version information (thanks @a-lurker)

    If you have installed Cjson then the startup log should include:

    2020-05-01 13:00:56.780 openLuup.json:: version 2020.04.16 @akbooer
    2020-05-01 13:00:56.780 openLuup.init:: using Cjson 2.1.0 for fast decoding

    If not, then:

    2020-05-01 12:54:47.675 openLuup.json:: version 2020.04.16 @akbooer
    2020-05-01 12:54:47.675 openLuup.init:: Cjson not installed - using openLuup.json.Lua.decode() instead



  • Development Branch: 2020 Release 5.6

    • I_openLuupCamera1 mods:
    • add username attribute
    • add password attribute
    • add URL variable
    • add DirectStreamingURL variable
    • thanks @prophead


  • Development Branch: 2020 Release 5.10

    • native image panel for openLuupCamera1 device
    • category 6 for ditto
    • file counts in Luup files page menu

    The openLuup console Luup Files page offers a very fast way to browse and view all the Luup device files that the system knows about. A click on the file name opens a Viewer on the file itself. The file filter menu now shows a count of each file type. I seem to have a total of 772 such files on my development system...

    Screenshot_2020-05-10 openLuup.png



  • Development Branch: 2020 Release 5.20

    • fix for cjson.null in decoded structures
    • thanks @reneboer (and @mrFarmer !)

    As usual, an earlier update breaks something. This probably wouldn't have been spotted for a while, since it doesn't impact VeraBridge or the ZWave bridge, but thanks to @reneboer's vigilance, it's found and fixed.

    A little more detail. The Cjson module decodes Json null as the private data structure cjson.null. The following code snippet shows the problem:

    local json = require "openLuup.json"
    local J = json.encode {1, nil, 3}
    local L = json.Lua.decode(J)
    local C = json.C.decode(J)
    
    print("JSON", J)
    print("Lua", pretty(L))
    print("C", pretty(C))
    

    writes the output:

    JSON 	[1,null,3]
    Lua 	{1,nil,3}
    C 	{1,userdata: (nil),3}
    

    However, the default openLuup json.decode() function has now been fixed, when it's using the Cjson module:

    local D = json.decode(J)
    print ("json.decode [using Cjson]", pretty(D))
    

    now gives:

    json.decode [using Cjson] 	{1,nil,3}
    

    Kudos again to @reneboer and @mrFarmer !



  • Master Branch: 2020 Release 5.22

    5th Aniiversary edition!!

    Yes, it's five years since openLuup was unveiled to the world in this post:

    ...so I thought that today I'd roll up all the changes to date into the master branch.

    I suppose I should also be setting out a roadmap. At the risk of it becoming a commitment, let's just say that, for the moment, it's just a list of incremental development ideas and some blue sky thinking:

    • ZWay plugin integrated in openLuup distribution (as are AltAppStore and VeraBridge)
    • native scene triggers – not the same as Vera, not the same as AltUI variable watches, but definable in the openLuup console.
    • utilities for managing Data Historian archives
    • better task & job messages

    and then...

    • fully asynchronous I/O
    • enhanced HTTP server with data compression (perhaps using third-party web server?)
    • Ajax calls for asynchronous updates of some console pages (Devices, Scenes, ...)
    • ...

    Ideas always welcomed!



  • Development Branch: 2020 Release 6.28

    Implemented some recent suggestions to assist code/plugin development in the openLuup environment.

    • the console System > All Globals page now starts with an entry for the shared environment (Startup / Shutdown / Test / Scenes...)
    • there is a link from the above item to the Lua Globals page within the Lua Code page group, which expands the content of non-standard (ie. user-created) global Lua tables in the shared environment.
    • a new system variable luup.openLuup.cpu_table contains the running total of CPU times (with sub-millisecond resolution) for all plugins.

    The last item above may be used to profile run times for all the plugins:

    local T = luup.openLuup.cpu_table    -- yes, this is a table, not a function call
    print (T)
    

    produces an output like:

          (s.ms)      [#] device name
           0.010      [2] openLuup
           0.650      [3] Alternate UI
           0.010      [4] Alternate App Store
           8.300     [13] Vera Edge
           0.040     [16] BBB Sonos (Study)
           2.690     [17] Vera 0
           3.100     [18] Vera 1
           1.470     [20] Netatmo
           0.040     [42] DarkSky Weather
           7.140     [48] Philips hue
           4.140     [70] Studio hue
    

    but it's also an object which you may use to calculate run-time deltas. Hence:

    local T0 = luup.openLuup.cpu_table
    
    --  wait a bit
    
    local T1 = luup.openLuup.cpu_table 
    
    print (T1 - T0)
    

    will show you the elapsed CPU time for all the plugins.

          (s.ms)      [#] device name
           0.000      [2] openLuup
           0.020      [3] Alternate UI
           0.000      [4] Alternate App Store
           1.440     [13] Vera Edge
           0.000     [16] BBB Sonos (Study)
           0.080     [17] Vera 0
           0.070     [18] Vera 1
           0.560     [20] Netatmo
           0.000     [42] DarkSky Weather
           1.460     [48] Philips hue
           0.770     [70] Studio hue
    

    My thanks to @a-lurker for being a catalyst for these changes.



  • Development Branch: 2020 Release 6.29

    Following yesterday's changes in v20.6.28, "wall-clock" time is now added to the system profiling instrumentation:

    • new plugin device attribute wall(s) contains the running total of wall-clock time (with sub-millisecond resolution)
    • new system variable luup.openLuup.wall_table contains the wall-clock times (with sub-millisecond resolution) for all plugins
    • openLuup console Scheduler > Plugins page shows cpu and wall-clock times and their ratio.

    The final item above should be a good indicator of when ( >> 1) a plugin is taking much more elapsed time than the CPU that it is actually using – diagnostic of blocking socket I/O or wanton use of luup.sleep().



  • Development Branch: 2020 Release 7.4

    INDEPENDENCE DAY Edition

    ...nothing to do with the USA, but the day in the UK when Covid-19 restrictions are reduced, and more shops and businesses can open!

    • added Required Files sub-page to the Plugins page group, showing which files/modules are required by plugins (and how many times.)

    This is in preparation for being able to specify replacement modules without altering the plugin code itself. Applications include replacing dkjson with RapidJSON, and the like.

    Not fixed:

    • the log file customisation in Lua Startup (sorry @CatmanV2, next time.)

    Screenshot_2020-07-04 openLuup(1).png



  • Development Branch: 2020 Release 10.1

    Thanks to today's influx of Shelly devices here, I've implemented a shorter data request for running scenes.

    So instead of:

    http://openLuupIP:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=1

    or even:

    http://openLuupIP:3480/data_request?id=action&DeviceNum=2&serviceId=openLuup&action=RunScene&SceneNum=1

    You can simply write:

    http://openLuupIP:3480/data_request?id=run_scene&SceneNum=1

    ...much easier to program into all those new switched and relays!



  • Development Branch: 2020 Release 10.2

    Shelly-itis has hit hard... here is the beginnings of a Shelly-like API for all openLuup devices:

    Switches:

    Turn on / off / toggle with:

    http://openLuupIP:3480/relay/NNN?turn=on
    http://openLuupIP:3480/relay/NNN?turn=off
    http://openLuupIP:3480/relay/NNN?turn=toggle
    

    where NNN is the device number.

    Scenes:

    Run scenes with:

    http://openLuupIP:3480/scene/NNN
    

    where NNN is the scene id.

    This makes programming Shelly i3 switches for actioning any openLuup device particularly easy, and consistent with controlling Shelly devices from openLuup (or any HTTP command.)


Log in to reply