We have moved at community.getvera.com

Author Topic: openLuup - running unmodified plugins on any machine  (Read 106132 times)

Offline d55m14

  • Sr. Member
  • ****
  • Posts: 449
  • Karma: +8/-1
Re: openLuup - running unmodified plugins on any machine
« Reply #120 on: August 17, 2015, 07:38:35 am »
to change the parameter indicated above Have I to set the following in startup.lua ?

luup.variable_set ("urn:akbooer-com:serviceId:DataYours1", "UDP_RECEIVER_PORT", "port_number", dy7)

Sorry I missed your original post.  Yes, that's all you need to do.  But you must make sure that your DESTINATIONS ip:port match that port number.

This is perhaps more of a DataYours question than an openLuup one, but I see the dilemma.  Maybe better for future similar queries to ask in the "DataYours on Rpi" thread?

Sorry if I reply in this post but it's only for a question, the next one I'll post in the correct thread.

I changed the parameter , reboot the rpi but the port parameter in the dash interface (configuration) is 2003.



Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #121 on: August 17, 2015, 08:10:08 am »
Sorry if I reply in this post but it's only for a question, the next one I'll post in the correct thread.

I changed the parameter , reboot the rpi but the port parameter in the dash interface (configuration) is 2003.

No problem.  Yes there is an error: that parameter is never passed on to DataCache by DataYours.  I never imagined someone would want to change it through this mechanism!  I will post an update in one of the DY threads shortly.
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 akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #122 on: August 17, 2015, 09:27:14 am »
I wonder about the client:setoption(option [, value]) or client:settimeout(value [, mode]) API documented in http://w3.impa.br/~diego/software/luasocket/tcp.html
especially the 'linger' option  ,or the 'b' and 't' timeout options..

Yes, good steer.  I'm wondering about that too.  I thought I had set a 10 second timeout, but looking at it right now.  Thanks!

So I checked and there IS already a 10 second timeout set on the socket.  I'm loathe to tinker with the lower levels of the socket library, particularly since it comes with dire warnings:
Quote
You should only modify an option if you are sure you need it.
Quote
I do not advise you to set this to anything other than zero

However, I have added one small diagnostic to the send routine to log how many bytes have been successfully sent before the timeout.  I'd be grateful for a copy of what this produces in the event of a timeout.

PS: if you were into hacking and wanted to play with the socket.setoptions call then the line directly after 343 would be the place to do it.
Code: [Select]
  sock:settimeout(10)                                    -- this is a timeout on the HTTP read
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 Jeff

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #123 on: August 17, 2015, 11:59:32 am »
I wonder about the client:setoption(option [, value]) or client:settimeout(value [, mode]) API documented in http://w3.impa.br/~diego/software/luasocket/tcp.html
especially the 'linger' option  ,or the 'b' and 't' timeout options..

Yes, good steer.  I'm wondering about that too.  I thought I had set a 10 second timeout, but looking at it right now.  Thanks!

So I checked and there IS already a 10 second timeout set on the socket.  I'm loathe to tinker with the lower levels of the socket library, particularly since it comes with dire warnings:
Quote
You should only modify an option if you are sure you need it.
Quote
I do not advise you to set this to anything other than zero

However, I have added one small diagnostic to the send routine to log how many bytes have been successfully sent before the timeout.  I'd be grateful for a copy of what this produces in the event of a timeout.

PS: if you were into hacking and wanted to play with the socket.setoptions call then the line directly after 343 would be the place to do it.
Code: [Select]
  sock:settimeout(10)                                    -- this is a timeout on the HTTP read

and here is what I got with the modified server code...

