Determining what zwave values are creating the most traffic

There have been a number of cases who’s problem is there’s “too much data” on the zwave network. As a result I’ve been looking at my network to see how it is doing and if I have some data that is updating more than I need it to. AFAIK, there is no good way to do this, beyond looking at zwave statistics (which only tell you the node with the most RX) or poking around in the logs.

So, I wrote a shell script to help. The simplest source seemed to be the z-ui* log files - which are in the zwaveui log directory. Logging will need to be enabled at an INFO level or higher.

Here’s my functional non-elegant script.

#/bin/bash
grep INFO $1 | grep -i "value updated" |  
    awk -F: '{print $4,$5}' | 
    sed s/'=>.*'//g | 
    sed 's/\[Node //g' | 
    sed 's/] Value updated //g' | 
    rev | cut -d ' ' -f 3,4,5,6,7,8,9 | rev |
    sort |
    uniq -c |
    sort -nr

I put this info a file called z-ui-log-analyzer.sh and then run it against yesterdays log file.

 ./z-ui-log-analyzer.sh z-ui_2023-01-31.log  | more

Which creates this output.

So, we can see that Node 15 Air Temperature is updating every minute (1440 minutes in a day) which I don’t need it to. Not sure of the other stuff yet, but I’ll work down the list from top to point of diminishing returns.

   1441 15:49-0-Air temperature
    646 22:49-0-Humidity
    368 17:49-0-Humidity
    366 13:49-0-Air temperature
    364 13:49-0-Humidity
    360 13:49-0-Illuminance
    359 4:49-0-Illuminance
    359 4:49-0-Humidity
    359 4:49-0-Air temperature
    290 8:49-0-Air temperature
    289 8:49-0-Illuminance
    289 10:49-0-Air temperature
    288 14:50-0-value-66817
    288 14:50-0-value-66561
    288 14:50-0-value-66049
    288 14:50-0-value-65537
    288 10:49-0-Illuminance
    270 22:49-0-Air temperature
    237 17:49-0-Air temperature
    194 22:69-0-state
    184 12:38-0-currentValue
    184 11:38-0-currentValue
2 Likes

@PeteRage,
Would you happen to have an updated version of this script ? It returns nothing for my z-ui_2023-09-21.log which has over 4000 lines.
Here is a sample line :

2023-09-21 13:59:00.087 INFO Z-WAVE: [Node 070] Value added 70-112-0-17 => 0

edit: it was a simple matter of changing “value updated” to “Value updated”. Now I got valid output.

 90 :[087] Value
 59 :[117] Value
 37 :[024] Value
 26 :[025] Value
 16 :[113] Value
 16 :[057] Value
 16 :[003] Value
  5 :[085] Value
  5 :[083] Value
  5 :[081] Value
  2 :[105] Value
  2 :[094] Value
  2 :[093] Value
  2 :[091] Value
  1 :[012] Value

I guess I need to let it run for a day to get more data.

1 Like

Sounds like they changed the log format. I’ll look at it, as it looks like you are missing the value that updated. But at least you can see that node 087 and 117 are sending the most data.

I updated the script it works much better now and prints out the sensor with the counts

2 Likes

Is it possible to run this on Home Assistant OS? If not is it possible to download my log files and run this script on my computer?

Yes you should be able to run it from a command prompt on HASS os.