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

Jan,

doucheRuimte.deur is a device.

The error is a wrong name in deftrigger I saw now, corrected and error not showing anymore.

Thanks,

//Sjakie

Posted

I want to generate two variables for status for my extractor hood.

One for Step 0-4 and one for light on/off

So I tried this..

Please login or register to see this code.

I see triggers like this.

Please login or register to see this code.

but i dont see the log post ? and i dont see the [true]>>'Rule:15.... 

is this wrong?

  • Topic Author
  • Posted
    30 minutes ago, ChristianSogaard said:

    I want to generate two variables for status for my extractor hood.

    One for Step 0-4 and one for light on/off

    So I tried this..

    Please login or register to see this code.

    I see triggers like this.

    Please login or register to see this code.

    but i dont see the log post ? and i dont see the [true]>>'Rule:15.... 

    is this wrong?

    It works well, but is missing the parenthesis for the log function. 

    Please login or register to see this code.

     

    • Like 1
  • Topic Author
  • Posted
    2 hours ago, jgab said:

    It works well, but is missing the parenthesis for the log function. 

    Please login or register to see this code.

     

    However, it should throw an error message - I will fix that in the next version.

    • Thanks 1
    Posted
    10 minutes ago, jgab said:

    However, it should throw an error message - I will fix that in the next version.

    Im unfortunately using IFTTT to call a two scenes when my extractor hood is turn on/off.

    If there a way to pass the  IFTTT triggers into EV4? - or do i need to use the scenes to trigger into EV4?

  • Topic Author
  • Posted

    As I understand it (I can be wrong) so can IFTTT only start scenes on the HC3?

    In that case you need to call the ER4 QA from the scene. 

    ex. fibaro.call(ER4_ID,"whatever",...)

     

    Posted

    Is it possible to send data to an Influx database from ER4?


    I want to log the status of a certain switch by sending a "1" to Influx if the switch is on (true), and a "0" if the status is off (false).

    host = "192.168.1.99"
    port = "8086"
    dbName = "HC3"
    dbTag = "status"

    deviceID
    deviceName
    value (number 0 or 1)

     

    Is it possible (easy) to do this via a rule in ER4, and if so, how?

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

    Is it possible to send data to an Influx database from ER4?


    I want to log the status of a certain switch by sending a "1" to Influx if the switch is on (true), and a "0" if the status is off (false).

    host = "192.168.1.99"
    port = "8086"
    dbName = "HC3"
    dbTag = "status"

    deviceID
    deviceName
    value (number 0 or 1)

     

    Is it possible (easy) to do this via a rule in ER4, and if so, how?

    How does the request/url look like?

    Posted
    Quote

    How does the request/url look like?

    I have borrowed and edited some code from this post: 

    Please login or register to see this link.

    Hope that's what you're asking for.

     

    Please login or register to see this code.

     

  • Topic Author
  • Posted

    Well, you can easily call Lua functions from ER rules.

    Assume that you have a working Lua function

    Please login or register to see this code.

    You can write rules like this

    rule("lamp:value => saveToInflux('Light', lamp:value, lamp, lamp:name, ostime())")

    and it will trigger every time lamp changes value property.

    lamp:value is boolean if a switch and an integer if it's a dimmer etc.

    lamp:name is the device name. ostime() is the time in epoch.

     

    • Thanks 1
    Posted

    I have the latest fix and this morning noting worked in the house  i get this in the  debug  i have done noting att all for a month in fibaro .. 

    i have restart´the hc3 4 times 

     

    [2021-05-05] [19:03:31] [ERROR] [QUICKAPP61]: Error in '{Badsensor,Duschsensor}:breached =>
                 || Badlux:value < 39 & 06:00..10:00 >> log('Badrums lampan tänd %80 ');Badrumslampa:value=80; -- lampan 80%
                 || Badlux:value < 20 & 10:00..16:00 >> log('Badrums lampan tänd %50 ');Badrumslampa:value=50;  -- lampan 50%
                 || Badlux:value < 36 & 16:00..21:00 >> log('Badrums lampan tänd %60 ');Badrumslampa:value=80;  -- lampan 60%
                 || Badlux:value < 35 & 21:00..23:00 >> log('Badrums lampan tänd %80 ');Badrumslampa:value=80;  -- lampan 80%
                 || Badlux:value < 10 & 23:00..06:00 >> log('Badrums lampan tänd %30 ');Badrumslampa:value=30;  -- lampan 30%
                 || 81:breached >> log("Badrums Sensor Main är aktiverad!");
                 || 86:breached >> log("Badrums Sensor Dusch aktiverad");
                 ': ./include/EventRunner.lua:1277: Parser error char 143 (';') in expression '{Badsensor,Duschsensor}:breached =>
                 || Badlux:value < 39 & 06:00..10:00 >> log('Badrums lampan tänd %80 ');Badrumslampa:value=80; -- lampan 80%
                 || Badlux:value < 20 & 10:00..16:00 >> log('Badrums lampan tänd %50 ');Badrumslampa:value=50;  -- lampan 50%
                 || Badlux:value < 36 & 16:00..21:00 >> log('Badrums lampan tänd %60 ');Badrumslampa:value=80;  -- lampan 60%
                 || Badlux:value < 35 & 21:00..23:00 >> log('Badrums lampan tänd %80 ');Badrumslampa:value=80;  -- lampan 80%
                 || Badlux:value < 10 & 23:00..06:00 >> log('Badrums lampan tänd %30 ');Badrumslampa:value=30;  -- lampan 30%
                 || 81:breached >> log("Badrums Sensor Main är aktiverad!");
                 || 86:breached >> log("Badrums Sensor Dusch aktiverad");
                 ' (./include/EventRunner.lua:1071: Bad expression)
    [2021-05-05] [19:03:31] [ERROR] [QUICKAPP61]: main() error:./include/EventRunner.lua:2250: Main() ERROR:./include/EventRunner.lua:2094: ./include/EventRunner.lua:1277: Parser error char 143 (';') in expression '{Badsensor,Duschsensor}:breached => || Badlux:value < 39 & 06:00..10:00 >> log('Badrums lampan tänd %80 ');Badrumslampa:value=80; -- lampan 80% || Badlux:value < 20 & 10:00..16:00 >> log('Badrums lampan tänd %50 ');Badrumslampa:value=50; -- lampan 50% || Badlux:value < 36 & 16:00..21:00 >> log('Badrums lampan tänd %60 ');Badrumslampa:value=80; -- lampan 60% || Badlux:value < 35 & 21:00..23:00 >> log('Badrums lampan tänd %80 ');Badrumslampa:value=80; -- lampan 80% || Badlux:value < 10 & 23:00..06:00 >> log('Badrums lampan tänd %30 ');Badrumslampa:value=30; -- lampan 30% || 81:breached >> log("Badrums Sensor Main är aktiverad!"); || 86:breached >> log("Badrums Sensor Dusch aktiverad"); ' (./include/EventRunner.lua:1071: Bad expression)

    Posted (edited)

    Please login or register to see this attachment.

    hi @jgab

     

    i have 3 EV4 QA not working today - and not showing version number. Rest i working and showing . EventRunner4 v0.5fix50. I tried rebooting . but that didnt help. I didnt change anything . but i'm using the Event runner autoupdate 

    Edited by ChristianSogaard
    P
  • Topic Author
  • Posted

    Ok, I reverted it to v49 and call it v51, so it should work.

     

    • Thanks 1
    Posted
    1 minute ago, jgab said:

    Ok, I reverted it to v49 and call it v51, so it should work.

    its working now for me :) 

     

    1 minute ago, jgab said:

     

     

  • Topic Author
  • Posted
    Just now, jgab said:

    Ok, I reverted it to v49 and call it v51, so it should work.

     

    It's really strange as it works ok for me and my tests. 

    @systemfel, can you send me the rule that crashes for you?

    [2021-05-05] [19:03:31] [ERROR] [QUICKAPP61]: Error in '{Badsensor,Duschsensor}:breached =>
                 || Badlux:value < 39 & 06:00..10:00...

    • Like 1
    Posted
    7 minutes ago, jgab said:

    It's really strange as it works ok for me and my tests. 

    @systemfel, can you send me the rule that crashes for you?

    [2021-05-05] [19:03:31] [ERROR] [QUICKAPP61]: Error in '{Badsensor,Duschsensor}:breached =>
                 || Badlux:value < 39 & 06:00..10:00...

    yes  i have sent ju a mess

  • Topic Author
  • Posted

    Next version I will implement a beta version model.... and it should be possible to revert a beta to the previous version.

    Posted

    Jan, all (7) my QA's run fix 50 without any problem. :)

    //Sjakie

    Posted
    15 minutes ago, systemfel said:

     

     

    Hi Jan - the same that worked before is now 51 - but the ones, not working before is still not working

  • Topic Author
  • Posted
    Just now, Sjakie said:

    Jan, all (7) my QA's run fix 50 without any problem. :)

    //Sjakie

    Yes, the issue was that my parser was too strict and considered a semicolon at the end of a || >> ...; 

    to be an error. (It is unnecessary)

    1 minute ago, ChristianSogaard said:

    Hi Jan - the same that worked before is now 51 - but the ones, not working before is still not working

    Yes, that was what I did. I took 49 and called it 51 so you could "upgrade" to a functioning version.

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