Code: [Select]
2015-08-17 08:50:31.390 luup_log:3: ALTUI: ALTUI_Handler: request is: lr_ALTUI_Handler 8
2015-08-17 08:50:31.390 luup_log:3: ALTUI: ALTUI_Handler: parameters is: {"command":"home"} 8
2015-08-17 08:50:31.390 luup_log:3: ALTUI: ALTUI_Handler: outputformat is: null 8
2015-08-17 08:50:31.391 luup_log:3: ALTUI: getScriptContent(J_ALTUI_plugins.js) 5
2015-08-17 08:50:31.391 luup_log:3: ALTUI: getScriptContent(J_ALTUI_iphone.js) 5
2015-08-17 08:50:31.391 luup_log:3: ALTUI: getScriptContent(J_ALTUI_jquery.ui.touch-punch.min.js) 5
2015-08-17 08:50:31.393 openLuup.server:: request completed (65196 bytes, 4 ms) tcp{client}: 0x2606ac8 11
2015-08-17 08:50:31.664 openLuup.server:: /J_ALTUI_utils.js tcp{client}: 0x2606ac8 6
2015-08-17 08:50:31.664 openLuup.server:: request completed (33527 bytes, 0 ms) tcp{client}: 0x2606ac8 11
2015-08-17 08:50:31.667 openLuup.server:: /J_ALTUI_verabox.js tcp{client}: 0x2606ac8 6
2015-08-17 08:50:31.668 openLuup.server:: request completed (89086 bytes, 0 ms) tcp{client}: 0x2606ac8 11
2015-08-17 08:50:31.668 openLuup.server:: /J_ALTUI_multibox.js tcp{client}: 0x262b7a8 6
2015-08-17 08:50:31.669 openLuup.server:: request completed (26181 bytes, 0 ms) tcp{client}: 0x262b7a8 11
2015-08-17 08:50:31.695 openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x2606ac8 6
2015-08-17 08:50:31.696 openLuup.server:: error 'timeout' sending 379225 bytes to tcp{client}: 0x2606ac8 11
2015-08-17 08:50:31.696 openLuup.server:: ...only 247608 bytes sent 7
2015-08-17 08:50:31.696 openLuup.server:: request completed (379225 bytes, 1 ms) tcp{client}: 0x2606ac8 11
2015-08-17 08:52:02.697 openLuup.server:: closing client connection: tcp{client}: 0x2606ac8 8
2015-08-17 08:52:02.697 openLuup.server:: closing client connection: tcp{client}: 0x262b7a8 8
2015-08-17 08:52:03.547 openLuup.heartbeat:: memory used: 703kB, stats: elapsed: 0.00 days, cpu: 87.043 sec (71.94%) 14
2015-08-17 08:54:03.548 openLuup.heartbeat:: memory used: 1126kB, stats: elapsed: 0.00 days, cpu: 206.716 sec (85.77%) 14

And this is running in a VM of Ubuntu running on a ESXi server, I will pull it down to my Mac and try later tonight. I do not understand what to change the time out to is less better or more point me to some docs on the internet and I will hack around with it.

Thanks,
Jeff

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #124 on: August 17, 2015, 12:27:30 pm »
Quote
and here is what I got with the modified server code...
Code: [Select]
2015-08-17 08:50:31.696 openLuup.server:: error 'timeout' sending 379225 bytes to tcp{client}: 0x2606ac8 11
2015-08-17 08:50:31.696 openLuup.server:: ...only 247608 bytes sent 7
Aha! So at least it is sending a considerable part of it.

Quote
And this is running in a VM of Ubuntu running on a ESXi server, I will pull it down to my Mac and try later tonight. I do not understand what to change the time out to is less better or more point me to some docs on the internet and I will hack around with it.
OK, so a smoking gun for VMs then.  I would suggest to look at the VM configuration to see if there's a parameter hiding there.

