We have moved at community.getvera.com

Author Topic: New Plugin : NETMON - a network device monitor  (Read 3890 times)

Offline jvanhambelgium

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #45 on: February 02, 2019, 02:05:10 am »
Thx for the feedback, in the meantime it seems to be working.
I've removed the app (through GUI) and SSH'ed in the box and removed all effective files too.
Then a clean install again from the app-store with version 0.5

Then I immediately assigned a room to it (while previously I left it as "No Room") and created some IP's to ping & saved.
Even then I would not see child-devices even after luup-reload.
I finally rebooted the whole unit ... then indeed child-devices showed up and are ready to use.

Now I'm running v0.5 of the plugin, I can simply fetch the github v0.7 code and transfer the files to the Vera (through GUI => Apps => Develop Apps) so effectively overwrite them ?


I've set a low timer on the pings (eg. 2 seconds) since I want to use it to detect if a smart-TV is on. Much faster then obtaining the Watt-usage on a port to make the decision if a TV is turned on.


Offline jvanhambelgium

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #46 on: February 02, 2019, 03:10:00 am »
I now simply uploaded the Github v0.7 files (all of them) onto the Vera and reloaded.

It seems the plugin does like a system reboot in order to clean things.
Eg. I removed my 2 ping "entries" on the mail NETMON-app , saved etc.
The child-devices remain in place, even after closing browser & login again etc.

Only after performing a system reboot, it seems my 2 child-devices are now effectively gone.
This is expected behaviour ? The same for renaming, when I rename the 2 defined probes in the Netmon-app , the child-devices do not follow and keep their original name given at time of creation.

Offline bobies

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #47 on: February 02, 2019, 02:00:23 pm »
I installed update 0.7 for this plugin and change the settings to Invert, but the "motion" device is still untripped. Also after reload luup engine.
Does anyone have a solution.
Thanks

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #48 on: February 03, 2019, 10:02:05 am »
I installed update 0.7 for this plugin and change the settings to Invert, but the "motion" device is still untripped. Also after reload luup engine.
Does anyone have a solution.
Thanks

here is a procedure to try to help
1 enable DEBUG mode,  reload the plugin
2 go to netmon STATUS tab, click on the TEST button for your device
3 get the log file from vera
4 share here or with me by email. 
( I need the whole sequence in debug from the NETMON startup )
thx

Offline bobies

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #49 on: February 03, 2019, 10:56:37 am »
Thanks for the reply, but were can I find this log file after debug is enabled?

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #50 on: February 03, 2019, 10:59:33 am »
Thanks for the reply, but were can I find this log file after debug is enabled?

Q: How to get logs
A: Several methods
a) classic way
1) turn on DEBUG 2) open http://Your.Vera.IP.Address/cgi-bin/cmh/log.sh?Device=LuaUPnP 3) let it run for a while so the problem happens 4) in your browser save the file on your disk  5) open with an editor (notepad or whatever ) and search for your iCloud email , change email/pwd so I do not see it , save the file 6) send it to me using PM on this forum

b) using infoviewer
1) open InfoViewer, put the pattern to "netmon"
2) open Infoviewer page then View Logs
3) same as above a.4 a.5 a.6

c) using WinSCP / Windows
1) use WinSCP
2) chose SCP as file protocol
3) Hostname = your vera ip address , username=root , Password= your vera password
4) once logged in , go to folder /var/log/cmh/
5) select file LuaUPnP.log , drag and drop it on your desktop
6) same as a.5, a.6

Offline wmwnd

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #51 on: March 01, 2019, 08:37:20 am »
having the same problem, although I inverted a tested node, it is  mentioning off-line , but test button tells on-line

Offline florianec

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #52 on: March 15, 2019, 03:44:12 pm »
today i installed v0.7 and also struggled with the inverted option always showed off-line. I think the problem is in line 389 (L_NETMON.lua) always return "true" if inverted is set to 1. I am not very familiar with lua but i always had this urge to solve problems so i did a bit trial-and-error and changed your code for testing:

line 389 (L_NETMON.lua) >
Code: [Select]
local value = (inverted==1 and not success) or (inverted==0 and success)
it works but its probably not the correct way to code it.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #53 on: March 17, 2019, 06:42:18 pm »
today i installed v0.7 and also struggled with the inverted option always showed off-line. I think the problem is in line 389 (L_NETMON.lua) always return "true" if inverted is set to 1. I am not very familiar with lua but i always had this urge to solve problems so i did a bit trial-and-error and changed your code for testing:

line 389 (L_NETMON.lua) >
Code: [Select]
local value = (inverted==1 and not success) or (inverted==0 and success)
it works but its probably not the correct way to code it.

please try version 0.8 on github and let me know how it goes. I refactored some important logics in it
https://github.com/amg0/NetMonitor