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


Recommended Posts

Good morning Jan,

Supervisor stopped again, present time 07:08

Please login or register to see this image.

/monthly_2020_06/image.png.f7dfe2f42abcef9a514ba953a43862ac.png" />

Scenes 3,8,14,15 no remark in debug araound that time all the other scenes the debug is from later time.

Happenly no scenes has stopped.

Please advice,

//Sjakie

 

Link to comment
Share on other sites

  • 3 weeks later...

Hello Jan,

Panic!! All scenes stopped last night!

Supervisor was going weird restarted several scenes in a row>>>disabled

Did a restore (5-05-2020) same result with Supervisor!

Disabled Supervisor, checked all scenes and noticed:

5 scenes debug empty>>>pressed start scene runs

6 scenes couldnt start>> added ---- save and they started

Enabled Supervisor is running now for 8 minutes >>no remark

Any idea?

//Sjakie

Link to comment
Share on other sites

Hello Jan,

Supervisor stopped again at 23:55

//Sjakie

Link to comment
Share on other sites

On 2/9/2019 at 1:30 PM, petrkl12 said:

@jgab

 

here is suggestion for small improvements - automatic restart:

 

Please login or register to see this code.

 

 

@Sjakie

Code above has to be modified by @jgab for new version of ER but it could help you as workaround. 

Link to comment
Share on other sites

Jan,

All scenes stopped again last night.

Supervisor scene fresh copy  same result. What is happening I have no idea but for me it looks Supervisor over floods the scene(s) to restart?

Please login or register to see this image.

/monthly_2020_07/image.png.e60edff632c481fff1301550d9b09564.png" />

Hal scene runs 8 instances it wants to start again then it stopped  (Supervisor?)

image.png.d9d44d155726a293870d8b3f95aa4c20.png

 

I stopped Supervisor 08:55 All scenes are running on one instance.I will leave it as it is now to see when a scene is stopping.

image.png.8dd4144ec329876f027de4364029ce23.png

What to do?

 

Please login or register to see this link.

Please login or register to see this link.

Thanks for your support

//Sjakie

 

 