Also, I started looking around the web and found mention of two possibly relevant parameters executionTimeout="90000" maxRequestLength="204800" (also I don't know what system or where to find these)

Typical post here: http://stackoverflow.com/questions/1696117/web-config-maxrequestlength-not-taking-effect
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 akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #125 on: August 17, 2015, 12:51:07 pm »
Jeff

Another server file to try -it includes the magic incantation:
Code: [Select]
  sock:setoption ("linger", {on = true, timeout = 1})

I've tried it on Debian (which was working anyway) and it doesn't break anything - but does it actually fix anything?

Otherwise, on with the VM parameter search!

Good luck.
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 akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #126 on: August 17, 2015, 01:28:08 pm »
But, the bridged cameras still do not display images on altUI or on Homewave -- however this does not matter to me since I want to connect openluup directly to the camera and avoid the camera being in vera as my next step, so i do not need to get bridged cameras working.

Cameras work OK for me, see attached...

These are not bridged to a Vera, but created directly on openLuup startup thus:
Code: [Select]
do -- Camera
  local dev = luup.create_device ('', "Camera", "Camera", "D_DigitalSecurityCamera1.xml") 
  local sid = "urn:micasaverde-com:serviceId:Camera1"
  luup.variable_set (sid, "Timeout", "5", dev)
  luup.variable_set (sid, "URL", "/your_snapshot_url_goes_here", dev)
  luup.variable_set (sid, "DirectStreamingURL", "/your_direct_streaming_url_goes_here", dev)
end

This is as simple as it gets - I've no way of testing presets or the like.
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 mda

  • Sr. Member
  • ****
  • Posts: 464
  • Karma: +9/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #127 on: August 24, 2015, 02:50:20 am »
Cameras work OK for me, see attached...


@akbooer Even if i remove the cameras and the Vera Bridge devices from startup.lua i still get the "Waiting Initial Data" in ALTUI. That said, ALTUI seems to be working ok as far as i can tell. Should I be concerned, or should i ignore the error and get on with instantiating plugins?

Here is by LuaUPnP.log ALTUI entries (with the cameras and vera bridge commented out of startup.lua):

Code: [Select]
mda$ grep ALT LuaUPnP.log
2015-08-23 23:40:13.012   luup.create_device:: [3] D_ALTUI.xml / I_ALTUI.xml
2015-08-23 23:40:13.012   luup.attr_set:: 3.device_json = D_ALTUI_UI7.json
2015-08-23 23:40:13.012   luup_log:3: ALTUI: initstatus(3) starting version: v0.65
2015-08-23 23:40:13.021   luup.register_handler:3: global_function_name=myALTUI_Handler, request=lr_ALTUI_Handler
2015-08-23 23:40:14.352   luup_log:3: ALTUI: startupDeferred, called on behalf of device:3
2015-08-23 23:40:14.352   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalHome was: EMPTY now: /port_3480/data_request?id=lr_ALTUI_Handler&command=home #hooks:0
2015-08-23 23:40:14.352   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.PluginConfig was: EMPTY now: {"urn:schemas-micasaverde-com:device:PowerMeter:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:SmokeSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawSmoke","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-a-lurker-com:device:InfoViewer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawInfoViewer","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:IPX800:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPX","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-upnp-org:device:IPhoneLocator:1":{"StyleFunc":"ALTUI_IPhoneLocator.getStyle","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPhone","ScriptFile":"J_ALTUI_iphone.js"},"urn:antor-fr:device:SamsungTVRemote:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:CountdownTimer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCountDown","ScriptFile":"J_ALTUI_plugins.js"},"urn:demo-micasaverde-com:device:weather:1":{"DeviceIconFunc":"ALTUI_PluginDisplays.drawWeatherIcon","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWeather","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:DoorLock:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorLock","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DimmableLight:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmable","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:altui:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawAltUI","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-micasaverde-com:device:DoorSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorSensor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:HumiditySensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHumidity","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:cplus:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawCanalplus","ControlPanelFunc":"ALTUI_IPhoneLocator.drawCanaplusControlPanel","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-cd-jackson-com:device:DataMine:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDataMine","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:holidayvirtualswitch:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawVacation","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:RGBController:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:BinaryLight:1":{"StyleFunc":"ALTUI_PluginDisplays.getStyle","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:MotionSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawMotion","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:TemperatureSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempSensor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:PowerMeter:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:Heater:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:LightSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:WindowCovering:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawWindowCover","ScriptFile":"J_ALTUI_plugins.js"}} #hooks:0
2015-08-23 23:40:14.353   luup_log:3: ALTUI: startup completed
2015-08-23 23:40:16.593   openLuup.server:: /data_request?id=lr_ALTUI_Handler&command=home tcp{client}: 0x7fc99b004828
2015-08-23 23:40:16.593   luup_log:3: ALTUI: ALTUI_Handler: request is: lr_ALTUI_Handler
2015-08-23 23:40:16.593   luup_log:3: ALTUI: ALTUI_Handler: parameters is: {"command":"home"}
2015-08-23 23:40:16.593   luup_log:3: ALTUI: ALTUI_Handler: outputformat is: null
2015-08-23 23:40:16.594   luup_log:3: ALTUI: getScriptContent(J_ALTUI_plugins.js)
2015-08-23 23:40:16.595   luup_log:3: ALTUI: getScriptContent(J_ALTUI_iphone.js)
2015-08-23 23:40:16.595   luup_log:3: ALTUI: getScriptContent(J_ALTUI_jquery.ui.touch-punch.min.js)
2015-08-23 23:40:16.614   openLuup.server:: /J_ALTUI_utils.js tcp{client}: 0x7fc99b004828
2015-08-23 23:40:16.615   openLuup.server:: /J_ALTUI_verabox.js tcp{client}: 0x7fc99b006a28
2015-08-23 23:40:16.621   openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x7fc99b8f2e28
2015-08-23 23:40:16.624   openLuup.server:: /J_ALTUI_multibox.js tcp{client}: 0x7fc99b8bd028
2015-08-23 23:40:17.071   openLuup.server:: /luvd/D_ALTUI.xml tcp{client}: 0x7fc99b006a28

and here is /var/log/cmh/LuaUPnP.log:

Code: [Select]
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mDebugESC[0m was: EMPTY now: 0 #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mVersionESC[0m was: EMPTY now: v0.65 #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mPresentESC[0m was: EMPTY now: 0 #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mRemoteAccessESC[0m was: EMPTY now: https://vera-ui.strongcubedfitness.com/Veralogin.php #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mLocalHomeESC[0m was: EMPTY now: /port_3480/data_request?id=lr_ALTUI_Handler&command=home #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mThemeCSSESC[0m was: EMPTY now:  #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mLocalCDNESC[0m was: EMPTY now:  #hooks: 0
06      08/23/15 23:40:14.352   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mExtraControllerESC[0m was: EMPTY now:  #hooks: 0
06      08/23/15 23:40:14.353   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mPluginConfigESC[0m was: EMPTY now: {"urn:schemas-micasaverde-com:device:PowerMeter:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:SmokeSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawSmoke","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-a-lurker-com:device:InfoViewer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawInfoViewer","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:IPX800:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPX","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-upnp-org:device:IPhoneLocator:1":{"StyleFunc":"ALTUI_IPhoneLocator.getStyle","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPhone","ScriptFile":"J_ALTUI_iphone.js"},"urn:antor-fr:device:SamsungTVRemote:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:CountdownTimer:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCountDown","ScriptFile":"J_ALTUI_plugins.js"},"urn:demo-micasaverde-com:device:weather:1":{"DeviceIconFunc":"ALTUI_PluginDisplays.drawWeatherIcon","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWeather","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:DoorLock:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorLock","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DimmableLight:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmable","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:altui:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawAltUI","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-micasaverde-com:device:DoorSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorSensor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:HumiditySensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHumidity","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:cplus:1":{"DeviceDrawFunc":"ALTUI_IPhoneLocator.drawCanalplus","ControlPanelFunc":"ALTUI_IPhoneLocator.drawCanaplusControlPanel","ScriptFile":"J_ALTUI_iphone.js"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-cd-jackson-com:device:DataMine:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawDataMine","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-futzle-com:device:holidayvirtualswitch:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawVacation","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:RGBController:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:BinaryLight:1":{"StyleFunc":"ALTUI_PluginDisplays.getStyle","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:MotionSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawMotion","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:TemperatureSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempSensor","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:PowerMeter:2":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-upnp-org:device:Heater:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:LightSensor:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawLight","ScriptFile":"J_ALTUI_plugins.js"},"urn:schemas-micasaverde-com:device:WindowCovering:1":{"DeviceDrawFunc":"ALTUI_PluginDisplays.drawWindowCover","ScriptFile":"J_ALTUI_plugins.js"}} #hooks: 0
06      08/23/15 23:40:14.353   Device_Variable::m_szValue_set device: 3 service: urn:upnp-org:serviceId:altui1 variable: ESC[35;1mVersionESC[0m was: v0.65 now: v0.65 #hooks: 0

Thanks!

ps: i have been able to get the direct openluup cameras to work in ALTUI but not in HomeWave (hopefully Homewave will soon support direct cameras so we do not need to debug this any further.)
« Last Edit: August 24, 2015, 02:58:54 am by mda »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #128 on: August 24, 2015, 02:57:28 am »
What browser are you using? Can you try a different one?
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 mda

  • Sr. Member
  • ****
  • Posts: 464
  • Karma: +9/-0
Re: openLuup - running unmodified plugins on any machine
« Reply #129 on: August 24, 2015, 03:00:44 am »
What browser are you using? Can you try a different one?

Same error on Safari and Chrome (Mac), but as i said above it does appear to be working ok i think.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #130 on: August 24, 2015, 05:11:32 am »
Well, your startup log looks incomplete.  The one at /var/log/cmh/ is merely a formatted subset of variables and scenes for ALTUI's benefit.  I've just logged the following with ALTUI as the only device configured.
Code: [Select]
2015-08-24 10:05:25.878   openLuup.scheduler:: starting
2015-08-24 10:05:25.878   openLuup.scheduler:3: device startup
2015-08-24 10:05:25.878   luup_log:3: ALTUI: initstatus(3) starting version: v0.67
2015-08-24 10:05:25.891   luup.register_handler:3: global_function_name=myALTUI_Handler, request=lr_ALTUI_Handler
2015-08-24 10:05:25.891   openLuup.scheduler:3: device startup completed: status=nil, msg=nil, name=nil
2015-08-24 10:05:26.901   luup_log:3: ALTUI: startupDeferred, called on behalf of device:3
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Debug was: EMPTY now: 0 #hooks:0
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: EMPTY now: v0.67 #hooks:0
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Present was: EMPTY now: 0 #hooks:0
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteAccess was: EMPTY now: https://vera-ui.strongcubedfitness.com/Veralogin.php #hooks:0
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalHome was: EMPTY now: /port_3480/data_request?id=lr_ALTUI_Handler&command=home #hooks:0
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ThemeCSS was: EMPTY now:  #hooks:0
2015-08-24 10:05:26.901   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalCDN was: EMPTY now:  #hooks:0
2015-08-24 10:05:26.902   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.ExtraController was: EMPTY now:  #hooks:0
2015-08-24 10:05:26.903   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.PluginConfig was: EMPTY now: {"urn:schemas-upnp-org:device:Heater:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawHeater"},"urn:schemas-rts-services-com:device:ProgramLogicEG:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPLEG"},"urn:antor-fr:device:SamsungTVRemote:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight"},"urn:schemas-upnp-org:device:BinaryLight:1":{"ScriptFile":"J_ALTUI_plugins.js","StyleFunc":"ALTUI_PluginDisplays.getStyle","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight"},"urn:schemas-micasaverde-com:device:TemperatureSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawTempSensor"},"urn:schemas-cd-jackson-com:device:DataMine:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDataMine"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:2":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera"},"urn:schemas-micasaverde-com:device:SmokeSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawSmoke"},"urn:schemas-upnp-org:device:DigitalSecurityCamera:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCamera"},"urn:schemas-micasaverde-com:device:DoorSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorSensor"},"urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawZoneThermostat"},"urn:schemas-upnp-org:device:IPX800:1":{"ScriptFile":"J_ALTUI_iphone.js","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPX"},"urn:schemas-upnp-org:device:IPhoneLocator:1":{"ScriptFile":"J_ALTUI_iphone.js","StyleFunc":"ALTUI_IPhoneLocator.getStyle","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawIPhone"},"urn:schemas-futzle-com:device:CountdownTimer:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawCountDown"},"urn:schemas-upnp-org:device:RGBController:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawBinaryLight"},"urn:schemas-futzle-com:device:holidayvirtualswitch:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawVacation"},"urn:schemas-micasaverde-com:device:HumiditySensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawHumidity"},"urn:schemas-a-lurker-com:device:InfoViewer:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawInfoViewer"},"urn:schemas-micasaverde-com:device:PowerMeter:2":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter"},"urn:schemas-micasaverde-com:device:DoorLock:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDoorLock"},"urn:schemas-micasaverde-com:device:PowerMeter:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawPowerMeter"},"urn:schemas-micasaverde-com:device:WindowCovering:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWindowCover"},"urn:schemas-micasaverde-com:device:MotionSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawMotion"},"urn:schemas-upnp-org:device:DimmableLight:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawDimmable"},"urn:schemas-upnp-org:device:altui:1":{"ScriptFile":"J_ALTUI_iphone.js","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawAltUI"},"urn:demo-micasaverde-com:device:weather:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceIconFunc":"ALTUI_PluginDisplays.drawWeatherIcon","DeviceDrawFunc":"ALTUI_PluginDisplays.drawWeather"},"urn:schemas-upnp-org:device:cplus:1":{"ScriptFile":"J_ALTUI_iphone.js","ControlPanelFunc":"ALTUI_IPhoneLocator.drawCanaplusControlPanel","DeviceDrawFunc":"ALTUI_IPhoneLocator.drawCanalplus"},"urn:schemas-micasaverde-com:device:LightSensor:1":{"ScriptFile":"J_ALTUI_plugins.js","DeviceDrawFunc":"ALTUI_PluginDisplays.drawLight"}} #hooks:0
2015-08-24 10:05:26.903   luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: v0.67 now: v0.67 #hooks:0
2015-08-24 10:05:26.903   luup.set_failure:3: status = 0
2015-08-24 10:05:26.903   luup_log:3: ALTUI: startup completed

