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

Good catch @jwi!!

 

I had not noticed that it had upgraded.....

 

 

  • Topic Author
  • Posted
    1 hour ago, JcBorgs said:

    All went good and then suddenly BIG problem......

     

    All rules that are triggered by a sensor work just fine, as an example:

      rule("door:isOpen => Light1:on")

     

    But all rules that should be triggered by a certain time or sunset/sunrise have just stoped to work, as an example:

     rule("@20:15 => Light2:off")

     

    Nothing happens and nothing is logged

     

    Have tried with removing the EV4 (including the Global Variable it creates) rebooted the HC3 and then reinstall EV4 again, but no change.

    Version of EV4 is: EventRunner4 v0.5fix47

     

    Did create a simple Block scene that does the same as the rule with Light2 above and that worked just fine.

     

    Sorry, the epoch fix earlier today caused an unintentional side-effect..

    I have pushed fix48 that has corrected it.

    Posted
    2 minutes ago, jgab said:

    Sorry, the epoch fix earlier today caused an unintentional side-effect..

    I have pushed fix48 that has corrected it.

    Thank you @jgab,I knew that you would fix it very quickly.

    Posted

    Goodmorning Jan,

    Time rules are not running? Rule.eval([[@09:10

    Summertime did not restart HC3 still on "old" time

    fix 47 does not want to go to 48

    //Sjakie

  • Topic Author
  • Posted
    5 minutes ago, Sjakie said:

    Goodmorning Jan,

    Time rules are not running? Rule.eval([[@09:10

    Summertime did not restart HC3 still on "old" time

    fix 47 does not want to go to 48

    //Sjakie

    Ok, did your HC3 box update it's time to summertime?

    fix47 upgrades to 48 without problem  on my system. Do you get any kind of error message in log?

    11 minutes ago, Sjakie said:

    Time rules are not running? Rule.eval([[@09:10

    Summertime did not restart HC3 still on "old" time

    Did you add the below code in your ER4 main?

    Please login or register to see this code.

     

    Posted

    Jan,

    No summertime and no error in debug.

    If change update rule present time +01 min no update at all

    //Sjakie

  • Topic Author
  • Posted

    But in fix47 the @time was broken so you can't do @now+1 in v47.

    Run it direct

    Please login or register to see this code.

    and then change back
    12 hours ago, JcBorgs said:

    Good catch @jwi!!

     

    I had not noticed that it had upgraded.....

     

     

    I will try to come up with a beta version schema...

    Posted

    Jan all okay now after reboot fix 48 active now

    Please see if its possible that if ER is updated >>>ER sends email to admin >>>updated to fix ..

    Thanks in advance

    //Sjakie

    Posted
    13 hours ago, jgab said:

     

    Sorry, the epoch fix earlier today caused an unintentional side-effect..

    I have pushed fix48 that has corrected it.

    Quick and good update, everything are working again!

     

    Thanks for the quick fix!

     

    And it proved to have a good fall-back was an good option. :-)

    • Like 1
    Posted

    @jgab

    how to change this for HC3 and ER4?

     

    Please login or register to see this attachment.

  • Topic Author
  • Posted (edited)

    Please login or register to see this attachment.

     

    This is the flow I use for ER4

    Please login or register to see this spoiler.

     

    The "async handler" incoming flow is default. The "sync handler" is something I have been experimenting with but is not using at the moment.

     

    By default it just echoes

    Please login or register to see this code.

     

    If you send to NR the IP address is included so it knows where to return the value (emulator or HC3)

    If you call the HC3/emulator from NR you need to set the address (See node "set address")

     

    The work is done in the "Echo1 Async" and "Echo2 Async" nodes in the example - they just echo the message - but one could do any Nodered stuff and then return the value as a json {"type":"<event>", ...} and it will be posted as an event to ER

    Edited by jgab
    • Thanks 1
    Posted

    Hello. jgab

     

    On 3/27/2021 at 9:44 PM, jgab said:

    No, I think someone tried to do something in Korean.

    It would be nice if Fibaro supported wikis - forum thread is not good for documentation.

    If someone wants to maintain a wiki somewhere for EventRunner I'm happy to contribute.

     

    That Korean is me.

     

    I am organizing myself using the Notion application.

     

    Have you ever used the 'Notion' program(

    Please login or register to see this link.

    )? It is similar to 'Evernote' and is good in management.

     

    I apologize if you are not in a good mood by organizing'ER' without consent.

     

    Please login or register to see this link.

  • Topic Author
  • Posted
    4 minutes ago, Earybeongbeong7 said:

     

    I apologize if you are not in a good mood by organizing'ER' without consent.

    No problem! ?

    Posted

    Hi jGab.

     

    1. Change the file(fibaroapiHC3 v0.199) and update it with ZBS to keep creating new devices.(The existing devices ID is 499)

     

    Please login or register to see this code.

     

    The existing rule creation file is as follows.

     

    Please login or register to see this code.

     

    In the previous file(fibaroapiHC3 v 0.158), it was updated without creating any new devices.

     

     

    2. 

    Is the toolbox file required for the  ER4 as follows?

     

    If you execute the download source command(DOWNLOADSOURCE()), only the following files are received.

     

    Do I just need this file?

     

    Please login or register to see this code.

     

     

     

  • Topic Author
  • Posted

     

    8 hours ago, Earybeongbeong7 said:

    1. Change the file(fibaroapiHC3 v0.199) and update it with ZBS to keep creating new devices.(The existing devices ID is 499)

    In the previous file(fibaroapiHC3 v 0.158), it was updated without creating any new devices.

     

    It may create a new device depending on what changes you have done. I will look into it if I'm too strict now.

     

    8 hours ago, Earybeongbeong7 said:

     

    2. 

    Is the toolbox file required for the  ER4 as follows?

     

    You may need mqtt and web socket too.

    I'm in the process to update the ZBS plugin to work better with the emulator. 

     

    I have pushed a new version of EventRunner4.lua (the "main") that is more compatible with the emulator (uses the --FILE: inclusion directive)

     

    Posted (edited)


    Hi, ER4 is using it well.

    After applying this update,

    An error appears in the log.

    Can I get a solution?

     

    [ERROR] [QUICKAPP988]: QuickApp crashed

     

    [ERROR] [QUICKAPP988]: ./quickApp.lua:246: module 'include.Toolbox_childs' not found:

    Edited by jeongddeng
  • Topic Author
  • Posted

    I believe it's called Toolbox_child.lua

    No "s" at the end. 

    Look how the include statement looks in your EventRunner4.lua file. It should look like

    --FILE:Toolbox/Toolbox_child.lua,Toolbox_child;

    Posted

    jgab

    New hc3api emulator error

    Using multiple er4

    I get an error every time in a new emulator

     

     

     

    [31.03.2021] [23:27:39] |[35mSYS  [0m|: HC3 SDK v0.200
    [31.03.2021] [23:27:39] |[35mSYS  [0m|: Created Event server at 79.10.79.3:6872
    [31.03.2021] [23:27:39] |[35mSYS  [0m|: Created Terminal server at 79.10.79.3:6972
    [31.03.2021] [23:27:39] |[34mLOG  [0m|: Polling HC3 for triggers every 1000ms
    fibaroapiHC3.lua:4252: [string "if dofile and not hc3_emulator then
    ..."]:58: attempt to index a nil value (global '_debugFlags') (coroutine: thread: 0x7fdcb1a3b158, socket: tcp{client}: 0x7fdcb381d228)
    stack traceback:
        [C]: in function 'error'
        fibaroapiHC3.lua:4252: in field 'loadQA'
        fibaroapiHC3.lua:8588: in upvalue 'startEmulator'
        fibaroapiHC3.lua:8612: in upvalue 'f'
        fibaroapiHC3.lua:3439: in method 'callback'
        fibaroapiHC3.lua:2570: in function <fibaroapiHC3.lua:2566>
        (...tail calls...)
     

  • Topic Author
  • Posted
    4 minutes ago, minsad79 said:

    jgab

    New hc3api emulator error

    Using multiple er4

    I get an error every time in a new emulator

     

     

     

    [31.03.2021] [23:27:39] |[35mSYS  [0m|: HC3 SDK v0.200
    [31.03.2021] [23:27:39] |[35mSYS  [0m|: Created Event server at 79.10.79.3:6872
    [31.03.2021] [23:27:39] |[35mSYS  [0m|: Created Terminal server at 79.10.79.3:6972
    [31.03.2021] [23:27:39] |[34mLOG  [0m|: Polling HC3 for triggers every 1000ms
    fibaroapiHC3.lua:4252: [string "if dofile and not hc3_emulator then
    ..."]:58: attempt to index a nil value (global '_debugFlags') (coroutine: thread: 0x7fdcb1a3b158, socket: tcp{client}: 0x7fdcb381d228)
    stack traceback:
        [C]: in function 'error'
        fibaroapiHC3.lua:4252: in field 'loadQA'
        fibaroapiHC3.lua:8588: in upvalue 'startEmulator'
        fibaroapiHC3.lua:8612: in upvalue 'f'
        fibaroapiHC3.lua:3439: in method 'callback'
        fibaroapiHC3.lua:2570: in function <fibaroapiHC3.lua:2566>
        (...tail calls...)
     

    How are you starting the emulator?

    Can you PM me the file(s) you are using so I can try to replicate it?

    (Have you added/removed lines from the emulator? Line 4252 doesn't make sense for the type of error)

    Posted (edited)
    6 분 전 jgab는 다음과 같이 말했습니다.

    에뮬레이터를 어떻게 시작하고 있습니까?

    복제를 시도 할 수 있도록 사용중인 파일의 PM을 알려주시겠습니까?

    (에뮬레이터에서 줄을 추가 / 제거 했습니까? 줄 4252는 오류 유형에 맞지 않습니다.)

     

    jgab

    에뮬레이터 시작

     

     

     

    dofile이고 hc3_emulator가 아닌 경우 hc3_emulator
      = {
        credentials = {ip = "12.10.79.127", user = "minsad", pwd = "123456"},
        name = "ER4_simulator",
        type = "com.fibaro.genericDevice",
        --startTime = "10:00:00 5/12/2020",
        --speed = 48,
        id = 1563,
        --deploy = true,
        --proxy = true,
        --offline = true,
        debug = {trigger = false },
        UI = {
          {label = 'ERname', text = "..."},
          {button = 'debugTriggers', text = 'Triggers : ON'},
          {button = 'debugPost', text = 'Post : ON '},
          {button ='debugRules ', text ='Rules : ON '},
          {{button = 'Update', text = 'Update'}, {button = 'restart', text = 'restart'}}
        }
      }
      
        --dofile ( "fibaroapiHC3_classic.lua")
       dofile ( "fibaroapiHC3.lua")
       
       
       --FILE : EventRunner4Engine.lua, EventRunner;
    --FILE : Toolbox / Toolbox_basic.lua, Toolbox;
    --FILE : Toolbox / Toolbox_events.lua, Toolbox_events;
    --FILE : Toolbox / Toolbox_child.lua, Toolbox_child;
    --FILE : Toolbox / Toolbox_triggers.lua, Toolbox_triggers;
    --FILE : Toolbox / Toolbox_files.lua, Toolbox_files;
    --FILE : Toolbox / Toolbox_rpc.lua, Toolbox_rpc;
    --FILE : Toolbox / Toolbox_pubsub.lua, Toolbox_pubsub;
    --FILE : EventRunnerDoc.lua, EventRunnerDoc;
    --FILE : Toolbox / Toolbox_profiler.lua, Toolbox_profiler;
         
     끝
     
     
    -[[
    hc3_emulator.backup {
      type = "*",
      dir = "E : / DS_Drive / EventRunner / HC3 / Backup (HC3)",
      namer = function (struct, name)
       local type = hc3_emulator.file.isType (struct)-QA에 대해 "QA"를 반환하고 다음을 위해 "Scene"을 반환합니다. 장면
        이름 = name..os.date ( "% c", struct.modified 또는 struct.updated)
        name = ""..struct.id .. "_".. name : gsub ( "[^ % w]" , "_")
        반환 유형, 이름
      끝,
    }
    -]]

    ----------- 코드 -------------------------------------- ---------------------

    _debugFlags.trigger = false -- log incoming triggers
    _debugFlags.fcall=false     -- log fibaro.call
    _debugFlags.post = false    -- log internal posts
    _debugFlags.rule=false      -- log rules being invoked (true or false)
    _debugFlags.ruleTrue=true  -- log only rules that are true
    _debugFlags.pubsub=true    -- log only rules that are true
    ------------- Put your rules inside QuickApp:main() -------------------

    function QuickApp : main ()-EventScript 버전
      로컬 규칙 = function (...) return self : evalScript (...)
      end- 이전 규칙 함수 self._UNHANDLED_EVENTS = true
      self : enableTriggerType ({ "device", "global -variable ","custom-event ","profile ","alarm ","location "})-원하는 이벤트 유형
     

    Edited by minsad79

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