Link to comment
Share on other sites

  • Topic Author
  • 16 minutes ago, Sjakie said:

    Jan,

    All scenes stopped again last night.

    Supervisor scene fresh copy  same result. What is happening I have no idea but for me it looks Supervisor over floods the scene(s) to restart?

    Please login or register to see this link.

    Please login or register to see this link.

    Thanks for your support

    //Sjakie

     

     

     

    Hi, as I recall from the past you have these strange long delays in your system now and then... I guess things can get bad then.

    Anyway, 

    In supervisor have you set simplekeepalive to true?

    Please login or register to see this code.

    and later in the file you can increase restarts to 4

    Please login or register to see this code.

    I will look a @petrkl12 patch and see if it can help. Thanks.

    Link to comment
    Share on other sites

    Jan,

    Thanks for reply.

    Yes its done

    max restarts also from 3>>4

    Ram 14&  having 4GB

     

    Please login or register to see this image.

    /monthly_2020_07/image.png.05192e6b61b91165749a9b815c52a7e9.png" />

     

    Slow mailbox I thought it was if processor was high in usage?

    I try to keep HC2 on this level in case its much higher I do a restore. If I check a scene it shows me 2.045 sec

    //Sjakie

    image.png.c9d49715be1118a777d6b88f369874b9.png

    Link to comment
    Share on other sites

  • Topic Author
  • Slow mailbox can be due to high cpu but it can also be due to the HC2 decides to "do something else" so the scene is not scheduled in time by the "operating system".

    It could also be due to that here is some rule/code in the ER scene that hangs on doing something. The latter I don't know what it could be. I can understand ~1s delay due to many rules but in your log it show ~10.3s delay where the main loop in ER gets no time(!) That's exceptional and I have a hard time finding a good explanation.

    In theory, if all your scenes worked well, you should not need the Supervisor I guess. 

    When we move over to the HC3 the Supervisor will not be needed to restart WAs as they do it themselves. 

    Link to comment
    Share on other sites

    Jan, thanks for explanation.

    Sure Supervisor was a great support when creating scenes and I was making some mistakes.

    I saw ER run one hour without Supervisor.

    Supervisor is active again and since the restart >>4 no problem till now.

    Remark:

    I guess its normal??

    If I select the diagnostic and leave it in the back ground the graphic goes to fully 100% completely red during a long time.

    When I click it to show it goes back to normal (10-25%)

    Please login or register to see this image.

    /monthly_2020_07/image.png.393d2d45eacc1e5593dd0563217db1c5.png" />

     

    //Sjakie

    Link to comment
    Share on other sites

    Good morning Jan,

    You are the best!

    Supervisor runs now again without restarting scenes!

    Thanks,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • EventRunner4. v 0.993 - 

    Please login or register to see this attachment.

     

    I recommend to install the

    Please login or register to see this link.

    to install EventRunner.fqa. The UpdateQA makes it easy to update the EventRunner QA when I release updates.

     

    I run ER4 for all my stuff at home now. I will upload new versions to my GitHub and sporadically .fqa version in this post.
    ER4 has some changes from ER3.

    • First off, ER4 is a QuickApp, not a Scene. Inside rules there is a variable 'QA' that is the 'self' of the ER4 QuickApp. You can use that to call QuickApp methods if needed.
    • There is no need to declare specific triggers in the headers like we did with HC2 scenes. However, there is a need to declare what types of triggers you want to receive. That is to prevent the rule system to be flooded by triggers you are not dealing with anyway.
    • Builtin support for Hue is removed. I recommend using plugins that make your Hue devices behave like standard devices (QAs) and you can then use them in rules like any other device. I have a Hue QuickApp here for Hue lights and sensors.
    • There is no VDs to interact with. Instead we call other QAs with fibaro.call(id,<function name>,args...). fibaro.call can be made from within rules.
    • ER4 has gone through re-write making ER3 and ER4 not sharing code which mean that I will not further evolve ER3 (but fix bugs). ER4 is now based on the

      Please login or register to see this link.

      library, that I develop for other projects. It gets the trigger and event handling from that toolbox.  

    A minimal startup look like ('main' file)

    Please login or register to see this code.

    There are changes when it comes to how devices behave between the HC2 and HC3. Ex. what type of property values they expose and use. These days I don't have that many types of devices so if you have a device that doesn't work in event scripts please let me know and we can fix it together.

     

    The HC3 is still a bit wonky when editing/saving and watching logs for QAs. I highly recommend that you use the

    Please login or register to see this link.

     to develop ER4 rules on a PC/Mac before deploying on the HC3. The emulator can run the full EventRunner4.lua code and interact with your real devices on the HC3. It will save precious time and significantly reduce frustration...

     

    • Please login or register to see this link.

      (and ER3) - TBD
    • Please login or register to see this link.

     

    Here is a video on how to install the EventRunner4 QuickApp.

    (there should be subtitles with instructions)

     

    Watch the video, install the QA, feel free to post questions how to write rules in this thread and I will happily help you :-)

     

    Use cases:

    • Please login or register to see this link.

    • Please login or register to see this link.

    • Please login or register to see this link.

       (timers. & triggers)
    • Please login or register to see this link.

     

    v.0.3 fix1. "Initial version"

    v.0.3 fix2. Forgot _ENV...

    v.0.3 fix3. fixed sceneActivation Event

    v.0.3 fix4. :manual is back. Returns seconds since manual interaction with device. returns -1 if script changed device. only for 'value' properties.

    v.0.4 fix2. New QA file format. Rules are in 'main' file. File 'EventRunner' and 'Toolbox' should not be touched. Autoupdate is back.

    v.0.4 fix3. More modular toolbox

    v.0.5 fix3 New internal structure and pub/sub mechanism. New auto patch.

    v.0.5 fix8. Many fixes...

    v.0.5 fix22. ...and many more fixes

    v 0.5 fix32 ... ... and even more fixes

    Edited by jgab
    • Like 5
    Link to comment
    Share on other sites

    Hello Jan,

    Today I was happenly surprised!!

    My IOS location (sitting in the back eating memory) was giving for th efirst time in almost a year the notification I left home and I came home.

    All the time it did not work prperly I thought I did something wrong but now I know I was not such a dude as I thought.

    Who can I blame?

    For sure Its not you with your excellent ER and service excellence!  You gave me severall good working alternatives!

    Fibaro?

    IPhone?

    GPS?

    It will be a guess.

    Still happy camper with my HC2 (Saartje)

    Regards,

    //Sjakie

    Link to comment
    Share on other sites

    Hi jgab

    EventRunner4. v After update of 0.3 fix 1

    Rules don't work

    After updating to the last version

    Previous EventRunner4. At v 0.2

    The rule worked

    My rules are taken from your rule example

     

     

    rule("Livingbath_sensor=lb.Living_bath_Motion; Livingbath_light=lb.Living_bath_Light; Livingvent=lb.Living_bath_Vent; Livingbath_door=lb.Living_Bath_Door")
    rule("trueFor(00:00:30,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbath_light:off")
    rule("Livingbath_sensor:breached => || Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on")
    rule("Livingbath_door:breached => inlivingBathroom=false") 
    rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
    rule("Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on")  
    rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off") 

     

     

     

    Error

    [18.07.2020] [01:29:22] [ERROR]: in Rule:25[Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on]: {"ERR":true,"msg":"Error executing instruction:'[\"%var\",0,\"inlivingBathroom\",\"script\"]'","err" :"/Users/minsad79/SynologyDrive/EventRunner/EventRunner4.lua:1956: attempt to index global'_ENV' (a nil value)","src":"Rule:25[Livingbath_door:safe =>||inlivingBathroom== true >> wait(00:00:20); Livingvent:on]"}

    Edited by minsad79
    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, minsad79 said:

    Error

    [18.07.2020] [01:29:22] [ERROR]: in Rule:25[Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on]: {"ERR":true,"msg":"Error executing instruction:'[\"%var\",0,\"inlivingBathroom\",\"script\"]'","err" :"/Users/minsad79/SynologyDrive/EventRunner/EventRunner4.lua:1956: attempt to index global'_ENV' (a nil value)","src":"Rule:25[Livingbath_door:safe =>||inlivingBathroom== true >> wait(00:00:20); Livingvent:on]"}

    Sorry, forgot _ENV - uploaded new version

    Link to comment
    Share on other sites

    6 hours ago, jgab said:

    Sorry, forgot _ENV - uploaded new version

    Hi j

    Even if you apply a modified one

    Does not work

    Quote your example rules

    Please login or register to see this attachment.

     

     

    My rules


    rule("Livingbath_sensor=lb.Living_bath_Motion; Livingbath_light=lb.Living_bath_Light; Livingvent=lb.Living_bath_Vent; Livingbath_door=lb.Living_Bath_Door")
    rule("trueFor(00:00:30,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbath_light:off")
    rule("Livingbath_sensor:breached => || Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on")
    rule("Livingbath_door:breached => inlivingBathroom=false") 
    rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
    rule("Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on")  
    rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off") 

     

    Please login or register to see this attachment.

     

    rule("Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on") =====> But it doesn't work
    rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off") =====> But it doesn't work

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 6 hours ago, minsad79 said:

    Hi j

    Even if you apply a modified one

    Does not work

    Quote your example rules

    Please login or register to see this attachment.

     

     

    My rules


    rule("Livingbath_sensor=lb.Living_bath_Motion; Livingbath_light=lb.Living_bath_Light; Livingvent=lb.Living_bath_Vent; Livingbath_door=lb.Living_Bath_Door")
    rule("trueFor(00:00:30,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbath_light:off")
    rule("Livingbath_sensor:breached => || Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on")
    rule("Livingbath_door:breached => inlivingBathroom=false") 
    rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
    rule("Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on")  
    rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off") 

     

    Please login or register to see this attachment.

     

    rule("Livingbath_door:safe =>||inlivingBathroom==true >> wait(00:00:20); Livingvent:on") =====> But it doesn't work
    rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off") =====> But it doesn't work

     

     

     

    It seems that you have a misplaced '||' in

    rule("Livingbath_sensor:breached => || Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on")

    that causes inlivingBathroom to never be set to true

    Link to comment
    Share on other sites

  • Topic Author
  • Latest version of ER4, v0.3 fix4 - :manual is back.

    Link to comment
    Share on other sites

    Jan,

    If I run this version it shows (no rules filled in)

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • 3 minutes ago, Sjakie said:

    Jan,

    If I run this version it shows (no rules filled in)

    Please login or register to see this attachment.

    Yes, if you take it from my GitHub you get the development version that include the QA_toolbox with a require at the end. You need to run and deploy this from ZBS if you need it.

    Easiest is to use the EventRunner4.fqa packaged version that is linked in the post that includes everything. (Note to fibaroapiHC3 users: Doing a 'deploy' from ZBS/fibaroapiHC3 will substitute in 'requires' into the code before deploying the QA on the HC3 - makes it easy to keep a modular source code for development)

     

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