This is without an ALTUI window opened in the browser.  If you then go to http://<VeraIP>:3480/data_request?id=lr_ALTUI_Handler&command=home#

Code: [Select]
2015-08-24 10:06:51.244   openLuup.server:: new client connection: tcp{client}: 0x4276c8
2015-08-24 10:06:51.316   openLuup.server:: /data_request?id=lr_ALTUI_Handler&command=home tcp{client}: 0x4276c8
2015-08-24 10:06:51.316   luup_log:3: ALTUI: ALTUI_Handler: request is: lr_ALTUI_Handler
2015-08-24 10:06:51.316   luup_log:3: ALTUI: ALTUI_Handler: parameters is: {"command":"home"}
2015-08-24 10:06:51.316   luup_log:3: ALTUI: ALTUI_Handler: outputformat is: null
2015-08-24 10:06:51.318   luup_log:3: ALTUI: getScriptContent(J_ALTUI_plugins.js)
2015-08-24 10:06:51.331   luup_log:3: ALTUI: getScriptContent(J_ALTUI_iphone.js)
2015-08-24 10:06:51.333   luup_log:3: ALTUI: getScriptContent(J_ALTUI_jquery.ui.touch-punch.min.js)
2015-08-24 10:06:51.341   openLuup.server:: request completed (69211 bytes, 24 ms) tcp{client}: 0x4276c8
2015-08-24 10:06:51.878   openLuup.server:: /J_ALTUI_utils.js tcp{client}: 0x4276c8
2015-08-24 10:06:51.891   openLuup.server:: request completed (33527 bytes, 13 ms) tcp{client}: 0x4276c8
2015-08-24 10:06:51.891   openLuup.server:: new client connection: tcp{client}: 0x1de420
2015-08-24 10:06:51.892   openLuup.server:: new client connection: tcp{client}: 0x1dc2e8
2015-08-24 10:06:51.892   openLuup.server:: new client connection: tcp{client}: 0x1c7020
2015-08-24 10:06:51.892   openLuup.server:: /J_ALTUI_verabox.js tcp{client}: 0x1de420
2015-08-24 10:06:51.892   openLuup.server:: /J_ALTUI_multibox.js tcp{client}: 0x1dc2e8
2015-08-24 10:06:51.892   openLuup.server:: /J_ALTUI_uimgr.js tcp{client}: 0x1c7020
2015-08-24 10:06:51.899   openLuup.server:: request completed (89086 bytes, 6 ms) tcp{client}: 0x1de420
2015-08-24 10:06:51.900   openLuup.server:: request completed (26293 bytes, 7 ms) tcp{client}: 0x1dc2e8
2015-08-24 10:06:51.916   openLuup.server:: request completed (385725 bytes, 24 ms) tcp{client}: 0x1c7020
2015-08-24 10:06:52.397   openLuup.server:: /data_request?id=user_data&output_format=json&DataVersion=407125042&_=1440407211897 tcp{client}: 0x1c7020
2015-08-24 10:06:52.402   openLuup.server:: request completed (18923 bytes, 4 ms) tcp{client}: 0x1c7020
2015-08-24 10:06:52.417   openLuup.server:: /data_request?id=variableget&DeviceNum=0&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&Variable=Mode&_=1440407211901 tcp{client}: 0x1c7020
2015-08-24 10:06:52.417   openLuup.server:: request completed (1 bytes, 0 ms) tcp{client}: 0x1c7020
2015-08-24 10:06:52.454   openLuup.server:: /luvd/D_ALTUI.xml tcp{client}: 0x1de420
2015-08-24 10:06:52.454   openLuup.server:: /luvd/D_ZWaveNetwork.xml tcp{client}: 0x1c7020
2015-08-24 10:06:52.455   openLuup.server:: request completed (1086 bytes, 1 ms) tcp{client}: 0x1de420
2015-08-24 10:06:52.455   openLuup.HTTP.FILE:: file not found:D_ZWaveNetwork.xml
2015-08-24 10:06:52.455   openLuup.server:: request completed (0 bytes, 1 ms) tcp{client}: 0x1c7020
2015-08-24 10:06:54.475   openLuup.server:: /data_request?id=lu_status2&output_format=json&DataVersion=1&Timeout=60&MinimumDelay=1500&_=1440407211902 tcp{client}: 0x1c7020
2015-08-24 10:06:55.993   openLuup.server:: request completed (6473 bytes, 1517 ms) tcp{client}: 0x1c7020
2015-08-24 10:06:56.105   openLuup.server:: /data_request?id=lu_status2&output_format=json&DataVersion=407125057&Timeout=60&MinimumDelay=1500&_=1440407211903 tcp{client}: 0x1c7020

