Author Topic: Info Viewer plugin - Log Viewer updated  (Read 59554 times)

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1301
  • Karma: +72/-30
Re: Info Viewer plugin - Log Viewer updated
« Reply #165 on: February 17, 2016, 03:42:44 am »
Hi meavydev,

It can only work remotely when using ALTUI remote.

Cheers rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline hwve

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +1/-0
Re: Info Viewer plugin - Log Viewer updated
« Reply #166 on: March 04, 2016, 10:12:26 am »
Apparently this does no longer work on the Vera Plus.  I get 404-page not found.  Is there a work around?  There is so much good information in here.

Offline gengen

  • Full Member
  • ***
  • Posts: 240
  • Karma: +23/-5
Re: Info Viewer plugin - Log Viewer updated
« Reply #167 on: March 04, 2016, 11:50:42 am »
Works for me, no problem. Are you connected directly to Vera or indirectly through the Mios server? Please take a look at the URL. of the Info Viewer page.

Gengen

Offline hwve

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +1/-0
Re: Info Viewer plugin - Log Viewer updated
« Reply #168 on: March 04, 2016, 12:17:41 pm »
On my vera lite the page says Mis_SERIAL NUMBER.  So I guess that is going through the Mios server.  For the Vera Plus, I cannot tell since the page never shows.  I guess it is going directly to the vera plus.  How can I change that? I have both registered with MIOS.

Offline Stuart

  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Re: Info Viewer plugin - Log Viewer updated
« Reply #169 on: March 07, 2016, 06:44:22 pm »
Folks --

In order to assist with getting log files remotely from vera, I put together a simple plugin.  It takes a copy of the logfile (and optionally applies a grep pattern) and places it in the /etc/cmh-ludl folder.  You can then directly download the logfile. Hopefully it will be useful.

To avoid hijacking this thread, i've added the instructions here:

http://forum.micasaverde.com/index.php/topic,36744.0.html

Offline Stuart

  • Hero Member
  • *****
  • Posts: 673
  • Karma: +68/-2
Re: Info Viewer plugin - Log Viewer updated
« Reply #170 on: March 13, 2016, 05:47:22 pm »
For those interested - the GetLog plugin has now been tested with UI5 and UI7.  Also @amg0 advised that this sort of functionality is included with ALTUI.

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 837
  • Karma: +57/-8
Re: Info Viewer plugin - Log Viewer updated
« Reply #171 on: November 26, 2016, 01:17:40 am »
Ver 0.68 - a-lurker
  • Added device logo
  • Minor fixes and additions
  • Reorder code
This code is on GitHub here:
https://github.com/a-lurker/Vera-Plugin-Info-Viewer

You can install the plugin from the 'Alternate App Store', which works together with 'ALTUI':
http://forum.micasaverde.com/index.php/topic,38102.0.html
Delete any existing 'Infoviewer' device before installing from the 'Alternate App Store'.

Note that 'ALTUI' is highly recommended to all users and implements many of the functions found in the 'InfoViewer' plugin.
« Last Edit: November 26, 2016, 06:50:10 pm by a-lurker »

Offline Buxton

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +6/-0
Re: Info Viewer plugin - Log Viewer updated
« Reply #172 on: Today at 01:56:39 am »
Hey Mr. Lurker.

Info Viewer is one of the few plugins that will remain on my veralites as I complete a transition to openLuup.  The reason being that I still need to look at vera specific logs and data. 

I'm not sure if this can be accomplished, but here goes.  I get an instance of the Info Viewer plugin on openLuup for each of my bridged veras.  This is expected behavior.  What I would like to be able to do is label each instance per the name of my Vera  in the AltUI device page (doable now) and then when I launch the specific instance through the device buttons, I would be connected to the specific vera's log or info page.  This would in effect save the trip of opening a specific vera in the browser and then navigating to the Info Viewer device.

I imagine that if possible, the change would entail testing for openLuup, and then grabbing the appropriate vera device stats instead of that served by localhost.

Anyway, if it can't be done, that's cool.  Thx for the plugin.

Offline akbooer

  • Master Member
  • *******
  • Posts: 5878
  • Karma: +251/-69
  • "Less is more"
Re: Info Viewer plugin - Log Viewer updated
« Reply #173 on: Today at 03:23:08 am »
Just wondering what data you need from Vera logs that is otherwise not accessible from openLuup?
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 a-lurker

  • Hero Member
  • *****
  • Posts: 837
  • Karma: +57/-8
Re: Info Viewer plugin - Log Viewer updated
« Reply #174 on: Today at 03:59:56 am »
AK - I think the problem is that;  if the Infoviewer plugin is running on a Vera (it only works for Vera) and then you use the AltUI plugin running on openLuup to talk to the remote Vera, then the InfoViewer web pages will use the openLuup ip address, not the ip address of the remote Vera. Consequently the InfoViewer web page is not found.

AltUI draws a couple of buttons on the main page that link to the URLs with this code in 'J_ALTUI_plugins.js'

