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

@jgab

 

I think there is incorrect working of :manual

 

Please login or register to see this code.

 

Posted

Hello Jan,

What I am, doing wrong?

This is the rule

    Rule.eval([[(bijkeuken.rookmeldertemp:value - keuken.temperatuur:value) > 3 =>
           bijkeuken.afzuigventilator:on;
        log('TRIGGER:%s',tjson(env.event)); log('Afzuigventilator op delta t - aan')
            ]])

trigger  in header:

489 value

811 value

Please advice.//Sjkaie

 

Please login or register to see this image.

/monthly_2019_12/image.png.04cc53040152cd937bfd081e31ff22c3.png" />

 

sorry forgot to state fan does not start

Posted

anyone doing a post (remote) to an ER from a none ER scene? 

Posted

My guess is it will not work.

but whi am I

Happy new year

Posted

To all ER users and the of course also to the father of ER:

the best wishes a good health and happiness !

may it become a prosper year for our home automation

Posted

@jgab suddenly i get node-red error in ER

 

Please login or register to see this spoiler.

 

  • Topic Author
  • Posted
    On 12/31/2019 at 12:18 AM, petrkl12 said:

    @jgab

     

    I think there is incorrect working of :manual

     

    Please login or register to see this code.

     

    So, the code for detecting manual is measuring the time between the script changing a device (RoomLight:on) and the trigger coming back to the script. If it's more than 1s it assumes it's a manual operation that generated the trigger.

    The code is around line 530 and looks like this

    Please login or register to see this code.

    You could change to "os.time()-lastID[id].time>2" and see if it improves.

     

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

    @jgab suddenly i get node-red error in ER

     

    Please login or register to see this spoiler.

    It looks very strange. You get "NR9c79c68" back at 09:39:54 but the event handler times out at 09:39:57 complaining it didn't get "NR9c79c68" back...

    Can you post the rules that send and receive the data from Nodered?

    Do you get it on the HC2 emulator too?

    Could you add debug statement to this code (around line ~2340 in ER) and see what you get?

    Please login or register to see this code.

     

    Posted
    1 minute ago, jgab said:

    It looks very strange. You get "NR9c79c68" back at 09:39:54 but the event handler times out at 09:39:57 complaining it didn't get "NR9c79c68" back...

    Can you post the rules that send and receive the data from Nodered?

    Do you get it on the HC2 emulator too?

    Could you add debug statement to this code (around line ~2340 in ER) and see what you get?

    Please login or register to see this code.

     

    Think i found why now.

    Please login or register to see this code.

    I want to have only "data" but when i add that to "lastSonosStatus" like this "lastSonosStatus.data" i get the error

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

    Think i found why now.

    Please login or register to see this code.

    I want to have only "data" but when i add that to "lastSonosStatus" like this "lastSonosStatus.data" i get the error

     

    Ah, it's the rule that crashes.

    Please login or register to see this code.

    You have to figure out what to do when you have set lastSonosStatus to nil in the rule (I added a check that it's not nil before comparing, I guess you set lastSonosStatus in some other rule?)

  • Topic Author
  • Posted
    On 12/31/2019 at 3:25 PM, jompa68 said:

    anyone doing a post (remote) to an ER from a none ER scene? 

    Please login or register to see this code.

     

    Posted
    10 minutes ago, jgab said:

    You have to figure out what to do when you have set lastSonosStatus to nil in the rule (I added a check that it's not nil before comparing, I guess you set lastSonosStatus in some other rule?)

    Thanks @jgab all working ok now. 
    lastSonosStatus i set in another rule, with different message i sent to my Sonos player.

    4 minutes ago, jgab said:

    Please login or register to see this code.

     

    Great, thanks again.

  • Topic Author
  • Posted
    On 12/31/2019 at 2:57 PM, Sjakie said:

    Hello Jan,

    What I am, doing wrong?

    This is the rule

        Rule.eval([[(bijkeuken.rookmeldertemp:value - keuken.temperatuur:value) > 3 =>
               bijkeuken.afzuigventilator:on;
            log('TRIGGER:%s',tjson(env.event)); log('Afzuigventilator op delta t - aan')
                ]])

    trigger  in header:

    489 value

    811 value

    Please advice.//Sjkaie

     

    Please login or register to see this link.

     

    sorry forgot to state fan does not start

    So, it's "(bijkeuken.rookmeldertemp:value - keuken.temperatuur:value) > 3" that doesn't trigger?

    Is bijkeuken.rookmeldertemp:value always larger? or is it the absolute/unsigned value you need to test?

  • Topic Author
  • Posted
    On 12/29/2019 at 6:39 PM, domin12 said:

    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

     

    Well, Nodered handling has changed and now uses Nodered.post to send messages (and the Nodered flow has changed too)

    See 

     

     

     

    Posted

    Hello Jan,

     

    Please login or register to see this attachment.

    Depends;

    Summer I guess it will be lower I did not track that because no adequate devices present

    The other 3 seasons it will be always the highest value

    //Sjakie

    Posted
    4 hours ago, jgab said:

    So, the code for detecting manual is measuring the time between the script changing a device (RoomLight:on) and the trigger coming back to the script. If it's more than 1s it assumes it's a manual operation that generated the trigger.

    The code is around line 530 and looks like this

    Please login or register to see this code.

    You could change to "os.time()-lastID[id].time>2" and see if it improves.

     

    It doesn't help :( Could you try my code in your enviroment? 

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    37 minutes ago, petrkl12 said:

    It doesn't help :( Could you try my code in your enviroment? 

    Please login or register to see this code.

     

    Ok, found a bug...

    Pushed "3.0","B85" that should fix it.

    trackManual/lastManual needs to make sure that id is a number.

    Please login or register to see this code.

     

    Posted

    thanks, but there has to be some other bug. I have added some tracking points to your code:

    Please login or register to see this code.

    here is result - without press any button only trigged by sensor in room:

     

    Please login or register to see this code.

    result is Manual switch on/off of light but it was triggered by sensor based on rule "RoomSensor:breached & RoomLight:isOff => RoomLight:on"

  • Topic Author
  • Posted
    9 minutes ago, petrkl12 said:

    thanks, but there has to be some other bug. I have added some tracking points to your code:

    Please login or register to see this code.

    here is result - without press any button only trigged by sensor in room:

     

    Please login or register to see this code.

    result is Manual switch on/off of light but it was triggered by sensor based on rule "RoomSensor:breached & RoomLight:isOff => RoomLight:on"

     

    So, RoomLight:on sets lastID[322]={script=true,time=1577983180}

    The RoomLight:on also generates a fibaro trigger that calls trackManual.

    When we enter trackManual the time is 1577983185, 5s later...?

    Do you have that kind of delays?

     

    If we knew that we would get the trigger back (e.g. it was declared in the header) we could wait longer and assume it is from the script...

    Try this, if it works for you then I will add it to next version.

    Please login or register to see this code.

     

    Posted

    got trouble to connect to NR from ZBS

    Please login or register to see this code.

    Please login or register to see this spoiler.

    I have checked everything but cannot find out what is causing that, @jgab you have a clue?

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