This is a test worth copying and comparing results.

As an aside, what processor are you running on?  5 cameras with 50% load - I have no idea whether this is good or bad.  Is this with the Blue Iris plugin, or just the cameras?  Anyway, delighted that this works for you.
« Last Edit: August 24, 2015, 05:14: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 akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #131 on: August 24, 2015, 05:20:00 am »
ps: i have been able to get the direct openluup cameras to work in ALTUI but not in HomeWave (hopefully Homewave will soon support direct cameras so we do not need to debug this any further.)

Just noticed this PS!  Yes, I would expect that - I have not yet implemented the request_image call that HomeWave uses... mostly because I don't know what format to use for the image.  Fortunately, regular camera operations don't use this.

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 akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #132 on: August 31, 2015, 12:55:46 pm »
Here are the files for Release 4.

Release 4 is a very extensive (but not complete) implementation of Luup, and includes a set of features which are generally sufficient to run a number of standard plugins on any machine (Unix or Windows) that can run Lua.  The biggest change from the previous release is support for device persistence. This has been necessary since a number of plugins (not least, MySensors) require it for their successful configuration.

This version runs a wide variety of plugins, but most notably the MySensors Gateway (www.MySensors.org) connecting by ethernet to an Arduino Gateway and a whole world of non-Zwave, but radio-linked homebrew sensors.  It also includes the VeraBridge plugin to monitor and control remote Veras for all your Zwave requirements.  Of course, it also runs the fabulous ALTUI user interface plugin by @amg0.

