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


Z-Range analyzer 1.3

   (6 reviews)

1 Screenshot

About This File

First of all, I would like to express my sincere appreciation to @10der  @Alex @petergebruers  @robmac  @amilanov @Bodyart @drboss and others for their time and help to improve / debug the code.

The scene “analyzes” mesh network configuration in the system and displays the location efficiency of the devices in table format. Table sorted by the rooms according to average location efficiency of the devices in the room (in ascending  order - from lowest to highest efficiency). More like "Z-wave mapping" in your residence.

In addition scene analyzes location efficiency of HC2 location.

To achieve precise data, please make sure your devices' physical location correctly associated with room names.

For example:

in-wall switch located in kitchen, but controls lights in garden, should be assigned to kitchen and not garden.  (the device name should be assigned as  garden lights)

Usually inclusion of the device done close to HC2 therefore the route table is incorrect. To achieve reliable data, perform inclusion when device located in designated place/spot in residence or perform Mesh Reconfiguration to device after inclusion near to HC2.

User configurable parameters,:

  1. showDevices=false          if set tot true,not sorted table of all devices will be displayed also).
  2. fontSize=100     font size percentage (80% - 150%).

Big Note: 

If you've removed device which is part of mesh route to others, the route table doesn't get updated !

Controller continues to maintain undated route table! Mesh table must be reconfigured. (Z-Range Analyzer identifies these devices.)

Warning: Battery powered devices cannot forward packets and cannot be used in route for others.  

Spoiler

Capture1.PNG.361218a63c7676c50cc889df11af0b1d.PNG

To observe data in graphic, use @10der's visualizer.

 

Run the scene and here some details on what will be displayed:

When or if corrupted/deleted devices have found in your system, data details will be printed before table appearance.

Spoiler

Capture.PNG.efa07b70705d7f4f6a7609a0c3e4ab56.PNG

 

Table header:   

Spoiler

Capture.PNG.90a8f467ea2911974b2bc19a28e7d068.PNG

·       Number of master (physical) and slave devices in the system. By hovering mouse over controller name, table color index and Z-Capacity are shown

Spoiler

Capture.PNG.c52de332ab1f4ce9a5ac562c9367ab7d.PNG

·       Date range of displayed data (if any changes done like adding, relocating devices after this date, mesh reconfiguration requires)

·       HC and devices location efficiency.  If devices lack mesh route data (colored by red) present in the system, two efficiency numbers displayed. (50%/60%).

  1. including devices with no routes and neighbors data
  2. excluding these devices.

Table columns:

Capture.PNG.4fcd4847c100230a9570e47a531a36d9.PNG

 

1.   

Script's total serial number / Script's serial number in room

2.    Room Name  %

Spoiler

Capture.PNG.c285d9ece411f3755a4e2ac14d928a0d.PNG

Room name and average location efficiency of the devices in room

3.    Parent ID: Name

Spoiler

Capture.PNG.e013ce8446aa11403165657b1b1cd0a8.PNG

Parent (master) device ID, name and room. Devices lack mesh route data colored by red. By hovering mouse over, child (slave) devices list is shown (and number of last 24 hours z-wave events of each slave)

4.   %

Percentage of location efficiency of each device in the room.

5.     iSee

Spoiler

Capture.PNG.af29d715ea6fe30344ca9f63b06abbf6.PNG

Total number of neighbors (adjacent) devices that it can communicate with (seen by device). By hovering mouse over, devices details are shown. Great view on how device located by seeing who neighbors are.

    The data shown in two colors:

                    I.            green - Device can communicate directly to controller. Shades of green according to number of adjacent neighbors. greener, more neighbors)

                  II.            red - Device doesn’t communicate directly to controller.  Shades of red according to number of adjacent neighbors. (redder, less neighbors)

If tilde sign appears before  the number - means the list includes device(s) that not in the system (deleted device). I devices details menu this device marked grey.

 

4.     Last Route

 List of devices that participate in route communication to controller. By hovering mouse over list of devices details is shown.

Spoiler

Capture.PNG.4e9bd02ea940e3bfd59eafbd5e0c4741.PNG

3.     iRoute

Total number of devices where this device is part of communication route. By hovering mouse over, devices details are shown.

5.     Status

