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


Sanity Check - a scene to help you set "sane" options on your HomeCenter


petergebruers

Recommended Posts

Before I start: I donate this script to the community, I hope it is useful and someone will pick up the development. In other words: this script is looking for a new owner.

 

That is the first reason why I post it in the "suggestions" section of the forum, and not in "Downloads". The second reason is... it would be awesome if this was standard functionality of HC!

 

You can save it as a scene, or use Zerobrane (use the search for unofficial way to run scenes on your PC).

 

What does it do? It loops over all devices and applies a set of "rules" and gives advice. I want to stress that: it is "advice" so you as a maintainer of your system have to decide if the advice makes sens. Let me give a few examples of the output on my system.

 

Please login or register to see this code.

You know, the older devices do not report power, but you can add "declared power consumption" if you want that. I probably forgot to do that...

 

Please login or register to see this code.

Depending on the power supply and the load, an RGBW can send too many power reports, which you probably don't care about anyway. Reduced network traffic and database growth.

 

Please login or register to see this code.

Yeah, that is a bit of a weird one, but the advice is sane. But this is about some internal stuff of the HC software, the one that displays all available actions in the scene editor. You'll find it is missing this action but if you're like me you probably don't care.

 

Please login or register to see this code.

I don't like the standard 30 minute batter spam mails... BTW there was a time, when you had to set this on each individual slave and the master to silence them all. I don't think that's still true, to be checked.

 

Please login or register to see this code.

Similar to RGBW

 

Please login or register to see this code.

I decided, for myself, sane values for wake up are between 2 and 8 hours. If it is longer, and the device is eg. on the ceiling, you have to wait a looooong time before it picks up your change. Unless it has a small or fixed battery, the gains above 8h aren't worth it. You can set your own limits BTW.

 

If you think this is useful or you're interested, good, I am glad you like it!

 

Now let me talk about the Achilles' heel(s). Some stuff is tested on all devices, but you have to FEED the database if it is device specific. It does not magically recognize your device. At the end of the script there is a big Lua table with all sort of settings. The second problem is: the code is very messy! This is because I wrote this script years ago, I needed it because I wanted to do a "full reset" of my network and I wanted to semi-automate part of it.

 

This script was shared with some forum members, you'll find them credited in the file. Thanks for debugging guys. Script released with "share alike license" so pick it up, enhance it and credit them...

 

Version 1.5.1 - 2020-04-08
    - Script can be run on a PC using "Zerobrane" and is compatible with HCL/HC2/HC3
      See

Please login or register to see this link.


    - Added "FGMS001 ZW5 Motion Sensor, V2 (fw >= 3.3)" = 010F 0801 1002
    - Added "Wall Switch (1 channel)" = "0258 0003 108c"
  
  Version 1.5.0 - 2019-11-23
    - This version was not released to the public because of the announcement of HC3
    - Add option PrintProductInfo to display the "raw" productinfo, can be used in scripts, for example, a
      "set parameters script" can use this to verify exact type of a device and avoid writing
      parameters to the wrong kind of product
      Example of ProductInfo: Danfoss LC13 productinfo: 0,2,0,5,0,4,1,1
    - Fix FGS-223 parameter 54 should have been p 55. Thanks @szmyk.
    - Rename "Neo Coolcam" to "Neo" and add NEO_DS01Z D/W sensor

  
  Version 1.4.3 - 2019-10-09
    - Fix FGT-001 name
    - Add iBlinds

 

Please login or register to see this attachment.

 

Edited by petergebruers
  • Like 7
  • Thanks 3