Also attached are a couple of screen shots showing:
  • front panel with MySensors gateway and devices
  • Parent/Child diagram of 4 remote Veras connected through the VeraBridge plugin
Keen, as ever, to hear feedback: good or bad.

« Last Edit: August 31, 2015, 02:59:00 pm 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 mvader

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: +29/-75
Re: openLuup - running unmodified plugins on any machine
« Reply #133 on: September 01, 2015, 01:03:17 pm »
great job.. that's what' I've been waiting for.
please clarify something for me.

if i have a scene in vera for example
turn on lights when motion is detected.
the light is controlled by a aeon in wall zwave device.
the motion is on a my sensors sensor running your open luup

if motion is detected on my sensor, it sends a signal back to the ethernet gateway, which then tells openluup/plugin, motion has been detected.

the question then is
will open luup go tell vera, motion has been detected, and thus vera will fire off the scene to turn on the light?


Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: openLuup - running unmodified plugins on any machine
« Reply #134 on: September 01, 2015, 01:59:58 pm »
Not automatically.

The VeraBridge does not copy MySensors devices from openLuup to the Vera, so your Vera scene would have no way of telling.

What you'd need is a scene on openLuup triggered by the MySensors device and then sending a request to Vera to run the scene.

All straight-forward, except that I've not yet included scene triggers in openLuup functionality.  I am working on it as we speak - it is the last major missing piece.   You could already, perhaps, use a timer instead of a trigger to poll the MySensors device(s) and fire off the Vera scene if necessary.  Run every minute, it might be good enough?
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.