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

  • Topic Author
  • 4 minutes ago, minsad79 said:

     

    Hi gap

    I got it from er3

    under 

     

     

    function httpGet(url)
      local http = net.HTTPClient()
      http:request(url, {
          options = { method = 'GET' },
          success =function() fibaro:debug(url.." ,done."end,
          error = function(errorcode) fibaro:debug("error=" .. errorcode) end
        })
    end
     
     

    It's the old style call to fibaro:debug not available in HC3's QAs

    Try the ER Log function instead.

    Please login or register to see this code.

    Link to comment
    Share on other sites

    18 minutes ago, jgab said:

    HC3의 QA에서는 사용할 수없는 fibaro : debug에 대한 오래된 스타일의 호출입니다.

    대신 ER Log 기능을 사용해보십시오.

    Please login or register to see this code.

     

     

    Thanks for your advice
     
    I'll test it tonight

     

     

    Link to comment
    Share on other sites

    5 hours ago, minsad79 said:

     

     

    Thanks for your advice
     
    I'll test it tonight

     

     

    you advised works well
    Thanks

    Another problem

    Status of lighting

    rule ("@ 04:00 & officedeskLight: isOn => officedeskLight: off")
    rule ("@ 05:00 & officedeskLight: isOff => officedeskLight: on")

    I don't think the isOn status value is reflected

    Edited by minsad79
    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, minsad79 said:

    Another problem

    rule ("@ 04:00 & officedeskLight: isOn => officedeskLight: off")
    rule ("@ 05:00 & officedeskLight: isOff => officedeskLight: on")

    I don't think the isOn status value is reflected

    What type is officedeskLight? com.fibaro.binarySwitch or com.fibaro.multilevelSwitch or something else?

    Link to comment
    Share on other sites

    7 minutes ago, jgab said:

    What type is officedeskLight? com.fibaro.binarySwitch or com.fibaro.multilevelSwitch or something else?

     

    Dimmer 2 & rgbw relay 2

    Two devices

    Link to comment
    Share on other sites

    39 minutes ago, jgab said:

    What type is officedeskLight? com.fibaro.binarySwitch or com.fibaro.multilevelSwitch or something else?

    My rules
     
    rule("bedmotion:breached & 22:00..02:00  =>  Bedlamp:value=50")
    rule("bedmotion:breached & 02:10..03:30  =>  Bedlamp:value=30")
    rule("$PresentState=='Home' & trueFor(bednight,bedmotion:safe) & 22:00..03:30 => Bedlamp:value=5")
    rule("@04:00 & Bedlamp:isOn   =>  Bedlamp:off")    
     
    The last rule doesn't work
     
    Bedlamp:isOn 
     

     

    Dimmer & rgbw both

    It doesn't seem to reflect on the state

     
    Link to comment
    Share on other sites

  • Topic Author
  • 3 minutes ago, minsad79 said:
    My rules
     
    rule("bedmotion:breached & 22:00..02:00  =>  Bedlamp:value=50")
    rule("bedmotion:breached & 02:10..03:30  =>  Bedlamp:value=30")
    rule("$PresentState=='Home' & trueFor(bednight,bedmotion:safe) & 22:00..03:30 => Bedlamp:value=5")
    rule("@04:00 & Bedlamp:isOn   =>  Bedlamp:off")    
     
    The last rule doesn't work
     
    Bedlamp:isOn 
     

     

    Dimmer & rgbw both

    It doesn't seem to reflect on the state

     

    Can you see what kind of triggers you get when bedlam is turned on/off?

    Link to comment
    Share on other sites

    5 minutes ago, jgab said:

    Can you see what kind of triggers you get when bedlam is turned on/off?

    Please login or register to see this attachment.

     

     

    No error text is displayed

    Link to comment
    Share on other sites

    9 minutes ago, minsad79 said:

    Please login or register to see this attachment.

     

     

    No error text is displayed

    Another light

    triggers

     

    [DEBUG] 2020-03-20 12:15:06 am: [D] Incoming event:{"type":"property","deviceID":1045,"value":460,"propertyName":"value","old":520.0} 

    [DEBUG] 2020-03-20 12:15:06 am: [D] Incoming event:{"type":"property","deviceID":1045,"value":503,"propertyName":"value","old":460.0} 

    [DEBUG] 2020-03-20 12:15:13 am: [D] Incoming event:{"type":"property","deviceID":1164,"value":5,"propertyName":"value","old":0} 

    [DEBUG] 2020-03-20 12:15:13 am: [D] Incoming event:{"type":"property","deviceID":1164,"value":true,"propertyName":"state","old":false}

    Link to comment
    Share on other sites

    Guest kallecux

    Hi @jgab, you wrote something about it in the past, but I would like to ask you specifically (HC3 and ER4)

     

    I want to take a picture every minute when moving in the garage as long as the motion detector detects motion.

    This is relatively easy with a while loop.

     

    Now I am concerned that the while loop blocks the entire ER4 and that other events cannot be processed. Is that so?

     

    If so, how can I start a single task from ER4 that does not block ER4.

    1. A scene?

    2. An own method of ER4?  (QuickApp:takePhotos()....end)

     

    What do you think about that?

    Best regards

    Edited by kallecux
    Link to comment
    Share on other sites

    rule("Kitchenmotion=kt.Kitchenmotion; Kitchenlamp=kt.Kitchenrgbw"
    rule([[$PresentState=='Home'  & Kitchenlamp:isOn =>
        || @22:00..04:00  >> Kitchenlamp:color={129,42,3,0}]])
    rule("Kitchenmotion:breached & 22:00..02:00-1  =>  Kitchenlamp:value=50")
    rule("Kitchenmotion:breached & 02:00..04:00-1  =>  Kitchenlamp:value=30")
    rule("trueFor(00:05,Kitchenmotion:safe) & 22:00..04:00-1 => Kitchenlamp:value=5")
    rule("@04:00 & Kitchenlamp:isOn =>  Kitchenlamp:off")    <======Not going off
     
     
    rule("bedmotion=br.Bedroommotion; Bedlamp={br.Bedstrip,br.BedroomBulb}"
     rule("bednight = 00:05")
    rule([[$PresentState=='Home'  & Bedlamp:isOn =>
        || @22:00..04:00  >> Bedlamp:color={129,42,3,0}]])
    rule("bedmotion:breached & 22:00..02:00-1  =>  Bedlamp:value=50")
    rule("bedmotion:breached & 02:00..04:00-1  =>  Bedlamp:value=30")
    rule([[$PresentState=='Home' & trueFor(bednight,bedmotion:safe) & 22:00..04:00-1 => Bedlamp:value=5]])
    rule("@04:00  & Bedlamp:isOn =>  Bedlamp:off")    <======Not going off
     
     

    Hi gap

    Some of the rules aren't working

    This is the rule used in er3

    But in er4 it doesn't work

    I'm looking for your advice

    Thanks in advance

     
    Lighting is fibaro rgbw2
    Edited by minsad79
    Link to comment
    Share on other sites

  • Topic Author
  • 26 minutes ago, minsad79 said:
    rule("Kitchenmotion=kt.Kitchenmotion; Kitchenlamp=kt.Kitchenrgbw"
    rule([[$PresentState=='Home'  & Kitchenlamp:isOn =>
        || @22:00..04:00  >> Kitchenlamp:color={129,42,3,0}]])
    rule("Kitchenmotion:breached & 22:00..02:00-1  =>  Kitchenlamp:value=50")
    rule("Kitchenmotion:breached & 02:00..04:00-1  =>  Kitchenlamp:value=30")
    rule("trueFor(00:05,Kitchenmotion:safe) & 22:00..04:00-1 => Kitchenlamp:value=5")
    rule("@04:00 & Kitchenlamp:isOn =>  Kitchenlamp:off")    <======Not going off
     
     
    rule("bedmotion=br.Bedroommotion; Bedlamp={br.Bedstrip,br.BedroomBulb}"
     rule("bednight = 00:05")
    rule([[$PresentState=='Home'  & Bedlamp:isOn =>
        || @22:00..04:00  >> Bedlamp:color={129,42,3,0}]])
    rule("bedmotion:breached & 22:00..02:00-1  =>  Bedlamp:value=50")
    rule("bedmotion:breached & 02:00..04:00-1  =>  Bedlamp:value=30")
    rule([[$PresentState=='Home' & trueFor(bednight,bedmotion:safe) & 22:00..04:00-1 => Bedlamp:value=5]])
    rule("@04:00  & Bedlamp:isOn =>  Bedlamp:off")    <======Not going off
     
     

    Hi gap

    Some of the rules aren't working

    This is the rule used in er3

    But in er4 it doesn't work

    I'm looking for your advice

    Thanks in advance

     
    Lighting is fibaro rgbw2

     

    Try this 

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    2 hours ago, jgab said:

     

    Please login or register to see this attachment.

    보십시오. 

    [DEBUG] 2020-03-21 06:21:50 pm: [ERROR] in 'Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]': {"msg":"Error executing instruction:'["%prop",1,"isOn"]'","src":"Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]","ERR":true,"err":"./quickApp.lua:2096: attempt to compare string with number"} 

    [DEBUG] 2020-03-21 06:21:50 pm: [ERROR] in 'Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]': {"msg":"Error executing instruction:'["%prop",1,"isOn"]'","src":"Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]","ERR":true,"err":"./quickApp.lua:2096: attempt to compare string with number"}

     

    Thanks

    Applying the quick app you sent causes another error

     

     

    rule("exitmotion=et.EntranceMotion; exitlamp={et.EntranceBulb1,et.Entrancestrip2}"
    rule("06:00..16:00-1 & exitlamp:isOn => exitlamp:color={255,255,255,255}")
    rule("16:00..06:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}")
    rule("exitmotion:breached  =>  exitlamp:value=100")
    rule("trueFor(00:01,exitmotion:safe) => exitlamp:off")
    Edited by minsad79
    Link to comment
    Share on other sites

  • Topic Author
  • 27 minutes ago, minsad79 said:

    [DEBUG] 2020-03-21 06:21:50 pm: [ERROR] in 'Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]': {"msg":"Error executing instruction:'["%prop",1,"isOn"]'","src":"Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]","ERR":true,"err":"./quickApp.lua:2096: attempt to compare string with number"} 

    [DEBUG] 2020-03-21 06:21:50 pm: [ERROR] in 'Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]': {"msg":"Error executing instruction:'["%prop",1,"isOn"]'","src":"Rule:77[16:00..02:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}]","ERR":true,"err":"./quickApp.lua:2096: attempt to compare string with number"}

     

    Thanks

    Applying the quick app you sent causes another error

     

     

    rule("exitmotion=et.EntranceMotion; exitlamp={et.EntranceBulb1,et.Entrancestrip2}"
    rule("06:00..16:00-1 & exitlamp:isOn => exitlamp:color={255,255,255,255}")
    rule("16:00..06:00-1 & exitlamp:isOn => exitlamp:color={129,42,3,0}")
    rule("exitmotion:breached  =>  exitlamp:value=100")
    rule("trueFor(00:01,exitmotion:safe) => exitlamp:off")

    New attempt: 

    Please login or register to see this attachment.

     

    The HC3 has changed the type of the values that are returned (it used to be strings). I have been a bit reluctant to change it in ER4 as it may affect parts of  my code that I haven't anticipated... Anyway, I did an attempt - let me know how it works out.

    /J

    Link to comment
    Share on other sites

    4 minutes ago, jgab said:

    새로운 시도 : 

    Please login or register to see this attachment.

     

    HC3가 리턴 된 값의 유형을 변경했습니다 (문자열 이었음). 예상치 못한 코드 부분에 영향을 줄 수 있으므로 ER4에서 변경하기를 꺼려했습니다 ... 어쨌든, 시도했습니다-어떻게 작동하는지 알려주세요.

    /제이

    [DEBUG] 2020-03-21 06:39:18 pm: [D] fibaro.call(1227,"setValue",100) => nil 

    [DEBUG] 2020-03-21 06:39:18 pm: [D] fibaro.call(1232,"setValue",100) => nil 

    [DEBUG] 2020-03-21 06:39:19 pm: [D] fibaro.call(1227,"setColor",129,42,3,0) => nil 

    [DEBUG] 2020-03-21 06:39:19 pm: [D] fibaro.call(1232,"setColor",129,42,3,0) => nil 

    [DEBUG] 2020-03-21 06:39:19 pm: [D] fibaro.call(1227,"setColor",129,42,3,0) => nil 

    [DEBUG] 2020-03-21 06:39:19 pm: [D] fibaro.call(1232,"setColor",129,42,3,0) => nil

     

    J gap

    Thank you for your kind advice

    Works fine

    Your ER is the best

    • Like 1
    Link to comment
    Share on other sites

    • 2 weeks later...

    Hi gap

    Your Event Runner 4

    Can I use the full version?

    Useful functions in er3

    I want to use it again at Home Center 3

    Link to comment
    Share on other sites

  • Topic Author
  • 51 minutes ago, minsad79 said:

    Hi gap

    Your Event Runner 4

    Can I use the full version?

    Useful functions in er3

    I want to use it again at Home Center 3

     

    The main difference between ER# and ER4 is that Hue light support is. missing.

    Is it Hue you are thinking on when you refer to the "full version"?

    Edited by jgab
    Link to comment
    Share on other sites

    31 minutes ago, jgab said:

     

    ER #과 ER4의 주요 차이점은 Hue light 지원입니다. 잃어버린.

    "정식 버전"을 참조 할 때 생각하고있는 색조입니까?

    no

    The difference I feel

    Rules sometimes slow when running continuously

    rule ("# ArrivalHouse => $ PresentState = 'Home'; wait (00:00:10); post (#familyInhouse)")

    Rule wait (00:00:10); Applied unspecified late

    Link to comment
    Share on other sites

  • Topic Author
  • On 4/1/2020 at 11:16 AM, minsad79 said:

    no

    The difference I feel

    Rules sometimes slow when running continuously

    rule ("# ArrivalHouse => $ PresentState = 'Home'; wait (00:00:10); post (#familyInhouse)")

    Rule wait (00:00:10); Applied unspecified late

    Do you have other rules that could cause the delay?

    If I try this

    Please login or register to see this code.

    It will start 10000 parallell loops that each wait 5s before looping again (with a 1s delay). Each loop measures the actual 'wait' time and if it deviates with more than 1s it prints a message.

    These rules, alone in a ER4 QA, will work for 5min before starting to log warnings - so it can't really cope with that amount in the long run. If I reduce it to 8000 I waited for 10min without any warnings,.

    This tells us that it seems to be able to schedule around ~5000-8000 rules with setTimeouts and still keep up. That is good news. (It seems to be similar values for ER3 on the HC2)

     

    Even though these rules are simple, (an event match, a wait and a if-then and a post) it works.

    In reality rules are more complex, and other things can "disturb" running rules. 

     

    -Do you have many rules? 10, 50, 100?

    -Do you send events between scenes? like remote(...) ?

    -Do you use any QuickApp:<functions> in your ER scene (like for UI buttons or other fibaro.calls ?)

    -Do you have any rules that you suspect could take time?

     

    I would like to find rules that causes this delay - I haven't found any myself yet but I will do some more experiments

    Sometimes the HC3 box also decides to do other things and can delay scenes/quickapps. Do you always see a random delay longer than 10s when you use wait(00:00:10) ?

    You could add this

    Please login or register to see this code.

    To get a warning if the wait is too long (we check against 11s as it could be on the border of 10-11s).

     

    I have a new version here where I tried to optimise the polling of triggers a bit, you could try it:

    Please login or register to see this attachment.

    Edited by jgab
    Link to comment
    Share on other sites

    3 hours ago, jgab said:

    지연을 유발할 수있는 다른 규칙이 있습니까?

    내가 이것을 시도하면

    Please login or register to see this code.

    10000 개의 병렬 루프를 시작하여 각 루프가 다시 5 초 동안 기다린 후 (1 초 지연) 시작합니다. 각 루프는 실제 '대기'시간을 측정하고 1 초 이상 벗어나면 메시지를 인쇄합니다.

    이 규칙은 ER4 QA에서만 경고를 기록하기 전에 5 분 동안 작동하므로 장기적으로 그 양에 대처할 수 없습니다. 8000으로 줄이면 아무런 경고없이 10 분 동안 기다렸습니다.

    이것은 setTimeouts로 ~ 5000-8000 개의 규칙을 예약하고 계속 유지할 수있는 것으로 보입니다. 좋은 소식입니다. (HC2의 ER3과 비슷한 값인 것 같습니다)

     

    이러한 규칙은 간단하지만 (이벤트 일치, 대기 및 if-then 및 게시물) 작동합니다.

    실제로 규칙은 더 복잡하며 다른 규칙은 실행 규칙을 "방해"할 수 있습니다. 

     

    -규칙이 많습니까? 10, 50, 100?

    -당신은 장면 사이에 이벤트를 보내십니까? 같은 원격 (...)?

    -ER 버튼에 QuickApp : <기능>을 사용하십니까 (UI 버튼 또는 다른 fibaro.calls와 같은)?

    시간이 걸릴 것으로 의심되는 규칙이 있습니까?

     

    이 지연을 유발하는 규칙을 찾고 싶습니다. 아직 자신을 찾지 못했지만 더 많은 실험을 수행 할 것입니다

    때때로 HC3 박스는 다른 일을하기로 결정하고 장면 / 퀵앱을 지연시킬 수 있습니다. wait (00:00:10)을 사용할 때 항상 10 초보다 긴 임의 지연이 보입니까?

    이것을 추가 할 수 있습니다

    Please login or register to see this code.

    대기 시간이 너무 길면 경고 메시지가 표시됩니다 (10-11 초 경계에있을 수 있으므로 11 초와 비교).

     

    트리거의 폴링을 약간 최적화하려고 시도한 새 버전이 있습니다.

    Please login or register to see this attachment.

    Delay not seen in er3

    In er4, some rules delayed

    My rules 140

    There were no interlocking and suspected rules of other scenes.

    Your optimized er4 hasn't been delayed yet.

    Thank you for your advice and passion

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