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


Question

Posted (edited)

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

Recommended Posts

  • 0
Posted
15 minutes ago, AutoFrank said:

 

 

Hi @emielstroeve

That's an interesting idea..

Do you on what the range of an ibeacon is  ?

Could it also solve the "I've arrived home" problem (front gates, front door)  

 

Thoughts ?

 

_f

 

The iBeacon range isn't the problem: 

Please login or register to see this link.

 

 

The problem is interfacing with the iBeacon system and getting HC2 triggered when someone enters an area. iBeacon is designed to be used in an app, intelligence of iBeacon technology lies in the system using it. There are SDK's and cloud solutions with API's, but if you want to have your presence available via a cloud..... Off course it is secure ;-) 

 

Ideally the Fibaro app should be made iBeacon aware, than we're there! But I guess Fibaro sells less detection devices if iBeacon can also do that, unless they integrate an iBeacon in their devices.

 

wouldn't that be cool!? 

  • 0
Posted
5 hours ago, emielstroeve said:

could iBeacon technology help us out here? Just stick some ibeacons in your house, get the API and find a way to trigger HC2 with an event when someone enters the area.

 

Solves our Android problem as well ;-)

 

This one might help?

 

Please login or register to see this link.

  • 0
Posted
5 hours ago, Sirhideo said:

 

This one might help?

 

Please login or register to see this link.

the Mother Sense Cookie fob costs well over 200 euros "EACH."  ya thats a big NOPE!

there is a VD floating around that uses the MAC ID of your phone when you connect to wifi thats "free" and is always dependable...

Please login or register to see this link.

 

use google translate to read it.  its what i use

  • 0
Posted
On 27/06/2017 at 3:52 AM, matt1981 said:

the Mother Sense Cookie fob costs well over 200 euros "EACH."  ya thats a big NOPE!

there is a VD floating around that uses the MAC ID of your phone when you connect to wifi thats "free" and is always dependable...

Please login or register to see this link.

 

use google translate to read it.  its what i use

@matt1981

 

Yeah I have tried deploying Presence_XXX 2.1 and result is very bad.  When I am at home with my iPhone mac address in range, I still keep receiving pushover AWAY and HOME messages.  This pair of messages come almost at the same time. Away -> Home within 5 seconds and keep looping until I leave my home next day...

  • 0
Posted

Sounds like you've had some pretty bad luck with that VD.... Its also been hit or miss for me to... I'm curious to know if you're using anything in it's place or did you just abandon trying to use a presence sensor? I'm definitely open to better options! 

 

Matt

  • 0
Posted
On ‎26‎-‎3‎-‎2017 at 6:48 PM, AutoFrank said:

 

Please login or register to see this code.

 


I use the code above, works great but i would like to check two sites ( e.g. )

if jN[k].device == "AppleTV" and jN[k].online == 0 and if jN[k].device == "Internet" and jN[k].online == 0 then