Last working route status. (OK, pending, in progress, error)

6.     Time Stamp

Time stamp of last working route reported to the controller.         

7.     24History

Master's last 24 hours events number and percentage of total events. By hovering mouse over parent in Parent ID: Description column, number of z-wave events for each slave is shown. Please notice 24 hours history based on saved logs in event panel. If you have devices that excluded from saving logs,  theirs events are not available.

 

Points for improvement

Location efficiency calculated relatively to your best device in system, therefore red and yellow marked devices don't necessary indicates that your system is broken.

Special attention requires when changing/removing physical place of devices in location with low efficiency level, it could cause loss of communication or delays.

 

        I.            Parent ID: Description - Device marked red indicates lack of route data. Perform mesh reconfiguration for this device. If reconfiguration failed, recommended to exclude/include the device (Painful process and occasionally updates in code are required).

      II.            Last Route - More devices in route increase probability of communication delay and indicates that device is in distance from controller.  Since in Z-Wave each device calculates the shortest route to the destination (up to 4 hops), therefore if route includes more than three devices recommended

  1. Check/verify devices in route as well. Mesh reconfiguration recommended.
  2. Device is far away from HC2 or Z-wave signal interrupted.

    III.            iSee - If number is in shade of red and relatively low, means the device located far away from controller and low number of adjacent neighbors in that area or device located where physical barriers such as metal panels, concrete walls and etc. are blocking Z-Wave signal. (or located in-wall socket and Z-wave signal interrupted) Increased probability of packets loss rate, delay expected.

    IV.            iRoute - As much as number is higher, means increased workload for this device (needs to track messages from this number of neighbors). Increased probability of delays from device and routed devices.  Recommended number less than five devices.

      V.            Route tables do not get automatically updated by adding a new device or device relocation. Mesh reconfiguration (in Z-Wave Panel) requires.

Do not reconfigure mesh network when devices are not in designated spot.


What's New in Version 1.3   See changelog

Released

Added new column 24History

Last 24 hours events number and percentage of total events. By hovering mouse over parent in Parent ID: Name column, number of z-wave events for each slave is shown.

Spoiler

Capture1.PNG.58827bab0aea2e9229fcd03cbbe33f6d.PNG

Spoiler

Capture.PNG.7c3dcfa6df89b216e4af69dff90f6198.PNG

Please notice 24 hours history based on saved logs in event panel. If you have devices that excluded from saving logs,  their events are not available.



User Feedback

Recommended Comments



[DEBUG] 10:06:29: Retrieving working routes and neighbor lists...
[DEBUG] 10:06:30: 2019-10-28 10:06:30.936650 [ fatal] Unknown exception: /opt/fibaro/scenes/219.lua:30: attempt to concatenate field '?' (a nil value)

image.thumb.png.c1c95a6cf09313e710351d24e7aa5aaa.png

Link to comment
Share on other sites

Thanks, but

[DEBUG] 10:06:30: 2019-10-28 10:06:30.936650 [ fatal] Unknown exception: /opt/fibaro/scenes/219.lua:30: attempt to concatenate field '?' (a nil value)

shows different line from 

if j.properties.lastWorkingRouteResponseTimestamp>0

 

Trying to figure out where is the bug (which line number)

 

Link to comment
Share on other sites

here is another bug

 

        jDlist["iCdev" .. j] =
            jDlist["iCdev" .. j] ..
            --jDlist["idColor" .. inId] ..
                --string.format(
                  --  "%-" .. dMaxLen .. "s",
                   -- inId .. ":" .. jDlist["pName" .. inId] .. ":" .. jDlist["roomName" .. inId]
                --) ..
              --      endStr[(i % sMod) + 1] .. eF ..
            ""
 

i do not know where. some values is NULL

4 minutes ago, cag014 said:

Thanks, but

[DEBUG] 10:06:30: 2019-10-28 10:06:30.936650 [ fatal] Unknown exception: /opt/fibaro/scenes/219.lua:30: attempt to concatenate field '?' (a nil value)

shows different line from 

if j.properties.lastWorkingRouteResponseTimestamp>0

 

Trying to figure out where is the bug (which line number)

 

 

