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

[VD] Scene & VD Debug Watchdog 1.1


AutoFrank

Question

Hi 

 

UPDATED 1.1

 

UPDATED THIS VD FROM A SCENE WATCHDOG TO A SCENE & VIRTUAL DEVICE WATCHDOG

Hopefully this will be a useful little VD to some users

It was inspired by a comment made by @tinman (I think) 

 

This VD Enables a user to scan all scene and virtual device DEBUG MESSAGES and trigger on predefined key words in the debug messages.

This may be useful to see if a scene develops an error or perhaps you are just looking for a keyword for a different reason

  • All scenes and virtual devices are included by default
  • Specific scenes and virtual device id's can be flagged to exclusion
  • Separate watch lists for scenes and virtual devices
  • A watchdog report is sent for all matches identified.
  • Can be sent via email or smart message hub
  • You get one email or message per id flagged ( not per watch word)
  • It will send message if no match in either vd or scene is found (added in v 1.1)
  • Suggested icon included below
  •  

              

Please login or register to see this image.

/monthly_2017_07/watchdog.png.053d2b2b2433c2a01bf526af79058585.png" alt="watchdog.png.053d2b2b2433c2a01bf526af79058585.png" />

 

Note: If you use the Smart Message Hub please add that scene ID into the exclusion list as that scene will be 
flagged by the watchdog after the first use.
  
This can be run on demand or on a schedule using Main Scene by @Sankotronic or similar.
I run it on a schedule once per day

 

Installation 

  • Import the VD
  • Configure the following as required

Please login or register to see this code.

  • Place on a scheduler if required

 

The VD has a status label and when it was last run

 

 watch.PNG.3ba1125c1bf4c5cba0c2c5b4aa2036df.PNGwatch1.PNG.b31653c26fea066e89d95fea10dbf911.PNGwatch2.PNG.07ad9270adbd029e6bfb9fb4d6a46d4e.PNG       

 

and this is what the report looks like on pushover

 

Please login or register to see this attachment.

 

VD attached

 

 

 

 

 

Please login or register to see this attachment.

Edited by AutoFrank
Link to comment
Share on other sites

Recommended Posts

  • 0
20 minutes ago, AutoFrank said:

:)

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 3 minutes ago, RH_Dreambox said:

    A very useful VD :-)

    But how do I get mail or message if I do not use Smart message hub?

     

    Thanks :-) @RH_Dreambox

     

    if you set SMsgH = false in the configuration section this will send to hc2 email by default

     

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • very slight change (1.0b)  to show it running as it is checking the scenes in the status label

     

    Please login or register to see this image.

    /monthly_2017_06/watch.PNG.731914d0542fa7a8c731a98dfba69ba9.PNG" alt="watch.PNG.731914d0542fa7a8c731a98dfba69ba9.PNG" />

    Link to comment
    Share on other sites

    • 0

    Hi @AutoFrank,

     

    Thanks for this nice VD. I already use watchdog from @Lazer on French forum:

     

    Please login or register to see this link.

     

    and new version is working good on latest firmware versions. It can restart scene or VD if stop running and that is what I needed most. Here is also icon that I use for it:

    Please login or register to see this image.

    /monthly_2017_06/Watchdog.png.3be0ebf74f3a3d17ccb092f5f82a25db.png" alt="Watchdog.png.3be0ebf74f3a3d17ccb092f5f82a25db.png" />

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 minutes ago, Sankotronic said:

    Hi @AutoFrank,

     

    Thanks for this nice VD. I already use watchdog from @Lazer on French forum:

     

    Please login or register to see this link.

     

    and new version is working good on latest firmware versions. It can restart scene or VD if stop running and that is what I needed most. Here is also icon that I use for it:

    Please login or register to see this link.

     

     

    Thanks @Sankotronic

    I didn't know about that solution. it's a pity as I probably would have written this if I had seen that one. :-(

    It looks comprehensive alright. I notice that he also scans the VD debug (I searched the api documents and couldn't find it - It's really frustrating that they don't keep the documentation up to date) :=(

    The fact that it restarts is nice  ;)   perhaps my one may have a use if some is trying to troubleshoot an particular scene issue that is triggered by a specific word ..... good learning experience for me either way...

    Link to comment
    Share on other sites

    • 0

    Hi @AutoFrank,

     

    I didn't post link to that Watchdog scene to tell that your VD is not needed! On the contrary, your VD is nice help with troubleshooting. I will use your VD to troubleshoot my new system that I'm working on, so please don't remove it! I already see it's potential to assist me so that I don't have to stare at the screen all day long when I come back home!

     

    Keep up the good work Frank! Your contribution to this community is very valuable and appreciated!

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 hour ago, Sankotronic said:

    I didn't post link to that Watchdog scene to tell that your VD is not needed!

     

    no worries - I didn't take it that way :-) ... sorry if it came across that way

     

    all good :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-)

     

     

    Link to comment
    Share on other sites

    • 0
    Quote

    Thanks :-) @RH_Dreambox

     

    if you set SMsgH = false in the configuration section this will send to hc2 email by default

     

    No, send mail does not work for me :-(

    Is mail sent to Superusers mail address? I always login local as Superuser.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 minutes ago, RH_Dreambox said:

     

    No, send mail does not work for me :-(

    Is mail sent to Superusers mail address? I always login local as Superuser.

     

    @RH_Dreambox

    yes, it should be su

    This is the lua code ...

    Please login or register to see this code.

    Let me take a look this evening 

    I have a 1.0c version that also scans Virtaul devices with two different watch lists. I'll confirm that the email is working before sending that version this evening

    watch.PNG.2c62b6c0f8a591bca0d070baae3ea38b.PNG

    Link to comment
    Share on other sites

    • 0

    I think your VD code is OK. It must be something wrong with my HC2 config!

    I have tested this but got no mail. :-(

    Please login or register to see this code.

    Edit

    My HC2 needed a reboot. Now sendEmail works :-)

    Edited by RH_Dreambox
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 hours ago, RH_Dreambox said:

    I think your VD code is OK. It must be something wrong with my HC2 config!

    I have tested this but got no mail. :-(

    Please login or register to see this code.

    Edit

    My HC2 needed a reboot. Now sendEmail works :-)

     

     

    Cool :-) @RH_Dreambox

    1.0c coming in a few minutes

     

     

    Link to comment
    Share on other sites

    • 0
    19 hours ago, Sankotronic said:

    Hi @AutoFrank,

     

    Thanks for this nice VD. I already use watchdog from @Lazer on French forum:

     

    Please login or register to see this link.

     

    and new version is working good on latest firmware versions. It can restart scene or VD if stop running and that is what I needed most. Here is also icon that I use for it:

    Please login or register to see this link.

     

    Sorry @AutoFrankto hijack this topic

     

    @Sankotronic how do you setup to restart NETATMO WEATHER STATION SCENE ?

    I have this line but it restart it every minute...

    Please login or register to see this code.

     

    Edited by jompa68
    Link to comment
    Share on other sites

    • 0

    I think it's better to look for ERROR-messages. I use this for WUWeather.

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi ,

    Does anybody know how to detect this type of message in the debug window

    I can detect DEBUG messages but not sure if its possible to detect the ERROR messages like the one in red below

     

    Please login or register to see this attachment.

     

    I'm using the following api call

     

    Please login or register to see this code.

    Thanks

    Link to comment
    Share on other sites

    • 0
    5 hours ago, jompa68 said:

    @Sankotronic how do you setup to restart NETATMO WEATHER STATION SCENE ?

    I have this line but it restart it every minute...

     

    Hi @jompa68,

     

    I don't since Netatmo scene is run by Main scene every two minutes. Main scene is running every minute with possible longer pause at 2 o'clock in the morning to adjust timing and this is setting that I have in Watchdog scene for main scene and some VD's:

    Please login or register to see this code.

    I had to extend intervalle to 90 otherwise was getting notification that main scene is restarted due to that longer pause for timing adjustment that can take more than 60 seconds.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 15 minutes ago, Sankotronic said:

    {type = "VD", id = 336, match = {text="VD updated", interval=30}, no_match = {text="", type="ERROR"}, restart=true, notification = {"push", "email"}},

     

    Hi @Sankotronic

    Is the type you are trying to match against above (type = "ERROR")  for a DEBUG message  of a (red) ERROR message (see below)

    Please login or register to see this attachment.

     

    Thanks

     

    Link to comment
    Share on other sites

    • 0

    Hi @AutoFrank,

     

    coul'd you please make your debug picture a bit greater, because they are hardly readable.

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