We have moved at community.getvera.com

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

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: New Plugin : NETMON - a network device monitor
« Reply #15 on: June 20, 2018, 09:53:52 am »
I think the point is when a device has the embedded flag set too ne all it?s children devices are following it in the same room.
NETmON plugin uses the embedded flag so on vera all children follow their father in the same room and apparently on openluup not hence my inference that embedded flag may not be implemented on openluup. ( have not tested )

OK on that.  I'll check, but I thought that I had correctly implemented this behaviour.

However, my recent post was a separate enquiry altogether... how to invert the sense of the 'Tripped' variable.
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 sk1.publicc

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +2/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #16 on: June 25, 2018, 10:51:49 pm »
Loving this plug-in.  Have teamed it up with Homewave to monitor all of my Milight Bridges.
Helps flag any connectivity issues quickly and before I waste time troubleshooting scenes that aren't working.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #17 on: June 26, 2018, 03:08:34 am »
Loving this plug-in.  Have teamed it up with Homewave to monitor all of my Milight Bridges.
Helps flag any connectivity issues quickly and before I waste time troubleshooting scenes that aren't working.
thank you for the feedback

Offline ojovilla

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #18 on: October 06, 2018, 09:56:48 am »
Mine seems to always be in a constant state of tripped.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #19 on: October 06, 2018, 10:34:45 am »
Mine seems to always be in a constant state of tripped.
Looking into this
Also it would be useful if you could share a Vera log file captured with the plugin in debug mode.


Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #20 on: October 06, 2018, 12:37:50 pm »
Mine seems to always be in a constant state of tripped.

you may have version 0.2.  Version 0.4 fixed this
I had this on github since a while but did not yet published it to mios app store. this is done now but it will take some days for MCV to approve it
in the mean time you can either take the github version https://github.com/amg0/NetMonitor or install it by opening a browser with this url and ignoring the error messages

http://<yourveraip>/port_3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=9081&Version=36920

Offline ojovilla

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +0/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #21 on: October 08, 2018, 10:50:38 pm »
I believe I am on the latest version , at least it says 0.4. here is the log below, If I am reading this correctly , it appears to be have an error on ping and changing the ip address.

luup_log:216: NETMON: warning: Device 192.X.X.2 did not respond properly to { "type": "ping", "name": "Iphone", "ipaddr": "192.X.X.X" } probe <0x72eb2520>
02   10/08/18 20:04:02.351   15622 updated ip 192.X.X.3 mac .......




Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #22 on: October 09, 2018, 12:51:26 am »
I believe I am on the latest version , at least it says 0.4. here is the log below, If I am reading this correctly , it appears to be have an error on ping and changing the ip address.

luup_log:216: NETMON: warning: Device 192.X.X.2 did not respond properly to { "type": "ping", "name": "Iphone", "ipaddr": "192.X.X.X" } probe <0x72eb2520>
02   10/08/18 20:04:02.351   15622 updated ip 192.X.X.3 mac .......

Can you ssh into Vera and try to ping this device from the shell cmd line ?

Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #23 on: January 13, 2019, 05:25:48 pm »
HI amg

I was trying to incorporate the plugin into a notification of some type when I stumbled on what looks like some errata code in the D_NETMON_UI7.json file.  Code is near the bottom and is part of the notification tab.

However, my main request has to do with creating some code that will send a push notice whenever a given device goes offline.  Rather than create a notice for each and every device (I have quite a few), I was thinking of a function within the plugin itself that would populate a service variable with the names of any offline devices.  Then one could access that variable, and use its description as the message body within a push notice.   I imagine I would use this same empty variable as the state point and when it populates, it would trigger the notice.  Or perhaps there's a better way to what I'm trying to do.

Is this doable?  If not, no worries.
Thx

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #24 on: January 13, 2019, 05:35:34 pm »
Hello
I probably do not fully understand. Every device is a motion detector so a device going offline can be detected by an event on the tripped event of that device ( or a Luup variable watch on Tripped variable ), can?t it ?

Thx for the notice on the json I ll have a look

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #25 on: January 13, 2019, 05:42:29 pm »

I was trying to incorporate the plugin into a notification of some type when I stumbled on what looks like some errata code in the D_NETMON_UI7.json file.  Code is near the bottom and is part of the notification tab.


I could not find the problem, could please you show it with a snapshot of code or screen ?

Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #26 on: January 13, 2019, 06:10:43 pm »
Here's a snapshot of the file contents.

Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: New Plugin : NETMON - a network device monitor
« Reply #27 on: January 13, 2019, 06:13:38 pm »
Yes, I can detect individual devices using a notification for each device.  However, since I have a great many devices hanging off my Network (and being monitored) I do not want to have to create an individual notice for each device, but rather one single notice that would fire if any device went offline. 

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #28 on: January 13, 2019, 06:24:39 pm »
Yes, I can detect individual devices using a notification for each device.  However, since I have a great many devices hanging off my Network (and being monitored) I do not want to have to create an individual notice for each device, but rather one single notice that would fire if any device went offline.
Ok, did you also see the 2 Events ( offline count goes below and goes beyond ) ?
Then we can think of something else like  the DeviceStatus variable that contains a json  array , I need to check if a luup watch on this variable would work

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +209/-8
Re: New Plugin : NETMON - a network device monitor
« Reply #29 on: January 13, 2019, 06:25:44 pm »
Here's a snapshot of the file contents.
Ok but what is the problem? This looks correct