fixed as

 

        if j.properties.lastWorkingRouteResponseTimestamp or 0 > 0 then
            dateRange.min = math.min(dateRange.mintonumber(j.properties.lastWorkingRouteResponseTimestamp))
            dateRange.max = math.max(dateRange.mintonumber(j.properties.lastWorkingRouteResponseTimestamp))
        end
 

 

Link to comment
Share on other sites

fixed

 

        jDlist["iCdev" .. j] =
            jDlist["iCdev" .. j] or "" ..
            jDlist["idColor" .. inId] or "" ..
                string.format(
                   "%-" .. dMaxLen .. "s",
                   inId .. ":" .. jDlist["pName" .. inId] .. ":" .. jDlist["roomName" .. inId]
                ) ..
              (endStr[(i % sMod) + 1] or "") .. eF or "" ..
            ""
 

 

image.thumb.png.3e97c6139f7edabc7d5e30dff14913d5.png

Link to comment
Share on other sites

Guest cag014

Posted (edited)

Looks like you have a very strange device...

But the location data looks excellent indeed...

Anyone else has same errors?????

Edited by cag014
Link to comment
Share on other sites

Guest cag014

Posted (edited)

I think you have device that looks like parent, but no mesh data at all... interesting

What you've fixed to get the data?

Edited by cag014
Link to comment
Share on other sites

12 minutes ago, cag014 said:

I think you have device that looks like parent, but no mesh data at all... interesting

What you've fixed to get the data?

 jDlist["iCdev" .. j] =
            jDlist["iCdev" .. j] or "" ..
            jDlist["idColor" .. inId] or "" ..
                string.format(
                   "%-" .. dMaxLen .. "s",
                   inId .. ":" .. jDlist["pName" .. inId] .. ":" .. jDlist["roomName" .. inId]
                ) ..
              (endStr[(i % sMod) + 1] or "") .. eF or "" ..
            ""

Link to comment
Share on other sites

just your info.

 

 

   	if jDlist["iCdev" .. j] == nil then
      		jDlist["iCdev" .. j] = "err"
      		print("<h1>", "iCdev", j , "</h1>")
      	end
    
    	if jDlist["idColor" .. inId] == nil then
      		jDlist["idColor" .. inId] = "err"
      		print("<h1>", "idColor", inId , "</h1>")
      	end
    
    	if jDlist["pName" .. inId] == nil then
      		jDlist["pName" .. inId] = "err"
      	    print("<h1>", "pName", inId , "</h1>")
      	end
    
    	if jDlist["roomName" .. inId] == nil then
      		jDlist["roomName" .. inId] = "err"
           	print("<h1>", "roomName", inId , "</h1>")
      	end
 

result

 

[DEBUG] 13:11:16: Retrieving working routes and neighbor lists...
[DEBUG] 13:11:18:
idColor 204
pName 204
roomName 204

[DEBUG] 13:11:18:
idColor 653
pName 653
roomName 653

[DEBUG] 13:11:18:
idColor 733
pName 733
roomName 733

[DEBUG] 13:11:18:
idColor 846
pName 846
roomName 846

[DEBUG] 13:11:18:
idColor 1115
pName 1115
roomName 1115

[DEBUG] 13:11:18:
idColor 1181
pName 1181
roomName 1181

and finally

deivces 

204
653
733
846
846
1115
1181
 

not found in my HC2.

LOL!

 

Link to comment
Share on other sites

Guest cag014

Posted (edited)

Wow... but this is the list that received from /api/devices isn't?

 

Edited by cag014
Link to comment
Share on other sites

1 minute ago, cag014 said:

Wow... but this is the list that received from /api/devices isn't?

 

i have removed device and added as new, now all ok.

it's old china device tkb home plug dimmer. btw a very glitch divice.

and last : befiore remobing i'm trying to force mash for this device - device hanging. ;) it couse root issue here - HC2 cant update neighborList

Link to comment
Share on other sites

That's exactly what I said few days ago (in our Sanity Check messages).

There too many devices that I can't  reconfigure mesh....

As you said "device hanging" with pending status for ever.

Have submitted ticket to support a week ago... no answer yet.

Link to comment
Share on other sites

[DEBUG] 10:19:02: Retrieving working routes and neighbor lists...
[DEBUG] 10:19:05: 2019-10-28 10:19:05.781574 [ fatal] Unknown exception: /opt/fibaro/scenes/252.lua:23: attempt to index field 'neighborListRequestStatus' (a nil value)

