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

  • Topic Author
  • 7 minutes ago, Sjakie said:

     

    Please login or register to see this link.

    Please login or register to see this attachment.

     

    Rule.eval("log('%s',tostring(woonkamer.raam:armed))")

    Please login or register to see this attachment.

     

    Ok, it seems like it is the "hoofdslaapkamer.bbeveiliging:isOn" or "woonkamer.raam:breached" that is the issue. (:breached is a synonym for :isOn)

    and the problem seems to be that either hoofdslaapkamer.bbeveiliging or woonkamer.raam:breached is nil.

     

    Sorry the test should be Rule.eval("log('%s',woonkamer.raam:armed | 'no value')") 

    To see their values try:

    Rule.eval("log('%s',woonkamer.raam:armed | 'no value')") 

    Rule.eval("log('%s',woonkamer.raam | 'no value')") 

    Rule.eval("log('%s',hoofdslaapkamer.bbeveiliging | 'no value')") 

     

    However, it can be that for some reason the variables are reset later in the script. You could add log statements to your existing rule to get the values when the rule executes

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Please login or register to see this attachment.

    hoofdslaapkamer.bbeveiliging   >>>> set house armed/disarmed

    Link to comment
    Share on other sites

  • Topic Author
  • 6 minutes ago, Sjakie said:

    Please login or register to see this attachment.

    hoofdslaapkamer.bbeveiliging   >>>> set house armed/disarmed

    Sorry, log commands ended wrong - should have ; and not ")

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

    Jan I am verry sorry,

     I checked the woonkamer.raam it is gone!!!! Only the temp device is present.

    That has something to do with device not configured???

    Wierd I did do nothing the only job to do was test arm switch of when I awake in the morning>> was going wrong.

    I implemented your proposal cancel Alarmref on a wrong way.

    Let me add the window again.

    Same sort of thing happens also with the front door.

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 2 minutes ago, Sjakie said:

    Jan I am verry sorry,

     I checked the woonkamer.raam it is gone!!!! Only the temp device is present.

    That has something to do with device not configured???

    Wierd I did do nothing the only job to do was test arm switch of when I awake in the morning>> was going wrong.

    I implemented your proposal cancel Alarmref on a wrong way.

    Let me add the window again.

    Same sort of thing happens also with the front door.

     

     

     

    Is it the actual device that is gone? If it's just the hometable value then it can happen if you accidentally write "woonkamer.raam=..." (an assignment) when you should have written a test "woonkamer.raam==...".  The former overwrites the woonkamer.raam value.

     

    Link to comment
    Share on other sites

    The window is closed

    My motion sensors are dead I have no clue what is going on now

    House is not in arm scene

    Please login or register to see this attachment.

    The device is gone! Only temp is still present>>> removed device and added

    Let me restart HC2

    Link to comment
    Share on other sites

    HC2 is restrated

    It does not make any difference if window is open or closed>>>same error in debug

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, Sjakie said:

    HC2 is restrated

    It does not make any difference if window is open or closed>>>same error in debug

    Please login or register to see this attachment.

    There was an error in the log statement that I corrected in 

     

    Link to comment
    Share on other sites

    okay corrected.

    No error in debug so far so good but its now going strait in alarm.

    There are people in the house so if I start arm now it arms at once instead of waiting 40m sec, now I am confused.

    Is just by adding your rule if I take it out it is as usual 40 sec delay.

    Please login or register to see this attachment.

    sorry screen shot should not be there

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, Sjakie said:

    okay corrected.

    No error in debug so far so good but its now going strait in alarm.

    There are people in the house so if I start arm now it arms at once instead of waiting 40m sec, now I am confused.

    Is just by adding your rule if I take it out it is as usual 40 sec delay.

     

    sorry screen shot should not be there

     

     

    Sorry, my stupidity. Didn't realise that we were writing the log commands in the left-hand side of the rule. It should be like this (change ; to &)

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    np Jan it proves you are still human!!!

    As you can see it get the signal to arm10:50:40

    the log comes on wrong time (the device is still safe)

    10:51:21 starts to arm log should come?

    Let me send my scene in pm so you will see how it is build

    Thanks for your support

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • 3 hours ago, Sjakie said:

    np Jan it proves you are still human!!!

    As you can see it get the signal to arm10:50:40

    the log comes on wrong time (the device is still safe)

    10:51:21 starts to arm log should come?

    Let me send my scene in pm so you will see how it is build

    Thanks for your support

     

    It is probably correct. The post(#bewakenHuis,+/00:00:40) will post after 40s, but the next command will execute immediately. Therefore you see the log "start bewaken huis"  directly. However the event is posted at 10:51:21 the [{"type":"bewakenHuis"}]>>...

     

    A more correct log message would be:

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Hi Jan,

    With this rule it willl waith to arm the 40 sec

    rule("hoofdslaapkamer.bbeveiliging:isOn => cancel(alarmRef); alarmRef=post(#bewakenHuis,+/00:00:40); log('start bewaken huis in 40s')")

    Followed by devices separate and in case a door is open it will give no alarm

     Rule.eval("#bewakenHuis & woonkamer.raam:safe => woonkamer.raam:armed=1")XXXXXXX

    If I use your advice it will arm directly and it will go into alarmstate if a door is open.

    XXXXX here I want a log logging if the device state is armed or not. Is this possible?

    Please advice with an example.

    Please login or register to see this code.

    Link to comment
    Share on other sites

    Hello Jan,

    Sorry to bother but I cant solve this error:

    Please login or register to see this attachment.

     

    What did I do, I moved 2 Hue spots and renamed them according the section where they are placed.

    The HUE app is modified.

    I modified HT and two scenes where they are used. Those 3 scenes I checked also in notepad with search and find.

    What I do overlook?

    Please advice

    Link to comment
    Share on other sites

  • Topic Author
  • 7 minutes ago, Sjakie said:

    Hello Jan,

    Sorry to bother but I cant solve this error:

    Please login or register to see this attachment.

     

    What did I do, I moved 2 Hue spots and renamed them according the section where they are placed.

    The HUE app is modified.

    I modified HT and two scenes where they are used. Those 3 scenes I checked also in notepad with search and find.

    What I do overlook?

    Please advice

    ER can't find the name 'spotres2' in your Hue hub.

    Do you have more than one Hue hub?

     

    Try to do Hue.dump(), it will list all the names it can find in the Hue hub.

    Edited by jgab
    Link to comment
    Share on other sites

    Jan a restart of HC2 solved the error. Something hangs it happens more.

     

    The HUE dump was already on

    Thanks for the advice

    Link to comment
    Share on other sites

    @jgab may be it's the heat giving me headache but my scene for blinds does not receive answer from NodeRed anymore. Now I have tested this 

     

      rule("remote(_myNodeRed,#echo{data='test'})")
      rule("#response{data='$d'} => log('Got back:%s',d.data)")
      rule([[remote(_myNodeRed,#wetter{})]])
      rule([[#wetter => moln=env.event.data.clouds;  log('moln= %s',moln)]])

     

    Works ok in ZBS but when running on HC2 there is nothing:

     

    [DEBUG] 16:26:20: NodeRed - EventRunner v2.0 B65
    [DEBUG] 16:26:20: Fibaro software version: 4.550
    [DEBUG] 16:26:20: HC2 uptime: 52 hours
    [DEBUG] 16:26:20: Sunrise 04:54, Sunset 21:36
    [DEBUG] 16:26:20: Hue system inited (experimental)
    [DEBUG] 16:26:20:
    [DEBUG] 16:26:20: Loading rules
    [DEBUG] 16:26:20: Rule:1:#response{data='$d'} => log('Got back:%s',d.data)
    [DEBUG] 16:26:20: Rule:2:#wetter => moln=env.event.data.clouds; log('moln= %s',moln)
    [DEBUG] 16:26:20:
    [DEBUG] 16:26:20: Scene running

     

    Node Red debug shows:

     

    2019-07-25 16:26:21node: Outgoing payloadecho : msg.payload : Object
    object
    args: array[2]
    0: "%7B%22type%22:%22response%22,%22data%22:%7B%22data%22:%22test%22,%22type%22:%22echo%22,%22_from%22:397%7D%7D"
    1: "%%ER%%"
    2019-07-25 16:26:22node: Outgoing eventecho : msg.payload : Object
    object
    type: "response"
    data: object
    data: "test"
    type: "echo"
    _from: 397
    2019-07-25 16:26:23node: Incoming event1echo : msg.payload : Object
    { data: "test", type: "echo", _from: 397 }
    2019-07-25 16:26:24node: Incoming event1wetter : msg.payload : Object
    { type: "wetter", _from: 397 }

     

    Could it be Fibaros new software 4.550?

     

    Link to comment
    Share on other sites

    Did also have strange error on one of my ER scene. 4 rules that did work before update to 4.550. An restart of HC2 did not solve it, after that i did stop and start scene and all rules did work again without any errors.

     

    Link to comment
    Share on other sites

    @jompa68  I did restart the HC2 twice and the scene is a test scene only to check if NR sends back something. I deleted this testscene and copied it again from ZBS. Same result. Now 29 degrees C in Falkenberg, 21:13!

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