Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

[VD] Network Device Monitor {v2.5} & {v2.6}


AutoFrank

Question

Hi Everyone

 

v 2.6 now available for users that have the SMsgH installed

 

Three offerings - Please read below to see which is right for you

1) WWWAPI Monitor {v1.0} - New (Mar8th) - vd that monitors only availability of the internet with option for sonos-api device. (leverages

Please login or register to see this link.

 {v1.0} 

 

2) Network Device Monitor VD {v2.5} - vd that can monitor several + devices and has built-in alert notification options (pushover/pc2popup/hc2email/allinone)

         or 

3) Network Device Monitor VD {v2.6}  - vd that can monitor several + devices and deigned to be used with the recently released 

Please login or register to see this link.

 {v1.0} 

 

Regards

[Autofrank]

 

LAN Monitor / Network Device  Monitor {v2.6} ------ to be used with Smart Message Hub {v 1.0}

Modified to to be used with Smart Message Hub

- Label check removed to simplify virtual device

4 simple steps to upgrade from v2.5 to v2.6

  1. Import the new virtual device
  2. Configure your SendMsg preferences 
  3. Copy your v2.5 jsonNetwork table to v 2.6 and set UpdateData to 'true'
  4. Set UpdateData to 'false' and that's it !!

 

LAN Monitor / Network Device  Monitor {v2.5} ------ has built in Notification Services

The main difference between 2.0 and 2.5 are the following

  • Virtual Device ONLY - ( no need for separate scene, table updates are now done through VD)
  • Global variable table is created automatically created for new users
  • Added HC2 Popup service as an extra notification option

 

The following features are still available

  • Individual LAN devices can be marked for Alert
  • Alert Notification options configurable for HC2 email (default), pushover, or ALLINONE (@jompa68)
  • One Alert will be received when device goes offline and another when it comes back online
  • Online/Offline status is captured in global table that can be used to trigger other events
  • Debug routine called vdCheck will verify that correct quantity of vd labels and format was setup
  • Status/Error/Check feedback through the virtual device log console as visible through the Web UI 

 

I use this to monitor Internet, Unifi Security Gateway, HC2, Sonos API (pi), TV's, Sat Box, Apple TV, Droid Box, Alarm Panel, Alarm Gateway, Syn NAS Global cache device, Cameras, Tablets, Sonos players, Access points and phones. Alerts setup for Internet, USG, Sonos API, Access points, cameras, Sonos players, Alarm panel, alarm gateway and NAS. There are some nuances with some devices such as TV's and Phones.

 

Open Ports of some devices that were shared by users

  • Internet google (port 80)
  • Sonos players/zone (port 1400)
  • Sonos API (port 5005 or 5006)
  • Raspberry Pi Hosting API (port 22)
  • iPhone Port (port 62078)
  • Smarter coffee maker (port 2081)
  • Smarter iKittle (port 2081)
  • Philips TV 47PFL5000 (port 1925)
  • Foscam cameras (port 88)
  • NAS Netgear U6 (port 80)
  • Global cache GC100-12 (port 21)
  • Humax FoxSat satellite receiver(port 80)
  • Apple TV Gen 3 (port 5000)
  • NPET MXQ Pro TV Box - Android 5.1 (port 7002)
  • Sony TV’s (port 80)
  • Samsung TV (port 8080)
  • Synology NAs DS415Play (port 80)
  • SPC Gateway (port 80)
  • Siemens Alarm Panel (port 443)
  • HKVision IP Camera (port 80)
  • Unifi security Gateway (port 80)
  • Unifi UniFi AC LR Access Point (port 22)
  • Samsung Galaxy S6 / S7 (port 5060)
  • Samsung Tablet (port 5060)
  • Generic Android Tablets (port 5060)
  • Airport Express and Airport Extreme (port 5009)
  • Amazon Echo Dot and Fullsize Echo (port 4070)

 

== INSTALLATION: Upgrading from 2.0 ==
    - Import the LAN Monitor 2.5 VD and copy in device table from Update Network Table 2.0
    - Run VD with updateData  = "true" to update the Network table (default setting is false)
    - Run VD with updateData  = "false" to operate in normal mode
    - Update notification and frequency of update options

 

== INSTALLATION: First Time Users ==
STEP 1  - Import the LAN Monitor 2.5 virtual device
        - Populate the device table. Device, ip, port and enter alert = "1" for device notification

               - alert is user configurible per device

               - alert = 1 (enable alerts - alerts sent if it goes offline or comes back online )

               - alert = 0 (disable alerts for this device)

        - Select the notification options 
        - Run VD with updateData  = "true" to populate the device table
        - Run VD with updateData  = "false" to operate in normal mode