I get this error message

Link to comment
Share on other sites

Guest cag014

Posted (edited)

Again... looks like same issue as @10der... do you have any deleted devices that still in the system?

Please try to run attached... device number and name should be displayed

 

Z-Range analyzer_v1.0.txt

Edited by cag014
Link to comment
Share on other sites

[DEBUG] 17:17:22: Retrieving working routes and neighbor lists for 1634:"name of device"
[DEBUG] 17:17:22: 2019-10-28 17:17:22.820558 [ fatal] Unknown exception: /opt/fibaro/scenes/252.lua:30: attempt to concatenate field '?' (a nil value)

So is 1634 the last working device or the one with the problem?

 

 

I did separate line 30 into multiple lines and the error occurs (first time) at "jDlist["idColor"..inId]"

Actually I should not have deleted devices in my system.

Link to comment
Share on other sites

Guest cag014

Posted (edited)

Yes indeed, device 1634. Weird, device's name  is "name of device"?

Could you post the data from /api/devices/1634...

Interesting, if it is parent device, where mesh data gone?

 

Edited by cag014
Link to comment
Share on other sites

Guest Sankotronic

Posted

Hi @cag014 ,

 

Thank you very much for yet another piece of art. ?

 

I have run it on my Angelina and mostly get result that I expected. Since upgrade to last firmware 4.560 and doing syncing of all my z-wave devices with HC2, z-wave network is working stable and without noticeable delays.

 

What I didn't expect is that rooms Terasa (terrace) and Multimedija (Multimedia) would get yellow color and efficiency of less than 70% since devices placed there have direct communication with HC2.

 

On the other hand rooms Sjenica (Shade) and Konoba (Basement) are far from HC2 and devices placed there has no other choice but use other devices to reach HC2. Still, devices placed there have very short delay and I have no trouble with them :-)

 

Wish I can somehow share here complete table here. Anyway most of the table is green except above mentioned rooms and some of the devices.

Link to comment
Share on other sites

@Sankotronic

Thanks...

Location efficiency calculated on how many neighbors device could communicate with.  (Based on you best location in the system)

In your case even if you have direct connection to HC2, if from some reason you'll rearrange the room and Z-wave signal will be blocked from HC2, you could have less efficient connection because devices in this room have less neighbors to found correct route.

If you familiar with @10der visualizer, which maps devices in your mesh network, this scene does almost the same, but maps rooms.

 

Link to comment
Share on other sites

I've just run it for the first time, and still learning it.

Works like charm so far on my 4.570 - good job, well done!

 

It says [DEBUG] 15:26:05: 1

 

Device:157 found in routes table, but not in system's devices !

 

What can I do to correct this error? My system was corrupted a year ago and still some features don't work well. Could this be the cause of this issue?

Thank you!

Link to comment
Share on other sites

Looks like this device has been deleted, but mesh routes didn't update.

To fix it you need to reconfigure mesh.

Spoiler

Capture.thumb.PNG.cf7ca88a3b9aff4c111d433c64a92cda.PNG

 

By the way, please check if any of your scenes or VDs are still trying to use this device? It could freeze your system (for HC2 this device is dead)

Link to comment
Share on other sites

Thanks for your quick reply. I will do this mesh reconfiguration soon. I just have to find a time when the system is not armed for at least 24 hours, since I'm afraid it may trigger false alarm if some devices will wake up during arm period. I have some door sensors I don't want to remove to manually wake them up...

Thank you for the tips!

Link to comment
Share on other sites

Guest cag014

Posted (edited)

You can see in Z-range which devices have this one in route and to reconfigure only these devices

.

By the way if you need a fast way to find if somewhere in your system, you still use this device, please download

 

Edited by cag014
Link to comment
Share on other sites

Thanks for the tips, it's very nice of you. Tomorrow I will have a look on these and try it out after I disarm the system.

Is there any way to enlarge the LUA window in HC2, or open it in another, bigger window?

Cheers!

Link to comment
Share on other sites

15 minutes ago, johndeere said:

Is there any way to enlarge the LUA window in HC2, or open it in another, bigger window?

Unfortunately, no way to resize debug window...

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
Add a comment...

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