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

Posted (edited)
1 hour ago, jgab said:

 

 

The best

ER

Jgab
Thank you

 

Edited by minsad79

Share this post


Link to post
Share on other sites
Posted (edited)

Hi jgab

 

ER4 some errors

1.'Rule: 15 [House_sensor: breached => || Gate_sensor: safe >> home = true; post (#ArrivalHouse)] ': {"msg": "Error executing instruction:' ["% prop ", 1," breached "] '", "src": "Rule: 15 [House_sensor: breached => || Gate_sensor: safe >> home = true; post (#ArrivalHouse)] "," ERR ": true," err ":" ./ quickApp.lua: 2542: attempt to compare string with number "}

 

2.Rule: 48 [$ PresentState == 'Home' & lr.LivingRgbw: isOn => ...] ': {"msg": "Error executing instruction:' ["% prop ", 1," isOn "] '"," src ":" Rule: 48 [$ PresentState ==' Home '& lr.LivingRgbw: isOn => ...] "," ERR ": true," err ":" ./ quickApp.lua: 2542: attempt to compare string with number "}

 

3.Rule: 77 [rm.Philiocolorbutton3: central.keyId == '1' & ch.kidcurtain: isOpen => ch.kidcurta ...] ': {"msg": "Error executing instruction:' ["% prop ", 1," isOpen "] '", "src": "Rule: 77 [rm.Philiocolorbutton3: central.keyId ==' 1 '& ch.kidcurtain: isOpen => ch.kidcurta ...]", " ERR ": true," err ":" ./ quickApp.lua: 2542: attempt to compare string with number "}


During the rules. >> It looks like an error


E_VERSION, E_FIX = 0.2, "fix1"

in use

 

 

Edited by minsad79

Share this post


