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
  • Posted
    1 hour ago, jompa68 said:

     

    @jgab my OWM scene stops for some reason and i dont now why. Can i use ER to check if it is running and if not restart the scene?

     

    If it should always be running you could check if countScenes for the scene is 0 and then restart it.

    This ER rule checks every min.

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    2 minutes ago, jgab said:

     

    If it should always be running you could check if countScenes for the scene is 0 and then restart it.

    This ER rule checks every min.

    Please login or register to see this code.

     


    This version retries max 3 times and then stop trying to restart the scene,

    Please login or register to see this code.

     

    • Thanks 1
    Posted

    Good morning Jan,

    I notice that I have two? problems with my arming scene.

    Disarm when coming home he dont? disarm motion sensor because they trigger alarm (sometimes)

    Arming he dont arm what supposed to be armed. If I may believe the old Fibaro app.

    If I test I cant see anything what is wrong.

    For that case I add a few debug lines to find out what is happening.

    To trigger the problem? in real operating I would like to get some info by telegram but that I do wrong.

    This I use:

    => for id,_ in pairs(bewakenHuisSensors) do Telegram.msg(TID,'%s = %s, %s',idname(id),id:armed & 'armed' | 'disarmed',id:safe & 'safe' | 'breached')end;

    This is the reult:

    Please login or register to see this image.

    /monthly_2019_12/image.png.9510cc5a95c409d72bcc900346ed27fd.png" />

     

    Please advice

    //Sjakie

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

    Good morning Jan,

    I notice that I have two? problems with my arming scene.

    Disarm when coming home he dont? disarm motion sensor because they trigger alarm (sometimes)

    Arming he dont arm what supposed to be armed. If I may believe the old Fibaro app.

    If I test I cant see anything what is wrong.

    For that case I add a few debug lines to find out what is happening.

    To trigger the problem? in real operating I would like to get some info by telegram but that I do wrong.

    This I use:

    => for id,_ in pairs(bewakenHuisSensors) do Telegram.msg(TID,'%s = %s, %s',idname(id),id:armed & 'armed' | 'disarmed',id:safe & 'safe' | 'breached')end;

    This is the reult:

    Please login or register to see this link.

     

    Please advice

    //Sjakie

     

    Please login or register to see this code.

    You have to apply fmt(<format string>,<args>...) to the string argument to Telegram.msg. (the third argument is a Telegram keyboard for interactive messages - like I used in the HomeBot example)

    Posted

    Hello Jan,

    Thanks will implement after finished with shopping.

    May I request your experience for the next?

    We have air heating in the house so the  rule I foound on the forum to calculate humidity and temperature will not work as it should.

    When a house is air heated the humidity in the house is always lower as outside.

    The rule I have for the bath room doest work properly either.

    What I wish is:

    I have a post with :

    #bathroomOn

    #bathroomOff

    device:

    bathroom.humidity

    zolder.turbo

    bathroom.door

     

    if bathroomOn >>take value of- humidity sensor - start timer

    than if bathroomOff - bathroomOn <5 min => stop timer (delete value humidity)

    than if bathroomOff - bathroomOn > 5 min=> take value of- humidity sensor - stop timer

    if delta humidity > 5 =>  zolder.turbo:on

    if delta humidity < 5 =>  zolder turbo:off

    Thanks in advance,

    //Sjakie

    ps thanks to you and your service excellence our house becomes more and more automated.

     

    Posted

    Hello Jan,

    I have a scene, around 240 rules, when starts the scene the debug window show somewhere in the middle off the scene and doest show the start.

    The scene is split now and that issue is solved.

    Another strange? thing happen

    The scene "Bovenverdieping" is on automatic, debug window is empty for almost 3 minutes

     

    Supervisor shows scene is alive from the moment it was saved.

    Please login or register to see this image.

    /monthly_2019_12/image.png.3f1858570274a4de033afdb668a1c2e1.png" />

    What causes this delay?

    Please advice

    //Sjakie

    Posted (edited)

    @jgab if i remember right it was possible to setup a rule that ask NR for an value and get it back to ER? Have search in topic but cannot find any good example. Do you have any laying around?

     

    i answer myself ?

     

    Please login or register to see this code.

    I get an answer back from NR, now i need to find out how to take care of the answer.

    More progress

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2019_12/1534159956_Skrmavbild2019-12-21kl_17_51_51.png.1969b32d6e9666a21f769991de2dfd40.png" />

     

     

    Edited by jompa68
    Working rule
    Posted

    @jgab 

    depending of the result i want to use that in a rule. For example 

    if sonos playing and a message is transmitted, start play sonos again, else dont start sonos.

    possible?

  • Topic Author
  • Posted
    6 minutes ago, jompa68 said:

    @jgab 

    depending of the result i want to use that in a rule. For example 

    if sonos playing and a message is transmitted, start play sonos again, else dont start sonos.

    possible?

     

    Sonos always stop after you play a message?

     

    Do your own speak handler. Whenever you speak a message you first get the status of the Sonos and save it in a variable

    rule("#speak{data='$data'} => lastSonosStatus = Nodered.post(#sonosStatus{data='get_state'},true); Nodered.post(#speak{data=data})")

    The second argument, 'true', to NodeRed.post makes the call synchronous and you get the status returned (No need for a separate result handler)

     

    ...and then you at regular intervals check if it has stopped and was playing...

    I'm a bit unsure what values Nodered.post(#sonosStatus{data='get_state'} returns and how you start playing again, but it should look something like below.

     

    rule([[@@00:00:10 => local status = Nodered.post(#sonosStatus{data='get_state'},true);

        if lastSonosStatus == 'playing' & status == 'stopped' then  

            Nodered.post(#Sonos{command='play'});  

            lastSonosStatus = nil 

       end

    ]])

    • Thanks 1
    Posted

    Will this be a solution that will work?

    Please login or register to see this code.

     

    Posted
    1 hour ago, jompa68 said:

    Will this be a solution that will work?

    Seems to work, thank you @jgab and a merry christmas?

    Posted

    Hello Jan,

    I created a rule for my dryer.

        Rule.eval([[$Dryer== 'On' & $Heatsaison=='No' & (bijkeuken.rookmeldertemp:value > (keuken.temperatuur:value + 3)) =>
               bijkeuken.fan:on;
            log('TRIGGER:%s',tjson(env.event)); log('Fan delta t - On')
                ]])

    To have a better understanding what is happening how I can get the log from all triggers?

    For the GV I do:

    Rule.eval([[$Heatsaison=='No' => log2('orange','GV Heatsaison - No')]])

        Rule.eval([[$Heatsaison=='Yes' => log2('orange','GV Heatsaison - Yes')]])

    the others I dont know how.

    Please advice.

    //Sjakie

     

    Posted

    Sorry,

    Figured it out I had some errors and a wrong device number after reconfiguration.

    log('TRIGGER:%s',tjson(env.event)); log('properties for bijkeuken rookmeldertemp= %s',bijkeuken.rookmeldertemp:value+3)]])

    Happy holidays,

    //Sjakie

    Posted

    Good morning,

     

    Some feedback found the cause. The list of triggers is very long. One value contained only the number without value!

    Please login or register to see this attachment.

    Posted

    Hello Guys,

    I need some assistance my Alexa doest work anymore.

    This morning it worked I added one line in the scene Alexa.

    The Alexa scene suddenly contained  a lot off errors, mainly debug rules >>did not see that earlier>>all errors are solved  or removed >>>no result.

    Alexa scene is still having the same Scene number

    She says "device_ name is not responding" and in Node Red no message in Debug

    Pi is restarted and running if I click device X: on it gives in debug the command but nothing happens.

    Please push me in the right direction to solve this error

    Thanks in advance,

    //Sjakie

     

    Posted

    add:

    restored HC2  >>no luck

    NodeRed Old flow back >>no luck

    Posted

    New ip on rpi?

    Posted

    Hi Jompa,

    Thanks for answering.

    In Internet explorer my NodeRed is visible, so I should say no ip....89 as usual

    To be sure to give you an fact as answer I open my router to see whats listed.

    I see a second?? raspberry ip ...115

    This I dont understand

    I restarted Raspberry and Alexa is operational again.

    I still see the raspberry with ip ...115 with a different Mac adress.

     

    Thanks a lot!!!!

    //Sjakie

     

     

    Posted

    Hi all,

    Any of the ER users is having a Netatmo Presence cam? To share some rules to use?

    Thanks in advance,

    //Sjakie

     

    Posted (edited)

    Hi all, 

     

    Solved, changed 1 function and added the old one ..................

     

    just realized that my telegram stop working , anyone can help

    version (probably upgraded automatically):

    (local _version,_fix = "3.0","B83"  -- Nov 17, 2019 )?

     

    the error :

    [DEBUG] 18:30:38: Error in 'Rule:6[#telegram{msg='$msg'} =>cmd=msg.content; log('Telegram command:%s',cmd); ...]': /opt/fibaro/scenes/392.lua:298: sceneID is not a number to postRemote:http://192.168.1.10:1880/eventrunner 

     

    here is the function: 

     

    function telegram(ref,msg)
    local tmsg = Util.copy(ref)
    print (json.encode(tmsg))
    tmsg.content=msg
    Event.postRemote(_defaultNodeRed,{type='telegram',msg=tmsg})
    end
    Edited by domin12
    solved

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