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

    It's tricky to know if it has stopped as there is no 'running' key as there is for scenes.

    One approach is to have a "liveness" ping to another QA. 

    Another simple thing is to have the ER4 QA write the time to a fibaro global every 30s.

    Then have a scene that looks at the variable every minute and if not updated the last 30s will notify you

    and try a POST /plugins/restart...

     

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

    It's tricky to know if it has stopped as there is no 'running' key as there is for scenes.

    One approach is to have a "liveness" ping to another QA. 

    Another simple thing is to have the ER4 QA write the time to a fibaro global every 30s.

    Then have a scene that looks at the variable every minute and if not updated the last 30s will notify you

    and try a POST /plugins/restart...

     

    The command is

    api.post("/plugins/restart",{deviceId=deviceId})

    Posted

    and what about to read debug messages? Is it possible to get these info via APIs?

  • Topic Author
  • Posted
    1 minute ago, petrkl12 said:

    and what about to read debug messages? Is it possible to get these info via APIs?

    Yes, it's possible. But you got no logs :-) You can write pings in the log and check it from another QA. The GV seems simpler and you don't need to pollute the log.

    Posted

    Please login or register to see this code.

    Jan I dont have any /

    I -- all other rules who are using the GV and wich one of the rules I use creates error.

    The solution is buying a dubble relais and wipe out the GV, analog as I had when I used the HC2.

    I know its not the best solution if I am not knowing where that error comes from.

     

    what about:

    Whats the working cmd for    httpGet('http://api.

    error no such cmd httpGet/httpget.

     

    fix 56 came in as a thief in the night!!!!!

     

    Why if opens QA it shows tab ER in stead of QA?

     

    Thanks for the service,

    //Sjakie

     

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

    Please login or register to see this code.

    Jan I dont have any /

    I -- all other rules who are using the GV and wich one of the rules I use creates error.

    The solution is buying a dubble relais and wipe out the GV, analog as I had when I used the HC2.

    I know its not the best solution if I am not knowing where that error comes from.

    So this is the HC2? just to be sure..

    You say that it only happens with rules using '$BeveiligenAanw' ?

    You could try (long shot) set MARSHALL=false in the beginning of ER3

    Please login or register to see this code.

     

     

    54 minutes ago, Sjakie said:

    what about:

    Whats the working cmd for    httpGet('http://api.

    error no such cmd httpGet/httpget.

    In ER3 it's called web.get(url)

     

    54 minutes ago, Sjakie said:

     

    fix 56 came in as a thief in the night!!!!!

     

    Why if opens QA it shows tab ER in stead of QA?

    Can you elaborate what you mean? not clear.

     

     

    Posted

    Jan, sorry I used a Dutch expression.

    Fix 56 came into my system smooth and silent! If been robbed at night you dont notice either.

     

    Yes its HC2 but what I dont understand:

    HC2 factory reset>> I figured out it ws better to restore my latest version ER scenes

    I wiped out what was not applicable and all devices.

    I add all devices and modified my scenes

    Because my daughters wish was to keep it simple (Why she ask me?) I start to use GV as interface between ER and VD.

    Last evening I rember a remark from you about VD's and App better use devices.

    For myself I always used deveices so I changed back to devices thats why I need to buy a dubble relais.

    I think it will be more reliable too.

    //Sjakie

    Posted

    Jan,

    HC3

    I found a old rule to minimize the number of messages in debug but I have an error in it.

    Please login or register to see this code.

    [22.05.2021] [11:01:55] [ERROR] [QUICKAPP1303]: main() error:./include/EventRunner.lua:2292: Main() ERROR:./include/main.lua:390: attempt to index a nil value (global 'Event')

    Whats wrong?

    //Sjakie

     

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

    Jan,

    HC3

    I found a old rule to minimize the number of messages in debug but I have an error in it.

    Please login or register to see this code.

    [22.05.2021] [11:01:55] [ERROR] [QUICKAPP1303]: main() error:./include/EventRunner.lua:2292: Main() ERROR:./include/main.lua:390: attempt to index a nil value (global 'Event')

    Whats wrong?

    //Sjakie

     

    That code only works on the HC2, on the HC3 we need something different.

    I have pushed ER4 fix57 that gives a quick fix.

     

    Please login or register to see this code.

    the function self:triggerDelta(deviceID, propertyName, deltaValue)

    will ensure that the device only triggers if its property changes with deltaValue or more.

    Note that the property needs to be a numeric value or it will generate an error.

    Edited by jgab
    • Like 1
    Posted

    Jan, thank you verry much for this fast solution!

    Just to recieve a message if its important to get, is it possible to modify below rule to exclude this message if update is done because of fix "n"?

    Please login or register to see this code.

    Thanks in advance,

    //Sjakie

    Posted

    Jan, for sure I do it wrong, on fix 57

    No debug at all

    Please login or register to see this code.

    //Sjakie

    Posted

    Jan, HC2 error and I dont understand why?

    Both devices in HT and listed in debug

    ID number in header

    If I seperate switch on/off both devices I get nice the result back in debug if he is on or off. If I replace name by ID same error so no type error.

    What I am doing wrong?

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2021_05/afbeelding.png.e055f5d3b0d9f67f0aeea0484f65dee6.png" />

  • Topic Author
  • Posted
    1 minute ago, Sjakie said:

    Jan, HC2 error and I dont understand why?

    Both devices in HT and listed in debug

    ID number in header

    If I seperate switch on/off both devices I get nice the result back in debug if he is on or off. If I replace name by ID same error so no type error.

    What I am doing wrong?

    Please login or register to see this code.

     

    Please login or register to see this code.

    Posted

    mmmhhh sorry for this stupid error thankssssss!

    //Sjakie

    Posted

    Hi Jan, Thanks for your great work. I am trying to transfer config from HC2 to HC3 using ER4 and having difficulties with the logic for the following -

     

    I want to close the blinds @ a certain time if the Windows are closed. If Windows are open then log and send a message to Andriod phone

     

    --- Blinds ---
    Bedroom_Small_Blind=530, Bedroom_Big_Blind=601
    Ashlee_Blind=651, SpareRoom_Blind=662,
    Dinning_Blind=695, Lounge_SunScreen=719
    Lounge_Blind=828, Dinning_Long_Blind=825,
    Mitch_Blind=857, Office_SunScreen=918
    Office_Blind=936,
    --- Door / Window Sensors ---
    Lounge_Balcony_DW_Sensor=542, Bedroom_Small_DW_Sensor=625,
    Dinning_DW_Sensor=644, Garage_Door_DW_Sensor=739,
    Laundry_Door_DW_Sensor=822, Understairs_DW_Sensor=834,
    Mitchell_DW_Sensor=870, Bedroom_Big_DW_Sensor=922,
    Ashlee_DW_Sensor=929, Office_DW_Sensor=942,
    Office_House_DW_Sensor=965, FrontDoor_DW_Sensor=1094,
    Spare_Room_DW_Sensor=658, Garage_House_DW_Sensor=759,
    Deck_DW_Sensor=1103
     
    rule("bedroomWindows = {Bedroom_Small_DW_Sensor, Bedroom_Big_DW_Sensor}"-- group both window sensors

    rule("bedroomBlinds = {Bedroom_Small_Blind, Bedroom_Big_Blind}")  - group both Roller Shutters

    rule ("@sunrise+rnd(-00:05,00:15) => bedroomBlinds:open") -- Open bedroom blinds in the morning within 20 min random period of sunrise
    rule ([[@sunset+rnd(-00:05,00:15) =>
              || bedroomWindows:safe >> bedroomBlinds:close;
              || bedroomWindows:breached >> log('Blinds can not close as window is open')
             ]])

     

     

     

     

  • Topic Author
  • Posted
    19 minutes ago, jasonway said:

    Hi Jan, Thanks for your great work. I am trying to transfer config from HC2 to HC3 using ER4 and having difficulties with the logic for the following -

     

    I want to close the blinds @ a certain time if the Windows are closed. If Windows are open then log and send a message to Andriod phone

     

    --- Blinds ---
    Bedroom_Small_Blind=530, Bedroom_Big_Blind=601
    Ashlee_Blind=651, SpareRoom_Blind=662,
    Dinning_Blind=695, Lounge_SunScreen=719
    Lounge_Blind=828, Dinning_Long_Blind=825,
    Mitch_Blind=857, Office_SunScreen=918
    Office_Blind=936,
    --- Door / Window Sensors ---
    Lounge_Balcony_DW_Sensor=542, Bedroom_Small_DW_Sensor=625,
    Dinning_DW_Sensor=644, Garage_Door_DW_Sensor=739,
    Laundry_Door_DW_Sensor=822, Understairs_DW_Sensor=834,
    Mitchell_DW_Sensor=870, Bedroom_Big_DW_Sensor=922,
    Ashlee_DW_Sensor=929, Office_DW_Sensor=942,
    Office_House_DW_Sensor=965, FrontDoor_DW_Sensor=1094,
    Spare_Room_DW_Sensor=658, Garage_House_DW_Sensor=759,
    Deck_DW_Sensor=1103
     
    rule("bedroomWindows = {Bedroom_Small_DW_Sensor, Bedroom_Big_DW_Sensor}"-- group both window sensors

    rule("bedroomBlinds = {Bedroom_Small_Blind, Bedroom_Big_Blind}")  - group both Roller Shutters

    rule ("@sunrise+rnd(-00:05,00:15) => bedroomBlinds:open") -- Open bedroom blinds in the morning within 20 min random period of sunrise
    rule ([[@sunset+rnd(-00:05,00:15) =>
              || bedroomWindows:safe >> bedroomBlinds:close;
              || bedroomWindows:breached >> log('Blinds can not close as window is open')
             ]])

     

    The logic looks ok. Is it just sending the message that's missing?

    You can try

    Please login or register to see this code.

    log(...) returns that the string that is logged and we give it as an argument to userID:msg=...

    You could of course also send another message than the one you log.

    userID is the id you have in the system. 

    You can look at http://<HC3 IP>/api/iosDevices

    It says iosDevices but is valid for Android too.

    • Like 1
    Posted (edited)
    22 hours ago, jgab said:

     

    The logic looks ok. Is it just sending the message that's missing?

    You can try

    Please login or register to see this code.

    log(...) returns that the string that is logged and we give it as an argument to userID:msg=...

    You could of course also send another message than the one you log.

    userID is the id you have in the system. 

    You can look at http://<HC3 IP>/api/iosDevices

    It says iosDevices but is valid for Android too.

    Hi Jan, Thanks for your help, all working now.

    Issue was a faulty Window Sensor and using your information I got both logging and message working.

    Edited by jasonway
    Posted

    Jan, goodmorning,

    HC2

    I have a small problem I have an alarm but in my view all devices should be safe so I add check - ....

    does this work in HC2? Or what I am doing wrong?

    Please login or register to see this image.

    /monthly_2021_05/afbeelding.png.68b70dea1ca26b16c3349174d5aec233.png" />

    Thnaks for your support,

    //Sjakie

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

    Jan, goodmorning,

    HC2

    I have a small problem I have an alarm but in my view all devices should be safe so I add check - ....

    does this work in HC2? Or what I am doing wrong?

    Please login or register to see this link.

    Thnaks for your support,

    //Sjakie

    How is your log4 function defined?

    It needs to apply the string.format function to make the %s directives work.

    Posted

    Jan, all are according:

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2021_05/afbeelding.png.8b35ca42a9f40ce17508e7f2e8fd8612.png" />

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