We have moved at community.getvera.com

Author Topic: [_CODE_] LSI - Luup System Information V0.2  (Read 12160 times)

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
[_CODE_] LSI - Luup System Information V0.2
« on: May 22, 2011, 09:50:32 am »
EOL, unsupported.

Installation:
http://wiki.micasaverde.com/index.php/Install_LUUP_Plugins

Remarks:
  • Runs once at LuaUPnP startup.
  • CSV 'export' (item separator ; and line separator ##): UPnP variables DevicesCSV, RoomsCSV, ScenesCSV, RemotesCSV
  • Does not use user_data/user_data2 (insofar not a replacement for TimAlls' applications).

History:
V0.2 adds support for UI5, total number of Z-Wave devices and 'Z-Wave Capabilities' tab

Download:
https://docs.google.com/open?id=0Bz4omZm4gYcsMWM3OGIzODQtOTU1YS00YzY5LTkyNTgtZTViNDJmNzYzNmEz
« Last Edit: May 08, 2012, 12:56:05 pm by Ap15e »

Offline MNB

  • Hero Member
  • *****
  • Posts: 689
  • Karma: +4/-9
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #1 on: May 22, 2011, 12:53:13 pm »
Ap15e as always great plugin addition, observation, I have 4 remotes (HA09C Controller) that seem not be showing up in the remote tab.

Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #2 on: May 22, 2011, 01:02:15 pm »
Quote
variable: remotes

Contains all the remotes in the system as a table indexed by the remote id. The members are: remote_file (string), room_num (number), description(string)

If luup.remotes is nil, the 'Remotes' tab is empty ...

Anyone with luup.remotes ~= nil to confirm that luup.remotes is implemented at all?


Offline Henk

  • Hero Member
  • *****
  • Posts: 820
  • Karma: +3/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #3 on: May 22, 2011, 01:03:32 pm »
@Ap15e

Initial observations:

1. Timezone shows 0 whereas GMT+1 is set
2. Devices table is way out of bounds for the screen. Scrollbars are available but still impair easy reading

3. Advanced tab LocationMapURL is out of bounds:LocationMapURL
   Map" onChange="set_device_state(23,'urn:upnp-ap15e-com:serviceId:LSI1','LocationMapURL',this.value);" class="inputbox">

See screenshot

So far so good!
Is it possible to have LSI lof its results to the log folder?

Still looking to get the expot function to work... any tips on that? (it probably works, but i dont know how  8))
| Vera2 @ UI4 1.1.1350 / 3.20 | Vera Lite @ UI5 | Vera 3 @ UI5 | 2x Merten  504519 | 1x Duewi  064374 | 1x Everspring SM103 doorbell mod |1 Y-cam IP cam | various LUUP plugins |

Offline Henk

  • Hero Member
  • *****
  • Posts: 820
  • Karma: +3/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #4 on: May 22, 2011, 01:04:26 pm »
Quote
variable: remotes

Contains all the remotes in the system as a table indexed by the remote id. The members are: remote_file (string), room_num (number), description(string)

If luup.remotes is nil, the 'Remotes' tab is empty ...

Anyone with luup.remotes ~= nil to confirm that luup.remotes is implemented at all?



No remotes installed. Return is 0 (nil) as stated.
See screenshot. Implementation works as far as i can tell

« Last Edit: May 22, 2011, 01:08:37 pm by Henk »
| Vera2 @ UI4 1.1.1350 / 3.20 | Vera Lite @ UI5 | Vera 3 @ UI5 | 2x Merten  504519 | 1x Duewi  064374 | 1x Everspring SM103 doorbell mod |1 Y-cam IP cam | various LUUP plugins |

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #5 on: May 22, 2011, 01:08:24 pm »
Anyone with luup.remotes ~= nil to confirm that luup.remotes is implemented at all?
Probably not implemented then. Showing 0, but have Intermatic, GE and Leviton remotes in the mix.
Dezwaved at the moment...

Offline TimAlls

  • Hero Member
  • *****
  • Posts: 722
  • Karma: +0/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #6 on: May 22, 2011, 02:10:26 pm »
Well done!
Now the Mac users have a way to summarize the system. My report generator is really a way to feed the new UI and code generator so I am happy to see this.....it will help everyone wanting to play with Luup coding.
Regards
Tim

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #7 on: May 22, 2011, 05:28:44 pm »
LSI Q&A

Quote
1. Timezone shows 0 whereas GMT+1 is set

If luup.timezone is 0 for all timezones, someone should file a bug report.

Quote
2. Devices table is way out of bounds for the screen. Scrollbars are available but still impair easy reading

Nothing I can do about it - well, I could use a smaller font ...

Quote
3. Advanced tab LocationMapURL is out of bounds

Well known problem; there is a corresponding bug report in Mantis.

Quote
Is it possible to have LSI lof its results to the log folder?

Would be possible, but IMHO a CSV 'export' via UPnP variables is more user friendly.

Quote
Probably not implemented then. Showing 0, but have Intermatic, GE and Leviton remotes in the mix.

Perhaps luup.remotes is a table of virtual IR remotes ('Scene' -> 'Remote')?

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #8 on: May 22, 2011, 05:33:43 pm »
If luup.timezone is 0 for all timezones, someone should file a bug report.
0 here; which doesn't seem right for the U.S. (unless the U.K. is now the 51st state and East Coast got redefined ;) ).

Quote
Probably not implemented then. Showing 0, but have Intermatic, GE and Leviton remotes in the mix.
Perhaps luup.remotes is a table of virtual IR remotes ('Scene' -> 'Remote')?
Quite possibly. I guess what we think of as remotes are 'portable controllers' or something rather, in Z-Wave lingo.
« Last Edit: May 22, 2011, 06:30:58 pm by oTi@ »
Dezwaved at the moment...

Offline Henk

  • Hero Member
  • *****
  • Posts: 820
  • Karma: +3/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #9 on: May 22, 2011, 06:03:23 pm »
LSI Q&A

Quote
1. Timezone shows 0 whereas GMT+1 is set

These are my system reports from terminal:

Quote
root@MiOS-xxxxx:~# date
Mon May 23 00:01:02 CEST 2011

Not reported correctly with LSI, leave it up to Ap15e to file a bug

« Last Edit: May 22, 2011, 06:05:05 pm by Henk »
| Vera2 @ UI4 1.1.1350 / 3.20 | Vera Lite @ UI5 | Vera 3 @ UI5 | 2x Merten  504519 | 1x Duewi  064374 | 1x Everspring SM103 doorbell mod |1 Y-cam IP cam | various LUUP plugins |

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #10 on: May 22, 2011, 09:03:01 pm »
@Ap15e,
F/R: perhaps a Z-Wave device count? (That turns red when getting close to 232  ;))
Dezwaved at the moment...

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #11 on: May 23, 2011, 03:45:09 am »
Automatically order an additional Vera if the Z-Wave device count is > 230?  :)

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #12 on: June 02, 2011, 09:49:42 pm »
If luup.timezone is 0 for all timezones, someone should file a bug report.
@Henk filed the bug.
Dezwaved at the moment...

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #13 on: December 19, 2011, 06:27:47 am »
Here comes a code snippet to list the capabilities of your devices (see attachment). Requires WAI. Adjust WAI_id accordingly. Should be integrated into LSI (too busy/lazy). Thanks to oTi@ for providing information about the security bits.

