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

That is not possible, it is default behavior of the HC2

Posted

Hi Jompa,

Thanks.

btw can you send email from ER scene?

Posted
1 hour ago, Sjakie said:

Hi Jompa,

Thanks.

btw can you send email from ER scene?

Dont think so, or @jgab?

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

    Dont think so, or @jgab?

     

    Yep,

    The header and body of the email is split at the first ':' in the message.

    Posted

    Good morning,

    What I am doing wrong?


                   Rule.eval("woonkamer.spotsjaak:isOn =>  log('woonkamer spotsjaak - aan')")
                        Rule.eval("woonkamer.spotsjaak:isOff =>  log('woonkamer spotsjaak - uit')")
        Does not post in debug

    Please advice

    //Sjakie

    Please login or register to see this image.

    /monthly_2019_09/image.png.6ad6be30982a28b61e180a70d748fa1a.png" />

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

    Good morning,

    What I am doing wrong?


                   Rule.eval("woonkamer.spotsjaak:isOn =>  log('woonkamer spotsjaak - aan')")
                        Rule.eval("woonkamer.spotsjaak:isOff =>  log('woonkamer spotsjaak - uit')")
        Does not post in debug

    Please advice

    //Sjakie

    Please login or register to see this link.

     

    Hi,

    events from Hue devices is a bit tricky. I used to have a filter that seems to have been accidentally set to nil in the code and thus didn't let through any events when a Hue value was changed from Lua code (Hue.monitor still works)

    I pushed a version with a fix (v3, B66) . It now emits events when a Hue device is turned on and off from Lua code. (so :isOn,  and :isOff should work).

    Having said that, I'm not happy how the code looks like and will think about a better way to do this.

    Thanks for calling my attention to this

    /J

     

    Posted

    Hello Jan,

    Thanks!!

    Service excellence!!!!

    All are hue lights:

    Please login or register to see this image.

    /monthly_2019_09/image.png.f62dd5ec4112842d8bed7941645f80d5.png" />

    Posted

    @jgab

    I need your help - how to transfer hue settings to latest version:

     

    I have:

    Please login or register to see this code.

    I tried:

    Please login or register to see this code.

    but there is error:

    Error loading rules:EventRunnerLights1.lua:3064: attempt to index local 'hub' (a nil value)

    in this:

    Please login or register to see this code.

     

     

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

    @jgab

    I need your help - how to transfer hue settings to latest version:

     

    I have:

    Please login or register to see this code.

    I tried:

    Please login or register to see this code.

    but there is error:

    Error loading rules:EventRunnerLights1.lua:3064: attempt to index local 'hub' (a nil value)

    in this:

    Please login or register to see this code.

     

     

     

    Hi, (I think you are the only one with multiple Hue hubs using ER, or?)

    Anyway, the the setup is right. However, the Hue.define has changed to only take 2 arguments; 'Hue name' and ID. 

    If you need to assign it to a ER variable you do

    Please login or register to see this code.

    Hue.define returns the ID (30001) that you use for Util.defvar...

     

    Posted

    still error - it looks that .connect is called too late ... (where is definition for more hue hubs)

  • Topic Author
  • Posted

    The definitions should be before main()

    Ex.

    Please login or register to see this code.

    (in the example I just define two hubs pointing to the same physical hub)¨

    Do you get any warnings?

    Posted

    Now it's OK. (I had typo in hueusername)

    Thanks

    Posted

    Hello Jan,

     

    Please login or register to see this image.

    /monthly_2019_09/image.png.7969a61ab8ba7e6993b919fd1f67433f.png" />

        Two errorrs:

    first error ist marked in red?

    second:

    Rule.eval([[once(oprit.luxsensor:lux < 50) & once(16:00..23:15,n/24:00) => post(#eveningMsg); log('TRIGGER:%s',tjson(env.event));
                  log('voortuin lux sensor post eveningmsg')
                         ]])
     gives parser error  ,

     

    if I remove  once(       and    ,n/24:00)    it will give the red message

    This rule I want but I cant fix it.

     

    Please advice

    //Sjakie

     

     

     

     

     

    Please login or register to see this attachment.

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

    Hello Jan,

     

    Please login or register to see this link.

        Two errorrs:

    first error ist marked in red?

    second:

    Rule.eval([[once(oprit.luxsensor:lux < 50) & once(16:00..23:15,n/24:00) => post(#eveningMsg); log('TRIGGER:%s',tjson(env.event));
                  log('voortuin lux sensor post eveningmsg')
                         ]])
     gives parser error  ,

     

    if I remove  once(       and    ,n/24:00)    it will give the red message

    This rule I want but I cant fix it.

     

    Please advice

    //Sjakie

     

     

     

     

     

    Please login or register to see this attachment.

     

    It's difficult to tell from the log. Can you PM me the scene and I will have a look at it /J

    Posted

    Hello Jan,

    May I come back on the HUE?

    In my Alexa scene it command to turn on/off

    in the debug I see as well the command and the confirmation  of woonkamer.spotsjaak, all is okay

    Please login or register to see this image.

    /monthly_2019_10/image.png.a3f0d304b3911377ecd8dd22473561ab.png" />

     

    In my livingroom scene I have also the command confirmation of woonkamer.spotsjaak:

    Rule.eval("woonkamer.spotsjaak:isOn =>  log('woonkamer spotsjaak - aan')")
                        Rule.eval("woonkamer.spotsjaak:isOff =>  log('woonkamer spotsjaak - uit')")

    Why It doest post the on/off woonkamer.spotsjaak  command by Alexa?

    image.png.cd64ce3ea733616b6290b7a3228d0e8c.png

     

    //Sjakie

  • Topic Author
  • Posted
    10 hours ago, jgab said:

     

    It's difficult to tell from the log. Can you PM me the scene and I will have a look at it /J

    Just looked at the code, you have a badly terminated [[]] string here

    Please login or register to see this code.

    that causes some issues, there may be more problems too but I have to check that this evening when I'm home.

    Posted

    Jan, Thank you very much!!

    Stupid mistake over looked it several times but I was on the wrong track with parser error (,)

    I think this solved the problem if not I will let you know

    Thanks again

    //Sjakie

    Posted

    Hello Jan,

    May I request something?

    All my rules are now according this example with the Trigger and log

    To follow better if a rule is executed

     Rule.eval("trueFor(00:15:00, serre.spotdubbel:isOn) => serre.spotdubbel:off;log('TRIGGER:%s',tjson(env.event)); log('serre spot dubbel - uit')")

     

      I like to have this log in another color 

     Rule.eval("serre.spotdubbel:isOn) =>  log('serre spot dubbel - aan')")

     Rule.eval("serre.spotdubbel:isOff) =>  log('serre spot dubbel - uit')")

     

    The old notify is in green but is the same as the rules by starting and I removed from aal scenes except arming

    Thanks for consideration.

    //Sjakie

     

  • Topic Author
  • Posted (edited)
    10 hours ago, Sjakie said:

    Hello Jan,

    May I request something?

    All my rules are now according this example with the Trigger and log

    To follow better if a rule is executed

     Rule.eval("trueFor(00:15:00, serre.spotdubbel:isOn) => serre.spotdubbel:off;log('TRIGGER:%s',tjson(env.event)); log('serre spot dubbel - uit')")

     

      I like to have this log in another color 

     Rule.eval("serre.spotdubbel:isOn) =>  log('serre spot dubbel - aan')")

     Rule.eval("serre.spotdubbel:isOff) =>  log('serre spot dubbel - uit')")

     

    The old notify is in green but is the same as the rules by starting and I removed from aal scenes except arming

    Thanks for consideration.

    //Sjakie

     

    Unfortunately the color settings for log became hidden with the last rewrite.

    However, you could define your own log function that takes a color argument and use it in your rules.

    Please login or register to see this code.

    and you can choose other colors. 

    Please login or register to see this link.

     

     

    Oh, it seems like you can set 

    Please login or register to see this code.

    and all calls to 'log' becomes red.

    Edited by jgab
    Posted

    Hello Jan,

    Thanks its looking good!!!

     

    Is it possible to read the temperature value of a sensor and let Alexa set it in voice?

    First part seems easy

    Rule.eval("#alexa{device='Temperature',cmd='On'} =>

    For second part I need your experience.

    Thanks in advance

    //Sjakie

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