Link to comment
Share on other sites

  • Topic Author
  • Add iBlinds, fix FGT-001 name in SanityCheck.1.4.3.lua in post #1

    • Thanks 2
    Link to comment
    Share on other sites

    Thanks @petergebruers. Useful script.

     

    I noticed, that there is still problem with parameter 54 despite of this note:

    "Fix FGS-223 parameter 54 should have been p 55."

    • Like 1
    Link to comment
    Share on other sites

    Yes, by sending the whole json struct from the API to @petergebruers and kindly ask him :-) When he collects some info and can find some spare time, maybe he'll add it. :-)

     

    Link to comment
    Share on other sites

    • 3 months later...

    So you say that I may want to ignore messages like this or go for soft reconfigure?

    Please login or register to see this image.

    /monthly_2020_02/image.png.6385c9ea8f57af4730bc4da5bfc9a5ff.png" />

     

    Will this message dissapear If I soft reconfigure?

    Thanks!

    Link to comment
    Share on other sites

    By the way: I have "send emails on battery low" checked by default on all of my devices. Sanity check tells me to turn them off, but I have never ever received a single email on battery low... I always realized low battery when I logged in to the UI of HC2, or saw some devices lost connection - battery completely drained.

    Email messages work fine on other events, so that part is OK.

    Do I really have to uncheck it? Does it affect network load in any way?

    Just being curious...

    Edited by johndeere
    Link to comment
    Share on other sites

  • Topic Author
  • 9 hours ago, johndeere said:

    So you say that I may want to ignore messages like this or go for soft reconfigure?

    Ignore them, it means the script has no name and no special rules for this device.

     

    9 hours ago, johndeere said:

    Will this message dissapear If I soft reconfigure?

    No, it will go away if you or someone else adds rules to the script.

     

    9 hours ago, johndeere said:

    Do I really have to uncheck it? Does it affect network load in any way?

     

    You decide.

     

    On older HC firmware, devices send one battery low email per slave device, per 30 minutes, so it really spams your inbox. I think 4.560-ish changes that to one per device per day, so it is less of a problem.

     

    Does not affect load in any way.

     

    I would still uncheck on one of the slaves (I think nowadays it will automatically uncheck other slaves of the same node, rerun script to verify) and instead run the "battery check scene" written by @Sankotronic or his VD

     

     

     

    Link to comment
    Share on other sites

    • 3 weeks later...

    Hello,

    start your scene (HC 2 FW 5480 / your 1.4.3) gives me this message: [DEBUG] 08:02:00: 2020-02-26 08:02:00.528139 [ fatal] Unknown exception: /opt/fibaro/scenes/626.lua:388: attempt to perform arithmetic on local 'paramValue' (a string value)

    What do i wrong?

    Thank you in advance.

    Link to comment
    Share on other sites

    What exactly are the parameters 50/52/53/ "Active/Periodic power/energy reports" of the Fibaro dimmers for?

     

    If I deactivate these parameters I cannot see any change in the behaviour of the consumption display. The displayed wattage changes after a few seconds even if the parameters are deactivated.

     

    I am looking for the reason for the delay of up to 45 seconds when eight Fibaro RGBW are switched by associations controlled by a Quibino Din Dimmer. A recommendation of the Sanity Check from @petergebruers is to disable the power reports to reduce the Z-Wave traffic.

     

    Which disadvantages do I trade off on this?

    Please login or register to see this image.

    Please login or register to see this image.

    Please login or register to see this image.

    Please login or register to see this image.

     

    Please login or register to see this attachment.

    Edited by Wegerhoff
    Link to comment
    Share on other sites

    • 1 month later...

    @

    Please login or register to see this link.

     thank you for this script ... I found it very useful :) ...

     

    Would you be willing to draft tiny HowTo define new devices in Database section ? or at lest how to add parameters for devices like this: 

     

    image.png.5515362bd470d6102b5a3efbd9ddce93.png

     

    this is Fibaro FGMS-001 ZW5 Motion Sensor for which I think I see definition in your script but do not have any idea how to add my own parameter to the check list :) 

    Please login or register to see this code.

     

    just give me an example how to modify above to let say parameter 3 to be set to value 3 and parameter 81 to be set to value 10%. 

    Based on example I think I will be able to add all the rest I need :)

     

    Some small hint how devices are identified and matched to Database would be also great ... 

    E.g. I do have Neo Coolcam 1CH (EU) switches which are not in the DB and I would like to add association in group2 setting to be verified. 

     

    image.png.43f8f74f5af03ee5a3a667a2c94a2937.png

     

    Thank you very much in advance for a small guide :)

    Link to comment
    Share on other sites

  • Topic Author
  • New version (previous one was 1.4.3):

    Please login or register to see this attachment.

     

     

    Version 1.5.1 - 2020-04-08
        - Script can be run on a PC using "Zerobrane" and is compatible with HCL/HC2/HC3
          See

    Please login or register to see this link.


        - Added "FGMS001 ZW5 Motion Sensor, V2 (fw >= 3.3)" = "010F 0801 1002"
        - Added "Wall Switch (1 channel)" = "0258 0003 108c"
      
      Version 1.5.0 - 2019-11-23
        - This version was not released to the public because of the announcement of HC3
        - Add option PrintProductInfo to display the "raw" productinfo, can be used in scripts, for example, a
          "set parameters script" can use this to verify exact type of a device and avoid writing
          parameters to the wrong kind of product
          Example of ProductInfo: Danfoss LC13 productinfo: 0,2,0,5,0,4,1,1
        - Fix FGS-223 parameter 54 should have been p 55. Thanks @szmyk.
        - Rename "Neo Coolcam" to "Neo" and add NEO_DS01Z D/W sensor

      

    On 4/5/2020 at 6:34 PM, ciechom said:

    @

    Please login or register to see this link.

     thank you for this script ... I found it very useful :) ...

    I am glad you like it!

     

    On 4/5/2020 at 6:34 PM, ciechom said:

    Would you be willing to draft tiny HowTo define new devices in Database section ?

    Find the device manual, think about what is needed (eg turn down power reporting frequency) then add it (copy/paste an existing device for example)

     

    To Check the hex codes  "010F 0801 1002" against existing names... Some manufacturers mention these codes in their manuals. Also, you can verify if someone already added it to OpenZWave

     

    Please login or register to see this link.

     

    On 4/5/2020 at 6:34 PM, ciechom said:

    this is Fibaro FGMS-001 ZW5 Motion Sensor for which I think I see definition in your script but do not have any idea how to add my own parameter to the check list :) 

    It seems v3.3 of that sensor is a new hardware revision. I've added it to the database.

     

    On 4/5/2020 at 6:34 PM, ciechom said:

    just give me an example how to modify above to let say parameter 3 to be set to value 3 and parameter 81 to be set to value 10%. 

    To be clear: this script does not set or modify anything, it only verifies against a rule and tells you to change it.

     

    Look at "[1536]={n="FGWP101 Wall Plug"," line 1265 in version 1.5.1 of the script for an example and line 420 and below for parsing

     

    Please login or register to see this code.

    The code is the documentation but in short, "v" means "exact (v)alue" and "vg" means "(v)alue should be (g)reater..." and so on

     

    On 4/5/2020 at 6:34 PM, ciechom said:

    I would like to add association in group2 setting to be verified. 

    I have to disappoint you... I never finished writing the part to really check association groups... Because with Z-Wave Plus there is not much to check.

     

    See line 100 of the code:

     

    Please login or register to see this code.

     

    • Like 1
    Link to comment
    Share on other sites

    W dniu 8.04.2020 o 10:09, petergebruers napisał:

    Find the device manual, think about what is needed (eg turn down power reporting frequency) then add it (copy/paste an existing device for example)

     

    To Check the hex codes  "010F 0801 1002" against existing names... Some manufacturers mention these codes in their manuals. Also, you can verify if someone already added it to OpenZWave

     

    Please login or register to see this link.

     

     

    Thank you very much .. as always perfectly clear and mega complete answer :) 

     

    I understood everything with one small exception ... I still do not understand how to add new device to DB :(  

     

    I looked at "FGMS001 ZW5 Motion Sensor, V2 (fw >= 3.3)" = "010F 0801 1002" you added ... 

    So what I see on the github provided by you this is the following line:

     

     

    <Product config="fibaro/fgmszw5.xml" id="1002" name="FGMS001-ZW5 Motion Sensor" type="0801"/>
     

    so HEX should be decoded in the following way: first 4 chars (0101F) means "Manufacturer", second (0801) is "type", third (1002) is "id" ... simple :) 

    but how does this corresponding to the DB in sanity-check script? 

     

    when compared old and new DB you added: 

     

        [4098]={n="V2 (fw >= 3.3)",
        }
     

    so how come script "knows" that [4098] is a device with HEX "010F 0801 1002" ? 

     

    or hex is not used by the script and simply name really matters ?  and number in [ ] is just an index ? 

     

    As a first thing I would like to correct DB for missing Fibaro devices (seems new FW versions) 

     

    image.png.82f2b9b8f84d1c28b7d23a8ce0ef21fc.png

     

    image.png.3f6a0f0fe1bf970e06c39155484ee8cf.png

     

    image.png.48780b288df6f38c36f000b42e1e957d.png

     

    so looking again at the site I should be looking at: 

     

    <Product config="fibaro/fgfs101zw5.xml" id="1003" name="FGFS101 Zwave+ Flood Sensor" type="0b01"/>

    <Product config="fibaro/fgsd002.xml" id="1003" name="FGSD002 Smoke Sensor" type="0c02"/>

    the last one is smart implant:  <Product config="fibaro/fgbs222.xml" id="1000" name="FGBS222 Smart Implant" type="0502"/>

     

    Thank you in advance for a teaching me :)

    Please login or register to see this attachment.

    Edited by ciechom
    .
    Link to comment
    Share on other sites

    • 1 month later...
    On 4/8/2020 at 10:09 AM, petergebruers said:

    Version 1.5.1 - 2020-04-08
        - Script can be run on a PC using "Zerobrane" and is compatible with HCL/HC2/HC3

    Hello @petergebruers i've missed that post, thank you for this new update ! 

    I'll try it right now.

    Link to comment
    Share on other sites

    @petergebruers This looks like an awsome script, thank you ? 

    In the description i see it is compatible with HC3, however it fails on the fist debug.  Anything i am missing please ?

     

    Regards

    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
    Reply to this topic...

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