Code: [Select]
local WAI_id       = 36
local ZWDEVICE_SID = "urn:micasaverde-com:serviceId:ZWaveDevice1"


function to_binary( byte )

 local res = ''

 for i = 1,8
  do

   res= tostring( math.mod( byte, 2 ) ) .. res

   byte = math.floor( byte / 2 )

  end

 return res

end


local res = '<table border=1 style="font-size: 75%"><tr><th>Name</th><th>ID</th><th>Optional</th><th>FLiRS1000</th><th>FLiRS250</th><th>BeamCapability</th><th>RoutingSlave</th><th>SpecificDevice</th><th>Controller</th><th>Security</th></tr>'

for k,v in pairs( luup.devices )
 do

  if v.device_num_parent == 1
   then

local caps = luup.variable_get( ZWDEVICE_SID, 'Capabilities', k ) or ''

caps = to_binary( tonumber( string.match( caps, '.-,(.-),' ) or 0 ) )

res = res .. '<tr><td>' .. tostring( v.description ) .. '</td><td>' .. tostring( k ) .. '</td>'

for i = 1,8
do

  res = res .. '<td>'

  if string.sub( caps, i, i ) == '1'
   then
    res = res .. 'X'
   else
    res = res .. ' '
   end

  res = res .. '</td>'

end

    res = res .. '</tr>'

   end

 end

res = res .. '</table>'

luup.variable_set( 'urn:upnp-ap15e-com:serviceId:WAI1', 'Location', res, WAI_id )
« Last Edit: December 19, 2011, 06:30:57 am by Ap15e »

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: [_CODE_] LSI - Luup System Information V0.1
« Reply #14 on: December 19, 2011, 08:27:14 am »
[...]code snippet to list the capabilities of your devices [...] Should be integrated into LSI (too busy/lazy).
Thanks. And LSI should be integrated into Vera's UI... :)

(I'm actually running a custom version of LSI already, adding a Nodes tab which has all the devices sorted by NodeID and just a few columns of info.)
Dezwaved at the moment...