Code: [Select]
var urlhead = MultiBox.getUrlHead(device.altuiid);
.....
html += " $('button.altui-infoviewer-btn').on('click', function() { window.open('{1}?id=lr_al_info','_blank'); } );".format(device.altuiid,urlhead);
html += " $('button.altui-infoviewer-log-btn').on('click', function() { window.open('{1}?id=lr_al_info&fnc=getLog&app=localapp','_blank'); } );".format(device.altuiid,urlhead);
.....

and in 'J_ALTUI_multibox.js'

Code: [Select]
function _getUrlHead(altuiid) {
var elems = altuiid.split("-");
return _controllers[elems[0]].controller.getUrlHead();
};

Datamine running on a remote Vera, when accessed by AltUI running on openLupp also doesn't use the remote's ip address.

I had a similar problem with another plugin where I wanted to have available a link to the device it was handling - in this case an irrigation controller. In that case I used a variable to hold the remote ip address with some associated html code - pretty ugly.

So not sure what the best approach is? or is AltUI meant to handle this case and doesn't?

And noting that openLuup doesn't need the InfoViewer plugin, as it has its own console at:

http://openLuup_ip_address:3480/console




Offline akbooer

  • Master Member
  • *******
  • Posts: 5878
  • Karma: +251/-69
  • "Less is more"
Re: Info Viewer plugin - Log Viewer updated
« Reply #175 on: Today at 06:54:46 am »
AK - I think the problem is that;  if the Infoviewer plugin is running on a Vera (it only works for Vera) and then you use the AltUI plugin running on openLuup to talk to the remote Vera, then the InfoViewer web pages will use the openLuup ip address, not the ip address of the remote Vera. Consequently the InfoViewer web page is not found.

Yes, no doubt about that.  I was just wondering WHAT information was needed from the log.

Quote
Datamine running on a remote Vera, when accessed by AltUI running on openLupp also doesn't use the remote's ip address.

I had a similar problem with another plugin where I wanted to have available a link to the device it was handling - in this case an irrigation controller.

...and EventWatcher, DataYours, Netatmo, ...

Quote
So not sure what the best approach is? or is AltUI meant to handle this case and doesn't?

Not sure either (else would have done something!)  As a server, openLuup can't really modify the URLs that its devices ask it to present... either through JavaScript or relative URLs.  When handling a URL request, though, there are lots of re-writes that can be (and are) done.  CGIs, action calls, icon references, a few other unusual files..., are all done this way, but I don't see that helping here...

EXCEPT...

If the remote app provided a service action to retrieve data (which, quite honestly, it should) then it would all work splendidly.

Having said that, I shall add it to the list of things to do when I next update some of my above-named apps!

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 a-lurker

  • Hero Member
  • *****
  • Posts: 837
  • Karma: +57/-8
Re: Info Viewer plugin - Log Viewer updated
« Reply #176 on: Today at 08:24:35 am »
Yes - I don't think openLuup should do anything different but AltUI may be could use the ip address of the remote Vera for its plugins but once again that's a bit of an assumption. If the plugin held the ip address of interest, AltUI would still need to call the variable. Regardless AltUI has 'special' code for (nearly) every plugin ever written.

Does AltUI know the ip address of each remote Vera? I imagine it does and therefore may be able use it. But really the plugin's responsibility long term to supply the ip address. Ideally all plugins should use the same 'name' for this variable, so AltUI can easily make use of it?

I think we are talking the same?

Offline akbooer

  • Master Member
  • *******
  • Posts: 5878
  • Karma: +251/-69
  • "Less is more"
Re: Info Viewer plugin - Log Viewer updated
« Reply #177 on: Today at 09:50:05 am »
Does AltUI know the ip address of each remote Vera? I imagine it does and therefore may be able use it.

For multiple Vera's managed by the same AltUI instance, then yes.  However, for a single openLuup instance with one or more VeraBridges, then no.  It's can't tell that they're remote at all.

Quote
But really the plugin's responsibility long term to supply the ip address. Ideally all plugins should use the same 'name' for this variable, so AltUI can easily make use of it?

I think we are talking the same?

Not quite, I think.  My approach would be that instead of providing an HTTP server or URL to retrieve data from the plugin, you should use a /data_request?id=action to the hosting Vera.  VeraBridge knows all about these and ANY action request not understood or implemented by the bridge itself is passed to the relevant remote device.  If it's implemented as a <run> tag, then it can return all kinds of data in the JSON / XML response.
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 Buxton

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +6/-0
Re: Info Viewer plugin - Log Viewer updated
« Reply #178 on: Today at 07:12:58 pm »
As per what info I was after that was residing on the Veras, I was removing the master/slave bridge between the my two veras and noticed continued error messages in the logs of both machines.  I stumbled across the post that outlined editing the user_config JSON file and after editing and a couple of restarts, my logs are now finally clean.  To my knowledge, this type of log data is only accessible through the vera logs....  I find that looking directly at the vera logs is helpful in tracking down zwave problems and that much of this information is unavailable through the standard AltUi/openluup tools...