Step 2 (optional) - create labels to display device status in VD
        - Create one label for each device in the global variable table, use the default ID - Label1, Label2, etc. 
        - Enter Label Names (1, 2, 3, etc) to match order order of devices in Table (devices can be skipped but ID's must match)
        - Select Main  label to display one device when observing through Web UI 
        - If you want to use all labels you can use Set vdCheck = "true" to confirm correct quantity and format of labels.

 

 

Please login or register to see this attachment.

    

 

== FILES ==

Use the version if you don't have Smart Message Hub installed

>> Network device Monitor VD {v2.5} ------------> 

Please login or register to see this attachment.

 

Use this version if you HAVE Smart Message Hub installed

>> Network Device Monitor VD {v 2.6} -----------> 

Please login or register to see this attachment.

 

 

 

Thanks to @jompa68 , @petergebruers , @sonnyboy and @boerremk for their input

 

Regards

-f

 

Edited by AutoFrank
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Recommended Posts

  • 0
  • Inquirer
  • 35 minutes ago, mortesan said:

    You can use port 5009 for the Airport Express and Airport Extreme

     

    Thanks @mortesan, I added those to the list in post 1

    Link to comment
    Share on other sites

    • 0

    very useful VD. 

    I have simple question for you mastering LUA and scenes. I would like to create a scene that is triggered by the "online" "offiline" status of a network device. When the AppleTV is online, turn on the light. How can I do that? I need a sort of gloval variable for the device monitored by the VD?

     

    thank you

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 6 hours ago, dancar said:

    very useful VD. 

    I have simple question for you mastering LUA and scenes. I would like to create a scene that is triggered by the "online" "offiline" status of a network device. When the AppleTV is online, turn on the light. How can I do that? I need a sort of gloval variable for the device monitored by the VD?

     

    thank you

     

    Hi @dancar

    Do you have either the LAN or WWAPI monitor installed ?

    If so let me know and I can send some code...

     

    -f

     

     

     

    Link to comment
    Share on other sites

    • 0
    6 minutes ago, AutoFrank said:

     

    Hi @dancar

    Do you have either the LAN or WWAPI monitor installed ?

    If so let me know and I can send some code...

     

    -f

     

     

     

    Hi,

    I've only Network Device Monitor v.2.5 installed.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Just now, dancar said:

    Hi,

    I've only Network Device Monitor v.2.5 installed.

     

    @dancar

     

    perfect - let me put something together and send it on ...

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 55 minutes ago, dancar said:

    Hi,

    I've only Network Device Monitor v.2.5 installed.

     

    Hi @dancar

     

    There are two ways to solve this

     

    Approach 1)

    Read from the network table the online/offline status of the appleTV and store that status in a global varibale

    Have a scene monitor that global variable using a trigger in the header to check and depending on status it can turn on/off light

     

    Approach 2) - This is the solution below

    Monitor the online/offline status in the network table (generated from the LAN monitor) using the main loop in a VD

    Turn on/off light depending on state of appletv and state of light

     

    Copy into main loop of VD, change ID of light

    If your light is a dimmable one you may want to replace the 'turnOn' with a 'setValue'

     

    hope this helps

    -f

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
    On 26/3/2017 at 6:48 PM, AutoFrank said:

     

    Hi @dancar

     

    There are two ways to solve this

     

    Approach 1)

    Read from the network table the online/offline status of the appleTV and store that status in a global varibale

    Have a scene monitor that global variable using a trigger in the header to check and depending on status it can turn on/off light

     

    Approach 2) - This is the solution below

    Monitor the online/offline status in the network table (generated from the LAN monitor) using the main loop in a VD

    Turn on/off light depending on state of appletv and state of light

     

    Copy into main loop of VD, change ID of light

    If your light is a dimmable one you may want to replace the 'turnOn' with a 'setValue'

     

    hope this helps

    -f

     

    Please login or register to see this code.

     

     
     

    Approach #2 simply works! Thanks!

    Question (I'm not a  SW engineer): I had the same result using the almost the same code inside a Scene rather than a VD. Any suggestion going in one or the other direction?

     

    Thanks

     

    Edited by dancar
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 44 minutes ago, dancar said:

    Question (I'm not a  SW engineer): I had the same result using the almost the same code inside a Scene rather than a VD. Any suggestion going in one or the other direction?

     

    hi @dancar

     

    The only real difference between scene or VD is that if you use a VD Main Loop it will run continuously.

    If you use a scene you will need a way to schedule it to run like @Sankotronic Main Scene

     

    It is very much a case of what suits you. 

    In my setup at home I have some devices that I need checked every couple of seconds (such as the internet, sonosapi, TV in the playroom as I switch off  the sonos music when they switch on the TV)

    Other devices I could check every 5-10 mins (such as my sonos zones themselves and my access points, etc)

    and other devices that could check once an hour

     

    when I rewrite the Monitor I'll try and add the flexibility..

    In my current setup I use the wwwapi monitor for internet and sonosapi and the LAN monitor for the rest of my devices

     

    does this help ?

    -f

     

    Link to comment
    Share on other sites

    • 0

    Does anyone know the port for Amazon Echo ?

    It is the only Device, that is shown *offline* but Alexa talks to me :-)

     

    Amazon tells:

    * Output TCP: *, 80, 8080, 443, 40317, 67, 68

    * Output UDP: *, 53, 123, 40317, 49317, 33434, 1900, 5000, 5353

    * Input TCP: 8080, 443, 40317

    * Input UDP: 53, 67, 68, 1900, 50000, 5353, 33434, 49317, 40317

     

    None of the three TCP ports work with the Monitor 2.5

    Edited by Orgli
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 25 minutes ago, Orgli said:

    Does anyone know the port for Amazon Echo ?

    It is the only Device, that is shown *offline* but Alexa talks to me :-)

     

    Amazon tells:

    * Output TCP: *, 80, 8080, 443, 40317, 67, 68

    * Output UDP: *, 53, 123, 40317, 49317, 33434, 1900, 5000, 5353

    * Input TCP: 8080, 443, 40317

    * Input UDP: 53, 67, 68, 1900, 50000, 5353, 33434, 49317, 40317

     

    None of the three TCP ports work with the Monitor 2.5

     

     

    @Orgli

    I happen to have a dot just powered up this morning and its next to me...

    A scan by Fing reveals no open ports to my network..

    Let me dig a little deeper

    Edited by AutoFrank
    Link to comment
    Share on other sites

    • 0

    Same here...portscan negative, ping negative, tracrt ends at router...but alexa still works (and is telling jokes, while commanding my Neato Botvac;D)

    Edited by Orgli
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 4 minutes ago, Orgli said:

    Same here...portscan negative, ping negative, tracrt ends at router...but alexa still works (and is telling jokes, while commanding my Neato Botvac;D)

     

    @Orgli

     

    My Echo Dot is showing open on port 4070 and the LAN monitor is showing online

    Try that and let me know...

     

    -f

    Link to comment
    Share on other sites

    • 0

    Damn! You are great. Now it works!!!

     

    ...and I'll open a Magners' pear  - Here's to you !!!

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Just now, Orgli said:

    Damn! You are great. Now it works!!!

     

    ...and I'll open a Magners' pear  - Here's to you !!!

     

    @Orgli

    Enjoy the magners, 

    I'd love to take credit but it needs to go a ZenMap scan...

     

    Please login or register to see this attachment.

     

    I added it to the first post 

    Is yours' a Dot or a full sized Echo ?

     

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 minutes ago, Orgli said:

    Full sized Echo

     

    @Orgli

    Excellent, I'll amend the list of ports on post 1

     

     

    Link to comment
    Share on other sites

    • 0

    What should I do with lines 146 & 166 ?

                local dvc, prio   = "Dad_Phone,Kitchen_iPad", "0"

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 10 minutes ago, Orgli said:

    What should I do with lines 146 & 166 ?

                local dvc, prio   = "Dad_Phone,Kitchen_iPad", "0"

     

    @Orgli

    you only need to use that if you're using pushover notifications for offline and online tracking 

     

    dev - this is the devices as defined in pushover account

    prio - this is the priority and it generally left at 0

     

    BTW - I'm in the process of writing LAN Monitor 3.0 

    This will allow multiple time to track/check devices but will also offer support for my new Smart Message Hub and Simple Logger among other things... 

    Link to comment
    Share on other sites

    • 0

    Some idea for v3.0:

    - Different popType (eg. "Warning" for "offline" and "Success" for "online"

    - In case of offline-notification two buttons, one with just "OK" (i.e. close message) and one with "Refresh" (eg. in case of longer standard polling rates like >3000)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 minutes ago, Orgli said:

    Some idea for v3.0:

    - Different popType (eg. "Warning" for "offline" and "Success" for "online"

    - In case of offline-notification two buttons, one with just "OK" (i.e. close message) and one with "Refresh" (eg. in case of longer standard polling rates like >3000)

    @Orgli

    Thanks for the suggestions ...

     

    Btw, I noticed that my echo went to sleep after 30 mins and showed off line from a network perspective but a voice command woke it and was processed. Based on this the lan monitor may not provide tracking benefit for the echo 

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...