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
    14 hours ago, Neo Andersson said:

    @jgab

    Jan can you assist a little bit with nodered?

    I am a bit lost here.

    I have a nodered url 192.168.100.178:1880

    I am calling this in a regular way using this code 

     

    Please login or register to see this code.

     

    How to send the post from above with ER?

    rule("noderedURL='http://192.168.100.178:1880'") 

    now where do a put my "/CAST" string, and where do i send the data ( in my case the "requestStringToJSON"?)

     

    To use the nodered integration you need to use the entry flow in the post. 

    It sets up another entry point named "/ER_HC3" and expects a message that looks like an event with a type field.

    Then in your own flow (Flow 1 in the example) you switch on the type and pass the suitable event parameters on to the nest node.

    Then you can take the result from the nest node and package it as an event and return it to ER5.

     

    If you want to keep your existing flow you can simplify iy a little bit by using the ER http.post() function.

    Posted
    1 hour ago, jgab said:

    Sorry, this was a bug in the dim code. Next version today will have a fix.

    Thanks for the speedy fix!

    The dim code to dim level down has never worked for me from the value:_  I get that the dimmer will turn on at its last level and then adjust to the set value but it always starts from 100 percent going down? even if the light is on. 

    is this possible

    => 65: value = 30; 65:isOn; 65:dim = {00:05:00, 'down', 00:00:01, 'Linear', 30.0}; log('sceneEvent10 Dimlight bedroom started')")   

    Posted
    38 minutes ago, jgab said:

    v0.34 pushed

    Fixed bugs causing problems for @Sjakie and his key rules

    Also, a general bug for trigger handling so I recommend all to update.

    Fixed 0:armed bug ( @ChristianSogaard )

    dim bug fixed ( @Pica2017 )

     

     

     

    Thank you Jan - you are a EV unicorn :-) 

    Posted
    46 minutes ago, jgab said:

    When I got this problem report from @minsad79 I tried to run it, but I figured out quickly that it was an issue with the new language in ER5.

     

    However, to debug this kind of rules, one can setup a simple simulation of the devices involved.

    Please login or register to see this code.

    Redefine the sensors and lights 'Livingbath_x" with simulated binaryDevices.

    er.createBinaryDevice() creates a simulated binary device and returns the assigned deviceId.

     

    Then we have the bathroom rules as usual - now using our simulated devices.

     

    Then I setup a remote/keyfob so key presses toggles the door and motion sensor and logs a message what new state they have.

    I also setup debug options so the console output is not so noisy

    Please login or register to see this code.

     

    Then I can lean back, press the remote to toggle the state of the door and the sensor and see how the rules are triggered...

    WIthout having to run to the bathroom and open and close any door or breach any sensor :-) 

     

    Hi Jan

     

    How to understand this - Livingbath_door:value 

    Its the "value" part , that i dotn get

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    27 minutes ago, Pica2017 said:

    Thanks for the speedy fix!

    The dim code to dim level down has never worked for me from the value:_  I get that the dimmer will turn on at its last level and then adjust to the set value but it always starts from 100 percent going down? even if the light is on. 

    is this possible

    => 65: value = 30; 65:isOn; 65:dim = {00:05:00, 'down', 00:00:01, 'Linear', 30.0}; log('sceneEvent10 Dimlight bedroom started')")   

    Ok, that's kind of a bug. The dim code will require me to think a bit how to fix in the best way.

    For the moment you can get around it by providing the current value as the 6th value

    Please login or register to see this code.

     

    3 minutes ago, ChristianSogaard said:

    Hi Jan

     

    How to understand this - Livingbath_door:value 

    Its the "value" part , that i dotn get

    Please login or register to see this code.

     

    Well, it's minsads rule, but Livingbath_door is a sensor (fibaro.com.binarySensor) and :value returns true if breached and false if closed.

    I guess it could have been expressed as Livingbath_door:breached as well....

    • Like 1
    Posted
    15 minutes ago, jgab said:

    Ok, that's kind of a bug. The dim code will require me to think a bit how to fix in the best way.

    For the moment you can get around it by providing the current value as the 6th value

    Please login or register to see this code.

     

    Great thanks again Jan! :) 

    Posted (edited)

    Hi Jan

     

     

    Can I put a value in the trigger variable?

     

     

      Util.defTriggerVar("Bbathcounter",0
     

    It was possible in ER4

    in the bathroom

    If a person is detected and the door is closed

    As much time as I want to raise the number

    23 minutes ago, ChristianSogaard said:

    Hi Jan

     

    How to understand this - Livingbath_door:value 

    Its the "value" part , that i dotn get

    Please login or register to see this code.

     

    hi
    ChristianSogaard

    That rule is based on an example from Jan that was used in ER3 a long time ago.

    Edited by minsad79
    Posted
    7 minutes ago, minsad79 said:

    Hi Jan

     

     

    Can I put a value in the trigger variable?

     

     

      Util.defTriggerVar("Bbathcounter",0
     

    It was possible in ER4

    in the bathroom

    If a person is detected and the door is closed

    As much time as I want to raise the number

    hi
    ChristianSogaard

    That rule is based on an example from Jan that was used in ER3 a long time ago.

     triggerVar.Bbathcounter = 0
    And define in main local triggerVar = er.triggerVariables

    Posted
    12 minutes ago, ChristianSogaard said:

     triggerVar.Bbathcounter = 0
    And define in main local triggerVar = er.triggerVariables

    @jgab

     

    Jan i am usin version 0.33 but this still doesn't work. It still doesn't work with table type variable in the trigger?

    Please login or register to see this code.

     

    Posted (edited)
    17 hours ago, Neo Andersson said:

    I am sharing here a little QA that creates the HT table content used in ER4 or ER5 for you according to your system. Spares a lot of coding.

    It auto detects space characters in the name of the device and replaces it by _ character.

    Also it removes any starting spaces. It doesn't take into account devices that have numbers as starting letters in their names. (there are a lot of endpoints that I never renamed, so it just aviods them) 

    The HT table is created in alphabetical order.

    You can select if only visible devices are you interested in, and there are two buttons for zwave and zigbee devices accordingly.

    For me it is a big help, if i have a system with hundreds of devices, i don't need to manually set up my HT table.

    It separates devices into starting letter categories too.

    Just press one of the print buttons and you can copy past your entire device table from debug window into your HT table in ER5 or ER4.

    Maybe somone will find this helpfull.

     

    Please login or register to see this attachment.

     

    Would it be ok to share unencrypted so we can adapt/change ? 

    I am using a slightly other structure ;-) but i really like the idea.
     

    local HTab = { 
                    livingroom = {
                        matrix = 218,
                        Tryk1 = 221,
                        Tryk2 = 223,
                        Tryk3 = 225,
                        Tryk4 = 227,
                        arc = 1544,
                        samsungtv = 1543,
                        Automation = false,
                    },
                    terasse = {
                                lille = {    
                                        door_sensor = 274,
                                        matrix = 146,
                                        Tryk1 = 149,
                                        Tryk2 = 151,
                                        Tryk3 = 153,
                                        Tryk4 = 155,
                                        lys = 156,
                                        Automation = true,
                                        AutoORManuelt = true,
                                        },
                                stor = {    
                                        door_sensor = 272,
                                        matrix = 1187,
                                        Tryk1 = 1189,
                                        Tryk2 = 1191,
                                        Tryk3 = 1193,
                                        Tryk4 = 1195,
                                        lys1 = 1197,
                                        lys2 = 1198,
                                        Automation = true,
                                        AutoORManuelt = false,
                                        },
                                        
                            },
                    entre = {
                                door_sensor = 270,
                                lys = 36 ,
                                Automation = true,
                                AutoORManuelt = false,
                                FliseAutoORManuelt = false,
                            },

     

    Please login or register to see this attachment.

     

    Edited by ChristianSogaard
    Typo
  • Topic Author
  • Posted
    1 hour ago, Neo Andersson said:

    @jgab

     

    Jan i am usin version 0.33 but this still doesn't work. It still doesn't work with table type variable in the trigger?

    Please login or register to see this code.

     

    My fault. There is a fourth function that needs to be defined for the property.

    The 'map' function that tells us what should be done when called on a list if devices

    The map functions takes the single prop function and a list of the devices. It should then apply the single prop function in each device in list and calculate what is the aggregated value.

    In our case, the :windowOpened should return true if any device is opened, else return false.

    Please login or register to see this code.

     

    Posted
    4 minutes ago, jgab said:

    My fault. There is a fourth function that needs to be defined for the property.

    The 'map' function that tells us what should be done when called on a list if devices

    The map functions takes the single prop function and a list of the devices. It should then apply the single prop function in each device in list and calculate what is the aggregated value.

    In our case, the :windowOpened should return true if any device is opened, else return false.

    Please login or register to see this code.

     

    thanks

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

    My fault. There is a fourth function that needs to be defined for the property.

    The 'map' function that tells us what should be done when called on a list if devices

    The map functions takes the single prop function and a list of the devices. It should then apply the single prop function in each device in list and calculate what is the aggregated value.

    In our case, the :windowOpened should return true if any device is opened, else return false.

    Please login or register to see this code.

     

    So, without the map function, :windowOpened will return a list of the values for the devices, ex {true, false, true, ...}

    Just now, jgab said:

    So, without the map function, :windowOpened will return a list of the values for the devices, ex {true, false, true, ...}

     

    My first thought was that you could use :someTrue to check if the list contained any true values

    Please login or register to see this code.

    However, it turned out that there was a bug in :someTrue that is fixed for next version.

    Posted
    2 minutes ago, jgab said:

    My first thought was that you could use :someTrue to check if the list contained any true values

     

    Please login or register to see this code.

    However, it turned out that there was a bug in :someTrue that is fixed for next version.

    This is even better

    Posted

    Have you worked with devices (switches) like Fibaro that dont have Base Report for feedback, so if you have 3 party device changing the status, its not getting back to the HC3?

     

    And then you  Add a extra sensor(ect door) to get the feed back?

    i have those in my garageport, and was wondering i i could create a better logic in EV5

     

    Anyone solved this yet?

    Posted (edited)

    Jan the HUE switch does't operate, report well. It will give after pressed or holdown a release 

    but as you can see at 12:25:11 it should be pressed! insted of released

    I pressed button 1 and it shows twiece released!!

    In theHUE app I see by the dimmer only pressed and after around 8 seconds the message disapear

     

    Please login or register to see this code.

     

    Edited by Sjakie
    ad HUE aap
  • Topic Author
  • Posted (edited)
    40 minutes ago, ChristianSogaard said:

    Have you worked with devices (switches) like Fibaro that dont have Base Report for feedback, so if you have 3 party device changing the status, its not getting back to the HC3?

     

    And then you  Add a extra sensor(ect door) to get the feed back?

    i have those in my garageport, and was wondering i i could create a better logic in EV5

     

    Anyone solved this yet?

    Well, in ER5 you could create your own deviceObject

    Please login or register to see this code.

    The SwitchCombo creates a device with a sensor and a switch. The status of the SwitchCombo only depends on the sensor.

    but :on and :off commands operate on the switch.

    Would that work?

    Edited by jgab
    • Thanks 1
    Posted (edited)
    4 minutes ago, jgab said:

    Well, in ER5 you could create your own deviceObject

    Please login or register to see this code.

    The SwitchCombo creates a device with a sensor and a switch. The status of the SwitchCombo only depends on the sensor.

    but :on and :off commands operate on the switch.

    Would that work?

    Thank you Jan - Ill test and give an update here

    And i need to add my IDs in this line, right ?

    rule("a = SwitchCombo(sensorID,switchID)")

     

    Edited by ChristianSogaard
    Typo
  • Topic Author
  • Posted
    13 minutes ago, Sjakie said:

    Jan the HUE switch does't operate, report well. It will give after pressed or holdown a release 

    but as you can see at 12:25:11 it should be pressed! insted of released

    I pressed button 1 and it shows twiece released!!

    In theHUE app I see by the dimmer only pressed and after around 8 seconds the message disapear

     

    Please login or register to see this code.

     

    Yes, you use CoH as I understand.

    The problem is that Hue buttons works differently from how Fibaro buttons operate (what events Pressed, Released etc they emit)

    CoH tries to make an guess what it should be and I guess in this case because of some delay or whatever, you get 2 RELEASED.

    I'm not sure there is a fix for this.

    Can't you design your rules so it doesn't matter if you get 2 released?

    Posted
    5 hours ago, jgab said:

    Sorry, it was a bug in 0:armed (whole house). Fixed in next version.

    What error do you get?

    Confirmed that  0:armed (whole house) works for me now

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