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



jgab

Recommended Posts

Jan good morning,

The remote didt work.

Your rule was received so I copied that in my rules>>> no luck

I copied from the sending scene everything after "end  main" into the receiving scene result >>>> receiving remote!

For me wierd because the scenes yesterday or the day before all where updated to build 88.

Shall I refresh all my scenes? Does that not happen if you release a new build?

Please advice,

//Sjakie

Link to comment
Share on other sites

  • Topic Author
  • I've been playing with the HC3 a bit  (I don't own a HC3 but a friend has allowed me to remotely login to do testing - I'm very grateful for that).

    ...and I have made some progress with EventRunner....

    I got my first rules to run today. :-)

    Please login or register to see this code.

    The #UI event is generated when a button in the device UI is clicked (similar for sliders)

    Please login or register to see this code.

    "That's one small step for me, one giant leap for EventRunner."

     

    However, to early to say if it's useful - need to understand how it performs...

     

    but my aim is that at least people that automate with EventRunner should be able to migrate from HC2 to HC3 ?

     

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

    Jan,

    That should be very nice!!

    Unless I dont know when I will upgrade.

    Thanks for the service excellence.

    //Sjakie

    Link to comment
    Share on other sites

    • 2 weeks later...

    Good morning Jan,

    Please advice me how to accomplish what I like to do.

    I have a button to start arming the house >>>it will startArming followed by a delay off 45 seconds and then >>doArming

    Now I have integrated the check off doors/windows are closed.

    What I want is that if button in position  (hal.locatiegezin:isOff) is pushed again within five minutes , (position hal.locatiegezin:isOn) it will cancel the doArming process and /or start the disArming  process.

    In both positions of the button it will start to arm a different set of triggers

    Rule.eval([[#startArming & hal.locatiegezin:isOn (family is  absent=>

    Rule.eval([[#startArming & hal.locatiegezin:isOff => (family is present)

    Can this be done??

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • Here is a alpha HC3 version of the EventRunner - I have run it for 24 hours and it haven't crashed yet...

    -EventScript support. (maybe some stuff (fibaro calls)  that doesn't work yet)

    -Hue support (only one hub at the moment) Hue credentials sets up in quickvariables panel.

    -Nodered "API" looks different on the nodered side now. Will come back with info.

    Please login or register to see this attachment.

     

    Update: Small improvement...

    I will not push different pre-built versions of the ER4 to my GitHub for now. Instead I will update this post with new fqa versions until I'm satisfied with the stability.

    If you want to test ER4 offline, download EventRunner4.lua, EventScript4.lua, Hue4.lua (and fibaroapiHC3.lua) from my GitHub.

     

     

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • 37 minutes ago, jgab said:

    Here is a alpha HC3 version of the EventRunner - I have run it for 24 hours and it haven't crashed yet...

    -EventScript support. (maybe some stuff (fibaro calls)  that doesn't work yet)

    -Hue support (only one hub at the moment) Hue credentials sets up in quickvariables panel.

    -Nodered "API" looks different on the nodered side now. Will come back with info.

    Please login or register to see this attachment.

     

    Nodered fron ER4 looks different.

    Nodered flow:

    Please login or register to see this spoiler.

     

    Incoming events uses the "Async path"

    Please login or register to see this code.

    will use the async path on Nodered and switch to the "echo1 function" that responds with an event back. Works both offline and on the HC3.

    The callback from Nodered to the HC3 uses 

    Please login or register to see this code.

    i.e. it calls a function QuickApp:fromNodeRed(event) in the HC3 scene (or the simulated offline version)

    In HC2 we used to start the scene with extra arguments that carried the event, which doesn't work now.

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • 21 hours ago, kallecux said:

    @jgab The alpha Version is unable to load - any "release news" for HC3?

     

    Greetings

    Karl Heinz

    Do this load for you? 

    Please login or register to see this attachment.

    If not,  what errors do you get? if any...

    Link to comment
    Share on other sites

  • Topic Author
  • 22 hours ago, jgab said:

    Do this load for you? 

    Please login or register to see this attachment.

    If not,  what errors do you get? if any...

    Ok, this version is a bit better - should handle breached and binary switches.

    setting 'armed' still doesn't work well...

    Please login or register to see this attachment.

    • Like 1
    Link to comment
    Share on other sites

    Hey jgap

    Running er4 gives me an error

    This rule worked fine in er3

    But error in er4

    Please advise

     

     rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
      rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
      rule("Livingbath_door:breached => inlivingBathroom=false")
      rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
      rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
      rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
     
     

    [DEBUG] 2020-03-08 09:50:01 pm: ------------------------------------- Setting up rules (main) ------------------------------------- 

    [DEBUG] 2020-03-08 09:50:01 pm: [ERROR] Error in 'trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off': ./quickApp.lua:2005: no triggers found in header 

    [ERROR] 2020-03-08 09:50:01 pm: QuickApp crashed 

    [ERROR] 2020-03-08 09:50:01 pm: [LUA Code] line: 1372 Main ERROR:[LUA Code] line: 1372 [LUA Code] line: 1372 no triggers found in header

     
     
     
    Link to comment
    Share on other sites

  • Topic Author
  • 2 minutes ago, minsad79 said:

    Hey jgap

    Running er4 gives me an error

    This rule worked fine in er3

    But error in er4

    Please advise

     

     rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
      rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
      rule("Livingbath_door:breached => inlivingBathroom=false")
      rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
      rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
      rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
     
     

    [DEBUG] 2020-03-08 09:50:01 pm: ------------------------------------- Setting up rules (main) ------------------------------------- 

    [DEBUG] 2020-03-08 09:50:01 pm: [ERROR] Error in 'trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off': ./quickApp.lua:2005: no triggers found in header 

    [ERROR] 2020-03-08 09:50:01 pm: QuickApp crashed 

    [ERROR] 2020-03-08 09:50:01 pm: [LUA Code] line: 1372 Main ERROR:[LUA Code] line: 1372 [LUA Code] line: 1372 no triggers found in header

     

    How do you setup the variables 'Livingbath_sensor' and 'Livingbath_door'.

    Typically when ER complains about no triggers found in header it means that it can't deduce any deviceID numbers from the variables.

    Link to comment
    Share on other sites

      rule("Livingbath_sensor=Livingroombath.Livingbathmotion; Livingbathlight=Livingroombath.Livingbathlight; Livingvent=Livingroombath.Livingbathvent")
      rule("Livingbath_door=Livingroombath.Livingbathdoor; Livingbath_Temp=Livingroombath.LivingbathTemp ")
      rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
      rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
      rule("Livingbath_door:breached => inlivingBathroom=false")
      rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
      rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
      rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
     

    apply the rule to er4,

    Error

    normal operation on er3

     

     

     

    [DEBUG] 2020-03-09 12:15:02 am: [L] Livingbath_sensor=Livingroombath.Livingbathmotion; Livingbathlight=Livingroombath.Livingbathlight; Livingvent=Livingroombath.Livingbathvent = 252 

    [DEBUG] 2020-03-09 12:15:02 am: [L] Livingbath_door=Livingroombath.Livingbathdoor; Livingbath_Temp=Livingroombath.LivingbathTemp = 565 

    [DEBUG] 2020-03-09 12:15:02 am: [ERROR] Error in 'trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off': ./quickApp.lua:2335: attempt to call a nil value (field '_mkCombEvent') 

    [ERROR] 2020-03-09 12:15:02 am: QuickApp crashed 

    [ERROR] 2020-03-09 12:15:02 am: [LUA Code] line: 1835 Main ERROR:[LUA Code] line: 1835 [LUA Code] line: 1835 attempt to call a nil value (field '_mkCombEvent')

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, minsad79 said:
      rule("Livingbath_sensor=Livingroombath.Livingbathmotion; Livingbathlight=Livingroombath.Livingbathlight; Livingvent=Livingroombath.Livingbathvent")
      rule("Livingbath_door=Livingroombath.Livingbathdoor; Livingbath_Temp=Livingroombath.LivingbathTemp ")
      rule("trueFor(00:01,Livingbath_sensor:safe & Livingbath_door:value) => !inlivingBathroom & Livingbathlight:off")
      rule("Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;;Livingbathlight:on")
      rule("Livingbath_door:breached => inlivingBathroom=false")
      rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")
      rule([[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & Livingbath_sensor:last<=3 >> wait(00:00:20); Livingvent:on]])
      rule("Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:off"
     

    apply the rule to er4,

    Error

    normal operation on er3

     

    I'm sorry but I haven't spent so much time with ER4 yet - been busy with the fibaroapiHC3 SDK - so there can be all kind of bugs...

    Anyway, thanks for your patience testing it. I have a new version that fixes your latest problems

    Please login or register to see this attachment.

    Edited by jgab
    Link to comment
    Share on other sites

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:4[Livingbath_sensor:breached => || Livingbath_door:safe >> inlivingBathroom=true ;...] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:5[Livingbath_door:breached => inlivingBathroom=false] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:6[Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:7[Livingbath_door:safe =>||inlivingBathroom==true & Livingbath_Temp:temp >= 22 & L...] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:8[Livingbath_door:breached =>||inlivingBathroom==false >> wait(00:03); Livingvent:...] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] BedBath_sensor=bb.Bedbathroommotion;Bedbathlight=bb.Bedbathroomlight;Bedvent=bb.Bedbathroomvent = 298 

    [DEBUG] 2020-03-09 01:19:49 am: [L] BedBath_door=bb.Bedbathroomdoor = 925 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:9[trueFor(00:01,BedBath_sensor:safe & BedBath_door:value) => !inbedBathroom & Bedb...] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:10[BedBath_sensor:breached => || BedBath_door:safe >> inbedBathroom=true ;;Bedbathl...] = OK 

    [DEBUG] 2020-03-09 01:19:49 am: [L] Rule:11[BedBath_door:breached => inbedBathroom=false] = OK

     

     

    Thank you should work normal

    Your er4 is the best

    Link to comment
    Share on other sites

    Hi jgap

    under

    rule ([[Livingbath_door: safe => || inlivingBathroom == true & Livingbath_Temp: temp> = 22 & Livingbath_sensor: last <= 3 >> wait (00:00:20); Livingvent: on]])
       rule ("Livingbath_door: breached => || inlivingBathroom == false >> wait (00:03); Livingvent: off")

    This part doesn't work

    Advise

    Link to comment
    Share on other sites

  • Topic Author
  • 16 minutes ago, minsad79 said:

    Hi jgap

    under

    rule ([[Livingbath_door: safe => || inlivingBathroom == true & Livingbath_Temp: temp> = 22 & Livingbath_sensor: last <= 3 >> wait (00:00:20); Livingvent: on]])
       rule ("Livingbath_door: breached => || inlivingBathroom == false >> wait (00:03); Livingvent: off")

    This part doesn't work

    Advise

    Hi, There is a strange space between '>' and '=' in "Livingbath_Temp: temp> = 22"... that is at least one cause of trouble.

    Link to comment
    Share on other sites

    rule ([[Livingbath_door: safe => || inlivingBathroom == true & Livingbath_Temp: temp >= 22 & Livingbath_sensor: last <= 3 >> wait (00:00:20); Livingvent: on]])
       rule ("Livingbath_door: breached => || inlivingBathroom == false >> wait (00:03); Livingvent: off")

     

    I modified the space between

    And below

    Error phrase

     

    [DEBUG] 2020-03-09 11:40:14 pm: Error in setTimeout (line:-157): attempt to index a nil value (global 'coroutine')

     

     

     

    Link to comment
    Share on other sites

     rule([[$PresentState=='Home' & wday('fri-sun') & officedeskLight:isOn =>
        || 22:00..23:00 >> officedeskLight:color={0,255,0,0}
        || 23:01..00:00 >> officedeskLight:color={0,119,155,0}
        || 00:01..01:00 >> officedeskLight:color={129,70,0,0}
        || 01:01..02:00 >> officedeskLight:color={215,0,255,0}
       ]])

     

    In the above rules

    Error

     

    [DEBUG] 10.03.2020 13:23:35: [ERROR] Error in 'officemotion:breached & 22:00..02:00 =>  officedeskLight:value=50': EventRunner4.lua:714: attempt to concatenate a nil value
    Program completed in 1.45 seconds (pid: 20528).
    EventRunner4.lua:2631: Main ERROR:EventScript4.lua:1019: EventRunner4.lua:714: attempt to concatenate a nil value
    stack traceback:
        [C]: in function 'error'
        EventRunner4.lua:2631: in function 'cont'
        EventRunner4.lua:2641: in function 'cont'
        EventRunner4.lua:1304: in function 'installExternalModules'
        EventRunner4.lua:2622: in function 'initEventExtension'
        EventRunner4.lua:2646: in function 'onInit'
        fibaroapiHC3.lua:1048: in function 'fun'
        fibaroapiHC3.lua:536: in function 'start'
        fibaroapiHC3.lua:2877: in function 'start'
        EventRunner4.lua:2651: in main chunk
    Debugging session completed (traced 0 instructions).
     

    Edited by minsad79
    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, minsad79 said:

     rule([[$PresentState=='Home' & wday('fri-sun') & officedeskLight:isOn =>
        || 22:00..23:00 >> officedeskLight:color={0,255,0,0}
        || 23:01..00:00 >> officedeskLight:color={0,119,155,0}
        || 00:01..01:00 >> officedeskLight:color={129,70,0,0}
        || 01:01..02:00 >> officedeskLight:color={215,0,255,0}
       ]])

     

    In the above rules

    Error

     

    [DEBUG] 10.03.2020 13:23:35: [ERROR] Error in 'officemotion:breached & 22:00..02:00 =>  officedeskLight:value=50': EventRunner4.lua:714: attempt to concatenate a nil value
    Program completed in 1.45 seconds (pid: 20528).
    EventRunner4.lua:2631: Main ERROR:EventScript4.lua:1019: EventRunner4.lua:714: attempt to concatenate a nil value
    stack traceback:
        [C]: in function 'error'
        EventRunner4.lua:2631: in function 'cont'
        EventRunner4.lua:2641: in function 'cont'
        EventRunner4.lua:1304: in function 'installExternalModules'
        EventRunner4.lua:2622: in function 'initEventExtension'
        EventRunner4.lua:2646: in function 'onInit'
        fibaroapiHC3.lua:1048: in function 'fun'
        fibaroapiHC3.lua:536: in function 'start'
        fibaroapiHC3.lua:2877: in function 'start'
        EventRunner4.lua:2651: in main chunk
    Debugging session completed (traced 0 instructions).
     

    It's the rule that starts 'officemotion:breached & 22:00..02:00 =>  officedeskLight:value=50'

    that gives the error. Can you post it?

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