the AppleTV is found in the string ( online == 0 ) but Internet not, do i need to modify : for k,v in pairs(jN) do

  • 0
  • Inquirer
  • Posted
    1 hour ago, Gido said:


    I use the code above, works great but i would like to check two sites ( e.g. )

    if jN[k].device == "AppleTV" and jN[k].online == 0 and if jN[k].device == "Internet" and jN[k].online == 0 then

    the AppleTV is found in the string ( online == 0 ) but Internet not, do i need to modify : for k,v in pairs(jN) do

     

    Hi @Gido

     

    The code is failing as the both conditions are never true for a given set of k,v pairs

    You will need to loop through the table twice

     

    Try this (I'm not at home and can't run it but should be okay ) 

    Please login or register to see this code.

    This assumes that both the internet and the appletv status are tracked in the same global (NetworkTable)

    If not then add a new global table reference and modify the first loop to read from that global

     

    You may want to adjust the logic at line 20 

    IT assumes that if either the appletv or the internet is offline you will want the light switched off

     

    _f

    • 0
    Posted

    What if an ip device is connected, but no port is available. Like my Solar Edge Converter. All ports are closed, but I am able to ping the device.

    Is there another way to look for the mac address to see if the unit is online or offline ? Is this possible to build into the  Network Device Monitor VD script?

    • 0
  • Inquirer
  • Posted
    On 8/30/2017 at 0:29 PM, samuel said:

    What if an ip device is connected, but no port is available. Like my Solar Edge Converter. All ports are closed, but I am able to ping the device.

    Is there another way to look for the mac address to see if the unit is online or offline ? Is this possible to build into the  Network Device Monitor VD script?

     

    @samuel

    Unfortunately if no port is open locally then it won't work. (I have the same issue with my heating controller)

    The reason is because it is not a true ping like one we all know. The VD just tries to open a socket connection to a specific port and if successful deems that device to be online. It's not perfect but with the lua that is implemented on the HC2 , its the best I know about

     

     

     

     

    • 0
    Posted

    What about using an ARP list, like similar as @Lambik


     

    Then off course modify it, so that it works!

     

    Please login or register to see this code.

    In the script you will find Added by Sboerhoop - 2 lines

    Made Label VD's, more or less working, but if one mac address is offline from the VD labels, then it will post the mac address not by the correct labels.

     

     

    • 0
    Posted

    Detecting an iPhone using the TCP-stack works, when you activate the iPhone by sending a push message first. So upon opening my front door, HC2 sends a push message and "pings" the iPhone by writing 'ping' via the TCP-stack. After a successful write, the alarm FSM goes to "home".

     

    However, when I tried to write a virtual device that waits until the iPhone 'leaves' my wifi network, I encountered an annoying problem with the TCP stack: it has a blocking timeout that cannot be shortened, i.e. when the iPhone "leaves' (wifi switched off or put on airplane mode), the TCP stack waits for 22 seconds before it notices that the connection is lost! Settimeout did not alter the behaviour, and of course no documentation is to be found about the (Fibaro version of) TCP stack...

     

    Does this documentation exist somewhere?

    • 0
    Posted

    the  main loop does loop in my program:

     

    it give me the follow error 

     

    [DEBUG] 22:45:27: Internet
    [ERROR] 22:45:27: line FTcpSocket:

     

    function popTable()
      jsonNetwork = {                                                                     -- alert = 1 = receives an alert
        {device = "Internet",            ip="10.0.1.1",           port="80",    online = "0", alert = "1", alertTrack = "0"}, -- 1

    ..... etc etc..

                  }

     

    what i am trying to do is outline the Offline and online to the right. I just started with it, that it gave me an error, see above.. the first one from the the jsonNetwork variable

    what can that be?

     

    as you can see at: 

           if i == 13 then
                fibaro:call(thisId, "setProperty", "ui.Label13.value", "      Online");
                fibaro:debug("HP Printer online")
            else
                fibaro:call(thisId, "setProperty", "ui.Label"..i..".value", "   Online") 
            end 

     

    its populating the table into the variable

    HC2 4.140 version

    Please login or register to see this code.

     

    • 0
  • Inquirer
  • Posted

    Hi @samuel

     

    I'm not sure what you're looking to do 

     

    Would you mind posting (or PM me) the full main loop and the error you're seeing and I can take a look

    I'm running 4.140 and all working for me

     

    Thanks

    • 0
    Posted (edited)

    For galaxy s8 the port is 7080.

    For Global Cache ITach 4998.

    Edited by dimoulias
    • 0
    Posted

    Hi,

     

    i own some ANDROID Handys like Samsung Galaxy S7. Port 5060 is not working. Portscanner says all Ports closed and Lan Monitor not detects the Status. The only Idee i have i installed a web server on my handy and configure Port 8080. That works when Server is up and runing. But it's very bad Idea to run a Webserver on handy for online / offline checks. Have any another Idee what can i do to hold open a Port on Android?

     

    BR Tom

    • 0
    Posted

    Hi,  where can I download ?

    • Please login or register to see this link.

    • 0
    Posted

    Notifications does not work for me lately. Has worked fine until some time ago, last email I received was a couple of months ago (my lan is very stable so I hadn't noticed until today). I'm on 4.180 now.

     

     

    • 0
    Posted

    Hi @AutoFrank ,

     

    Could you please move this topic to the Downloads? ;)

    • 0
    Posted (edited)

    I like to thank @AutoFrank  for sharing this VD!

    It is great to get notifications/status of critical network devices. I had an issue with false alarms so I modified a little the code so to retry more than 1 time if device is offline. Also it increase time between checks by 1 second if device is still offline.

    Be kind with me, as it is my first **modified** VD. Once again thank you @AutoFrank !

     

    Please login or register to see this code.

     

    Edited by korniza
    • 0
    Posted

    Hi @korniza it woul'd be nice if your mods were displayed in different colour and commented :-)

     

    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...