Link to post
Share on other sites
  • Topic Author
  • 10 minutes ago, minsad79 said:

    Hi jgab

     

    ER4 some errors

     

    Sorry, try this version

    Please login or register to see this attachment.

    Share this post


    Link to post
    Share on other sites
    Posted (edited)
    1 hour ago, jgab said:

     

     

    Please login or register to see this attachment.

    Thanks

    Works fine

    Edited by minsad79

    Share this post


    Link to post
    Share on other sites

    Just updated to 4.582 and ER wont start and nothing in the debug window :(

    4.581 beta worked just fine.

    Tried to roll back to 4.581 beta and still same problem.

    Anyone else that have the same problem?

     

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 1 hour ago, sonnyboy said:

    Just updated to 4.582 and ER wont start and nothing in the debug window :(

    4.581 beta worked just fine.

    Tried to roll back to 4.581 beta and still same problem.

    Anyone else that have the same problem?

     

    I just upgraded from 4.57..something to 5.582 and everything runs fine.

    Nothing at all in the debug window?

    Share this post


    Link to post
    Share on other sites
    21 hours ago, jgab said:

    I just upgraded from 4.57..something to 5.582 and everything runs fine.

    Nothing at all in the debug window?

    Nothing at all in the debug window. 

    i wrote to Fibaro yesterday, no scenes runs at all and nothing works.

    Tried to make a new ER scene, only got "forbidden 403"

    Rolled back to previous version, did not work.

    So now i just wait for support from fibaro tech.

    Our house is back to analog again and it sucks...

    Share this post


    Link to post
    Share on other sites

    Hi @jgab,

    when I look at the diagram on the first page, it describes that EventRunner can react to an http event.

     

    I would like to send an http POST to the HC3 and transfer a payload and process it further in ER4.

    Specifically, it is about evaluating location information from the Geofency app.

    So far I have sent the POST to Homeassistant / NodeRed, but I would like to do without it.

     

    Is there a way to handle this?

    Greetings

    Karl Heinz

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • To send an event to ER4 you need to do the equivalent of below, ex. calling ER4 with deviceID 963 and event {type='foo'}

    fibaro.call(963,"ER_remoteEvent","E"..json.encode({type='foo', value=77}))

     

    With the api it becomes a post to 

     

    http://<HC3IP>/api/devices/963/action/ER_remoteEvent

    with the json payload of the ("E"..json.encode(event))

     

    The hack with the "E" infront of it was to overcome some strange bugs when it comes to how the HC3 interpret its payload. I may change it if I find another way.

    But for now you need to prepend "E" to the json encoded string of the event. 

     

    That event can then be picked up by a rule type

    Rule.eval("#foo => log('Value is:%s',env.event.value)")

     

     

     

    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Hi @jgab,

    sorry, but somehow I have a bar in my head.

     

    I am trying to get the connection to NodeRed (i did it in the past, but i lost some code) and use your example from March 17th from this post.

     

    I use this code in ER4:

    Please login or register to see this code.

    and I get the following answer in the HC3 debug window:

    Please login or register to see this code.

    the rule #echo1 is not responding....please give me a tip! 

     

    Thank you!

    Karl Heinz 

     

    P.S: I use E_VERSION,E_FIX = 0.2,"fix3"

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 14 hours ago, kallecux said:

    Hi @jgab,

    sorry, but somehow I have a bar in my head.

     

    I am trying to get the connection to NodeRed (i did it in the past, but i lost some code) and use your example from March 17th from this post.

     

    I use this code in ER4:

    Please login or register to see this code.

    and I get the following answer in the HC3 debug window:

    Please login or register to see this code.

    the rule #echo1 is not responding....please give me a tip! 

     

    Thank you!

    Karl Heinz 

     

    P.S: I use E_VERSION,E_FIX = 0.2,"fix3"

     

    The value echoed back doesn't have a 'data' field so the rule doesn't match.

    try

    Please login or register to see this code.

     

    Share this post


    Link to post
    Share on other sites

    Hello @jgab, thanks for the tip....i did it with your example.

     

    But now, I want to send a message from NodeRed to ER4 without first sending anything from ER4 to NodeRed.

     

    What is the standard message that has to be sent to ER4 so that it can be intercepted via an event rule.

    Not just the payload, but the entire property. I've done a lot of experiments, but I can't do it.

     

    Maybe a small flow like this:

     

    Please login or register to see this image.

    /monthly_2020_05/image.png.53e318a2cf5226e5bc27d4f00b6e34aa.png" />

    and the machting rule in ER4.

     

    Thanks in advance!

     

    Greetings

    Karl Heinz 

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Posted (edited)
    1 hour ago, kallecux said:

    Hello @jgab, thanks for the tip....i did it with your example.

     

    But now, I want to send a message from NodeRed to ER4 without first sending anything from ER4 to NodeRed.

     

    What is the standard message that has to be sent to ER4 so that it can be intercepted via an event rule.

    Not just the payload, but the entire property. I've done a lot of experiments, but I can't do it.

     

    Maybe a small flow like this:

     

    Please login or register to see this link.

    and the machting rule in ER4.

     

    Thanks in advance!

     

    Greetings

    Karl Heinz 

    The way I encode the message when sending it. out from NodeRed is

    Please login or register to see this code.

    Also, msg.EDeviceID should be the QA id. Look at the "encodeEvent" node below. Look also at the "timestamp" flow that is started from NR.

    The outgoing GET in NR is

    Please login or register to see this code.

    and I check the box for " Append msg.payload as query string parameters"

    Here is. an experimental flow that I use to test with (It contains some MQTT stuff that is under test too)

    Please login or register to see this spoiler.

     

    Edited by jgab
    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Hello Jan,

    Supervisor stopped checking due to

    Please login or register to see this image.

    /monthly_2020_06/image.png.c7ff1d9ec9492256b4007be5a096539e.png" />

     

    Today I saw at around 22:30 all scenes are running?

    Any idea?

    Who checks Supervisor?

    //Sjakie

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 9 hours ago, Sjakie said:

    Hello Jan,

    Supervisor stopped checking due to

    Please login or register to see this link.

     

    Today I saw at around 22:30 all scenes are running?

    Any idea?

    Who checks Supervisor?

    //Sjakie

    This was a new one. Seems to be something from within the Lua framework. Very difficult to speculate what it can be. 

    Anyway, it dies at 06:47:40 and from that on it will not receive events anymore and drop them.

    Just restart the scene and keep an eye on it if it happens often. Unfortunately there is no Supervisor for the Supervisor...

    Share this post


    Link to post
    Share on other sites

    Good morning Jan,

    Previous screenshot was version 4.59

    Due to problems with my bath room and toilet lights I decided to revert back to 4.58. The delay of switch on was around 4 sec.

    Mem 15-25% Ram 16% (remark 4 Gb Mem)

    It did not make any difference, HUE sometimes show if scene starts after modification error >>>handshake error >>modify again>>>starts without any error. This happens with more than one HUE scene. (Scenes with HUE are 5-9-12-13-14-18

    Supervisor stopped again, shows dead devices??? those scenes are still running.

    I have no clue what is happend or hapenning System was running smooth. 

         

    Please login or register to see this image.

    /monthly_2020_06/image.png.6274b1e5d62872dad52173bf42545f14.png" />

     

    scene 15 shows

    image.png.eddcd0d56490381e8c9d3c2831ab37bf.png

     

    scene 9,6,18,4 debug is the day after

    25 shows also the announcements

    Please advice,

    //Sjakie

     

     

     

    Share this post


    Link to post
    Share on other sites

    Hi jgab

    the rules used in er3

    There is an error when applied to er4

    My rules

     

     

     

    Util.map(Util.defTriggerVar,{'_roomManual'})
    rule("of.OfficeLight:manual==0 => _roomManual=1; log('Manual lights in room')")
    rule("of.OfficeMotion:breached & of.OfficeLight:isOff & _roomManual==0 => of.OfficeLight:on; log('Light On')")
    rule("trueFor(00:10,of.OfficeMotion:safe) & of.OfficeLight:isOn & _roomManual==0 => of.OfficeLight:off; log('Light Off')")
    - reset manual lights after xx minutes (40 minutes), again automatic light in room
    rule("trueFor(00:40,_roomManual>0) => _roomManual=0; log('Reset _roomManual')")
    - reset variable _roomManual after start
    rule("wait(+/00:00:01); log('Reset after start-Manual');_roomManual=0")

     

     

     


    under
    Debug

    [2020-06-12] [18:13:55] [ERROR] [QUICKAPP740]: in'Rule:87[of.OfficeLight:manual==0 => _roomManual=1; log('Manual lights in room')]': {"msg":"Error executing instruction:'["%prop",1,"manual"]'","src":"Rule:87[of.OfficeLight :manual==0 => _roomManual=1; log('Manual lights in room')]","err":"./quickApp.lua:2677: attempt to call a nil value (field'lastManual')", "ERR":true}

    Share this post


    Link to post
    Share on other sites

    Good morning Jan,

    What is the proper notation for:

    cd=osdate('%m/%d') for 08:00  cd=ostime('h/%s')  doest work.

    Thanks

    //Sjakie

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • On 6/12/2020 at 11:19 AM, minsad79 said:

    Hi jgab

    the rules used in er3

    There is an error when applied to er4

    My rules

     

     

     

    Util.map(Util.defTriggerVar,{'_roomManual'})
    rule("of.OfficeLight:manual==0 => _roomManual=1; log('Manual lights in room')")
    rule("of.OfficeMotion:breached & of.OfficeLight:isOff & _roomManual==0 => of.OfficeLight:on; log('Light On')")
    rule("trueFor(00:10,of.OfficeMotion:safe) & of.OfficeLight:isOn & _roomManual==0 => of.OfficeLight:off; log('Light Off')")
    - reset manual lights after xx minutes (40 minutes), again automatic light in room
    rule("trueFor(00:40,_roomManual>0) => _roomManual=0; log('Reset _roomManual')")
    - reset variable _roomManual after start
    rule("wait(+/00:00:01); log('Reset after start-Manual');_roomManual=0")

     

     

     


    under
    Debug

    [2020-06-12] [18:13:55] [ERROR] [QUICKAPP740]: in'Rule:87[of.OfficeLight:manual==0 => _roomManual=1; log('Manual lights in room')]': {"msg":"Error executing instruction:'["%prop",1,"manual"]'","src":"Rule:87[of.OfficeLight :manual==0 => _roomManual=1; log('Manual lights in room')]","err":"./quickApp.lua:2677: attempt to call a nil value (field'lastManual')", "ERR":true}

     

    Hi, short answer. 'manual' is not supported in ER4 yet. It's on my todo list.

    6 hours ago, Sjakie said:

    Good morning Jan,

    What is the proper notation for:

    cd=osdate('%m/%d') for 08:00  cd=ostime('h/%s')  doest work.

    Thanks

    //Sjakie

    Rule.eval("cd = os.date('%H:%M')")

    Please login or register to see this code.

     

    Share this post


    Link to post
    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...