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

Z wave monitor to prevent freeze


cag014

Question

Hi all,

I see that some users have downloaded

Please login or register to see this link.

script and I think it could be a good idea to share our data and know-how to optimize our Z-wave performance.

In my case I have manage to reduce Z-wave traffic from average of event per 1.7 sec. to 4.8 sec (24 hours monitoring, 78 physical devices, 382 IDs), but I don't know if this is a good number. It will be interesting if anyone could share  an average of his system. That way we can compare and might be to achieve the right number and stable performance which may be could prevent Z-wave freeze in the future.

I think average of Z-wave traffic somehow depends on number of the devices in the system and again I believe we need team work to find correct formula for that.

Few users have shared with me that they have found devices, which "bombarding" the traffic with unnecessary reports and they fixed the issue.

It could be very helpful to all of us to share our solutions and fixes...  we all can learn from others

If you think it could violate your privacy,   please ignore this message...

Thank you

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0
  • Inquirer
  • Probably your danalock is too far from HC2... try to configure mesh network

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • BTW I would like to recommend you to try to optimize your network.

    From my experience  if your network performance in not higher then event per 3 seconds (in your case is event per 1.9s.) you'll avoid delays on network

    Link to comment
    Share on other sites

    • 0

    Adding some findings from my network.

     

    Please login or register to see this code.

     

    What I notice from the stats is that a few devices are dominating the traffic.  For instance a few Fibaro wall plugs and Fibaro dimmers that send power reports every 30 seconds evern when there is no load nor any change in power consumption.

     

    I am also experiencing a lot of delays in the system, scenes that take 20-60 seconds before the execute. This happened after an upgrade recently.

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 9 minutes ago, perjar said:

    What I notice from the stats is that a few devices are dominating the traffic.  For instance a few Fibaro wall plugs and Fibaro dimmers that send power reports every 30 seconds evern when there is no load nor any change in power consumption. 

    I don't know what kind of wall plug you have, but you should check parameter which defines the interval time to send report. Usually the default is exactly 30 seconds as you've mentioned.

    See example below

    Please login or register to see this spoiler.

     

    Link to comment
    Share on other sites

    • 0

    Hello, could I ask for advice? Are the results and tables somehow exported for later comparison of the changes? Thank you
    PS: sorry for my English :))

     

    Link to comment
    Share on other sites

    • 0

    Thanks for good advice.

     

    I do have a whole bunch of Fibaro powerplugs and I have tweaked the power reporting now so there is a lot less of power reporting going on. :-)

    The problem with power reporting of low powered LED is apparent for my Fibaro dimmers. Even if a light looks like it is glowing steadily, the power consumption can easily fluctuate between say 1,4W and 1,7W which is 21%. So, working with the power reporting settings is critical if you want to avoid flooding the system with power updates.

     

    The good news is that with the tweaks mentioned above, the number z-wave messages has taken a deep dive:

     

    Please login or register to see this code.

     

    I have a few other devices that generate too much traffic (power meters), but they are of my own design, built on the z-uno, so I can't really blame anyone else there. I will rework their sw a bit in a next step. I can probably reduce the reports from these devices by a good 70%.

     

    Please login or register to see this link.

    Yes you can save and retreive the data later. There is a parameter in the Monitor which decides which Global Variable is used for saving the data. That same Global Variable is then used by the Viewer. If you want to save several generations of data, simply go into the Monitor and chnge the name of the Global Variable  each time before you run the scene, then it will save under your new name instead.

    To be noted: The Monitor scene generates large amounts of data. My test case from above (7157 events during 24 hours) generated 250 kbyte.  

    Edited by perjar
    Added more information
    Link to comment
    Share on other sites

    • 0
    3 hours ago, petergebruers said:

    Ah, another Z-Uno lover! It's probably an interesting challenge to come up with a universal algorithm that uses fewer packets but still makes your scenes run as expected. For example, the boiler of my espresso machine pulses on 1 second, off 1 second, then on 1 second and 5-8 seconds off...

     

    Yepp, I kind of like the z-uno for its simplicity and compatibility with Arduino. :)

    Since we're on this topic. Perhaps you have encountered this issue as well: If you define more than one channel in z-uno, the first channel is automatically duplicated by the z-uno and becomes channel 0. In one of my projects, I am using  z-uno to read the energy meter for my house. It reports to the HC2 over two channels: 1:power (measured in watts) and 2: energy (measured in kwh). However, in the HC2, the device shows up as having three channels: 0,1 and 2. This is by design and in accordance with the z-wave specs according to the z-uno people.

    This is one of the reasons why the z-uno generates so much traffic in my application. Every time it sends a power report on channel 1, it also sends a report on channel 0. So, twice the amount of traffic. One report every 30 seconds leads to 2880 additional and completely unnecessary messages per day. The funny thing is, I have not seen this in any of my other off the shelf multi-channel devices. So apparenty these manufacturers are not standards complient. But more network-friendly I'd say. Unless, and I am speculating wildly here, the HC2 has some way of suppressing these additional channels and messages as they are not adding any value. 

     

    In any case, when I designed my z-uno application, one of the ojectives was to keep track of accumulated energy consumption, and I was not aware at the time of the fact that the HC2 actually does the same thing in the background. In other words, no need to send energy data from the device, the HC2 calculates this for me and exposes it via the api. Albeit it is an approximation where the accuracy depends on how often it gets power reports from the device. The higher the frequency, the more accurate it becomes.

    So, in my next version of the z-uno sw, I will scrap channel 2 and only report power (channel 1). The benefit with this is that the device will be single-channel and hence there will be no duplication of messages.  :)

     

     

     

    Link to comment
    Share on other sites

    • 0
    20 hours ago, perjar said:

    If you define more than one channel in z-uno, the first channel is automatically duplicated by the z-uno and becomes channel 0. In one of my projects, I am using  z-uno to read the energy meter for my house. It reports to the HC2 over two channels: 1:power (measured in watts) and 2: energy (measured in kwh). However, in the HC2, the device shows up as having three channels: 0,1 and 2. This is by design and in accordance with the z-wave specs according to the z-uno people.

    Yes, this is by design and I plan to make a post about this in my "geek series"

     

    The first topic is not about that particular behaviour but if you like Z-Uno you might like "geek stuff" about Z-Wave as well, can I shamelessly promote this topic?

     

     

    20 hours ago, perjar said:

    Every time it sends a power report on channel 1, it also sends a report on channel 0. So, twice the amount of traffic. One report every 30 seconds leads to 2880 additional and completely unnecessary messages per day. The funny thing is, I have not seen this in any of my other off the shelf multi-channel devices. So apparenty these manufacturers are not standards complient.

    I have had the same question and a related question about nodes being in several association groups.

     

    I checked that long time ago, I think my Z-Uno was on 2.06 firmware... I don't remember the results and if I did they might not apply to the current FW, 2.14.

     

    Let me check this for you...

     

    20 hours ago, perjar said:

    In any case, when I designed my z-uno application, one of the ojectives was to keep track of accumulated energy consumption, and I was not aware at the time of the fact that the HC2 actually does the same thing in the background. In other words, no need to send energy data from the device, the HC2 calculates this for me and exposes it via the api. Albeit it is an approximation where the accuracy depends on how often it gets power reports from the device. The higher the frequency, the more accurate it becomes.

     

    I would say, as a rule of thumb, if you want to know how much electricity a devices uses, to calculate how much it costs, then you want to measure and report energy

    If you want to know if a device is "on or off or something in between" then you want to measure and report power

     

    Although both can be obtained by math (energy is the integral of power, so power is the differential of energy) that likely leads to inaccuracies... And also depends on the reporting frequency. And you will also introduce "sampling errors" if your reporting is not frequent enough (because you are under-sampling a varying signal).

     

    I guess that is the reason why Z-Wave modules report both.

     

    EDIT: as a Z-Uno user you probably know all this. I simply try to write posts for a wide audience without specific background.

     

     

     

    Edited by petergebruers
    Link to comment
    Share on other sites

    • 0

    Hi, just stepped in this topic... started to run the monitor script without going too much in it... have a system with 70 physical devices

    I am on: [DEBUG] 07:45:49: 6:25:00/ 12:00:00~~25930 events/57 devices~~event/0.9s

    This is really bad if I understand you right?

    For example, I have a Fibaro wall plug which reports very often between 0 and 0.3 watts.. this means an increase of 300% so it is seen as a major power change and cannor be disabled, right?
    I tried all the parameters

     

    How can I get the graph sceen by theway? When i run the report code I get an error:

    [DEBUG] 07:55:17: 2019-02-27 07:55:17.843118 [ fatal] Unknown exception: /opt/fibaro/scenes/634.lua:330: attempt to index a number value

    Edited by twannieguitar
    format
    Link to comment
    Share on other sites

    • 0
    On 2/22/2019 at 4:11 PM, perjar said:

    Every time it sends a power report on channel 1, it also sends a report on channel 0.

    It is actually a bit trickier than that, it seems to send one legacy report per channel plus 1 one think, it warrants its own "geek stuff" topic. I may dedicate one to that :)

     

    There is a simply way to reduce the chatter: on the advanced page of your Z-Uno, click "Setting association". Navigate to "Home Center 2" in the device list. Remove the check mark in the "S" column , leave the "M". This will tell the Z-Uno that the controller is not interested in single channel reports.

     

    If you have a Zniffer, you can use this sketch to see what is happening. It may seem like a silly sketch, but once you open your Zniffer you'll see the significance of the (weird) counters...

     

    Please login or register to see this attachment.

     

    3 hours ago, twannieguitar said:

    For example, I have a Fibaro wall plug which reports very often between 0 and 0.3 watts.. this means an increase of 300% so it is seen as a major power change and cannor be disabled, right?
    I tried all the parameters

    Interesting observation. This is probably a low load, like a device in standby?

    If it changed between 0.3 and 0.4 then the parameters would work, but as you point out, it is between 0 and 0.3 so that might indeed always be considered "a major change".

     

    Thinking out loud. Two things.

     

    It might or might not be a terrible problem, so maybe run one of my text based scripts to see which device causes most spam and when...

     

    Please login or register to see this attachment.

     

    Then to solve that particular problem... Does it make a difference if you enable: "Parameter 49 Metering energy consumed by the Wall Plug itself.
    Results are being added to energy consumed by controlled device." Because that would add 0.5 W and if it uses that to calculate its "delta"... that might work.

     

    I can't test that for you right now...

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 8 minutes ago, petergebruers said:
    3 hours ago, twannieguitar said:

    For example, I have a Fibaro wall plug which reports very often between 0 and 0.3 watts.. this means an increase of 300% so it is seen as a major power change and cannor be disabled, right?
    I tried all the parameters

    Interesting observation. This is probably a low load, like a device in standby?

    If it changed between 0.3 and 0.4 then the parameters would work, but as you point out, it is between 0 and 0.3 so that might indeed always be considered "a major change".

    The change between 0 to 0.3 watts, it is a big change. Practically is infinite change (not 300%).

    11 minutes ago, petergebruers said:

    Results are being added to energy consumed by controlled device." Because that would add 0.5 W and if it uses that to calculate its "delta"... that might work.

    @petergebruers

    This is an interesting idea to add extra 0.5w....

    Link to comment
    Share on other sites

    • 0

    Hi,

     

    Thanks for the reply 

    Please login or register to see this link.

    Metering from the Plug itself is disabled but it is a standby device indeed... 

    I now put parameter 40 to 100% which seems to disable power-dependant reporting and I put 47 to 5 minutes to get a report at least once in 5 minutes..

    I think this is the only solution when a device in standby uses less then 0.3W (that is probably the reson it is flipping between 0 and 0.3)

    Do you mean I should try to enable self-measurement peter?

    Link to comment
    Share on other sites

    • 0

    I now put everything to default, parameter 42 to 50% and self measurement (49) to on

    I did put 49 to on only prior but it flipped between 0.9 and 1.2 watts... now it seems better

    let's see what happens

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
    1 minute ago, twannieguitar said:

    Do you mean I should try to enable self-measurement peter?

    It is difficult to answer because the parameters  interact, you can do polling and it also depends on what you want to measure.

     

    I think the most important first question is... Do I need those reports? For example, I can use  power on my water-based heating to detect if the pump is running, or the oil burner is running. This is useful for diagnosis. I do not need exact timing or accuracy so I can reduce reporting.

     

    In many cases, I have low LED loads and I am not interested in power reports. Many "lamp" type devices simply have the absolute minimum reporting.

     

    I am guessing you do not need power reports in this case so if that 5 min interval with 100% should be fine (assuming that combination filters out frequent toggling between 0.0 and 0.3, I am not sure). You might want to try my suggestion (to add self-power of the device) out of academic interest... Or because that is actually a more faithfull representation of the total power consumption. It depends on what you want to measure.

    Link to comment
    Share on other sites

    • 0
    2 hours ago, petergebruers said:

    There is a simply way to reduce the chatter: on the advanced page of your Z-Uno, click "Setting association". Navigate to "Home Center 2" in the device list. Remove the check mark in the "S" column , leave the "M". This will tell the Z-Uno that the controller is not interested in single channel reports.

    I have on z-UNO done device with 24 channels. Should I uncheck the "S" column? 

    Link to comment
    Share on other sites

    • 0
    15 minutes ago, sega66 said:

    I have on z-UNO done device with 24 channels. Should I uncheck the "S" column? 

    Yes, that will help, but I would focus on how frequently you report in the first place. By default Z-Uno follows the rule that you cannot send reports faster then once every 30 seconds per channel. So there is already some kind of protection from overloading. But of course you can make it much slower and in that case unchecking S would not make a lot of difference.

     

    Overloading is on thing, filling the event log or power log with (too much) data is another thing. The HC2 eventlog cleans up after 40 thousand records.

     

    That is another reason to use @cag014's monitor scene and lower reporting.

     

    EDIT: If you want to talk more about Z-Uno specific things, please start a new topic, I will answer there. While some of this information might apply to non-Z-Uno users as well I think discussing the specifics of tuning the reporting on this device is really too far out of scope for this topic. The "S" versus "M" is a property of all devices though not many devices with a lot of channels exist.

    Edited by petergebruers
    Link to comment
    Share on other sites

    • 0
    9 minutes ago, twannieguitar said:

    How can I copy and paste the data in here to get the right format?? (lots of work to do looking at the results)

    You mean output of Lua script? Save as text file on your computer then click on "choose files" at the bottom of your new post to upload and insert that file.

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