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
    22 minutes ago, SBK said:

    Will ER4 v0.94 be available in QAUpdater?

    Yes, it's available.

    Posted
    31 minutes ago, SBK said:

    Will ER4 v0.94 be available in QAUpdater?

    Should be - did you press REfresh ?

    Please login or register to see this image.

    /monthly_2022_11/2022-11-21_11-42-38.jpg.051b89a8b5adb50612c42074e93fe551.jpg" />

     

    Posted

    Please login or register to see this link.

     

    Yes, I forgot and that was the problem. Thanks

  • Topic Author
  • Posted
    3 hours ago, emielstroeve said:

    thanks, but doesn't work either... I do need a user:password in the url, perhaps that's a problem? 

     

    this is the rule:

    Please login or register to see this code.

     

    http.get('http://user:[email protected]/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=3&arg3=0&arg4=0') = {"data":"","headers":{"CONTENT-LENGTH":"0","Connection":"close","Set-Cookie":"secure; HttpOnly","WWW-Authenticate":"Digest realm="Login to 10ea14149c49d01cf364a5a205d22ae7", qop="auth", nonce="440765063", opaque="c466d6f16664c0a02e7ac17b9392dfaa9df52326""},"status":401}

     

    So, it's a challenge response authorisation. Unfortunately I don't have access to any such device so it's difficult for me to try to hack something together.

    Here is a guy that implemented www-authentication for the HC2 (incl. HTTPS MD5 encryption). Maybe something to be inspired by.

    Please login or register to see this link.

     

    Posted (edited)
    5 hours ago, jgab said:

    It seems to be some invisible characters. The error comes from ER don't understanding the "words" of your rules. That is usually when invisible chars snuck into the code.

    I will see if I can come up with some mechanism to kill automatically...

    My rule:

    --2) We make a trigger for the temperature in the rooms
    --2.1) Marketing
    Util.defTriggerVar('temp_mark_Trig')
    rule("mark.temp:value => temp_mark_Trig=mark.temp:value")

    ---

    --3) It is variable, whether air conditioners should work on HEATING at all.. operating range -5 to +20
    Util.defTriggerVar('AC_heating_ON')

    --3.1) If the temperature outside for 3 hours is less than 20 degrees, then permanent AC_heating_ON=true
    rule("trueFor(03:00, temp_street_YR < 20) => AC_heating_ON=true;log('It's cold outside, so the boilers can work for heating, on the street C° %s=',temp_street_YR)")

    --4) If the temperature in the room for 10 minutes is less than 20 degrees, then the permanent true is vice versa, if it is more than 21 --roughly speaking CLIMATE CONTROL
    --4.1) Marketing
      Util.defTriggerVar('mark_heat_ON')
    rule("trueFor(00:15, temp_mark_Trig < 20) => mark_heat_ON=true; log('It's cool in the marketing room, С°=%s',temp_mark_Trig) ")
    rule("trueFor(00:30, temp_mark_Trig > 21) => mark_heat_ON=false; log('The marketing room has heated up, С°=%s',temp_mark_Trig) ")

    --

    --5) At 9 a.m., turn on the air conditioner for heating at 21 degrees, if the permanent mark_heat_ON and AC_heating_ON are TRUE
    --5.1) Marketing
      rule ([[@ {catch, 09:00} & 08:59..09:01 & wday('mon-fri') & mark_heat_ON & AC_heating_ON =>
       hub.call(mark.AC1, 'setThermostatMode', 'Heat');
        wait(00:00:10);
        hub.call(mark.AC1, 'setHeatingThermostatSetpoint', 21);
        log('Working report AC marketing-1: morning turning on AC, because it is cool outside and in the room, C° %s= on the street, inside %s=',temp_street_YR,temp_mark_Trig);
        fibaro.call(teleg, 'sendMessage', fmt('Working report of AC marketing-1: morning turning on AC, because it is cool outside and in the room, C° %s= on the street, inside %s=',temp_street_YR,temp_mark_Trig) , -720852615)
      ]])

    --6) During the working day, check whether heating is needed every 10 minutes
    --6.1) Marketing
    rule([[@@00:01 & 09:31..17:31 & wday('mon-fri') =>
      || (mark.AC1:thermostatMode=='Heat' | mark.AC1:thermostatMode=='Auto') & !mark_heat_ON >> hub.call(mark.AC1, 'setThermostatMode', 'Off'); fibaro.call(teleg , 'sendMessage', fmt('Work report AC marketing-1: I TURN OFF AC, because the room is already warm, on the street C° %s=, inside %s=',temp_street_YR,mark.temp:value), -720852615)
      || mark.AC1:thermostatMode=='Off' & mark_heat_ON >> hub.call(mark.AC1, 'setThermostatMode', 'Heat'); fibaro.call(teleg, 'sendMessage', fmt('Working report of AC marketing-1 : I TURN ON AC, because the room is already cold, on the street C° %s=, inside %s=',temp_street_YR,mark.temp:value), -720852615)
         ]])

     

    These rules worked well for about 2 weeks, and yesterday after overloading HC3, such errors began to appear + rule 6 does not work correctly, namely, it turns off the AC, even when the temperature is lower! The !mark_heat_ON variable is not actually taken into account

    Edited by fastvd
  • Topic Author
  • Posted
    6 hours ago, emielstroeve said:

    no difference.... still the status=401, even if I remove credentials in the beginning of the rule.

     

    Please login or register to see this code.

     

    Can you try this in a separate QA (not ER) and see if you get any output? Change the user and password at the bottom

    Please login or register to see this code.

     

    If it works we can clean it up and make it useful in ER.

  • Topic Author
  • Posted
    2 hours ago, fastvd said:

     

     

    These rules worked well for about 2 weeks, and yesterday after overloading HC3, such errors began to appear + rule 6 does not work correctly, namely, it turns off the AC, even when the temperature is lower! The !mark_heat_ON variable is not actually taken into account

    About rule 6, add an debug statement to see what mark:heat_ON is

    Ex.

    || (mark.AC1:thermostatMode=='Heat' | mark.AC1:thermostatMode=='Auto') & log('!mark_heat_ON:%s',!mark_heat_ON) & !mark_heat_ON >> hub.call(mark.AC1, 'setThermostatMode', 'Off');

    Posted
    22 minutes ago, jgab said:

    Can you try this in a separate QA (not ER) and see if you get any output? Change the user and password at the bottom

     

    If it works we can clean it up and make it useful in ER.

    hi @jgab it doesn't work.....

     

    log:

    [21.11.2022] [17:15:17] [DEBUG] [QUICKAPP539]: test ER 539

    [21.11.2022] [17:15:17] [DEBUG] [QUICKAPP539]: OK

    [21.11.2022] [17:15:18] [DEBUG] [QUICKAPP539]: OK

    [21.11.2022] [17:15:18] [DEBUG] [QUICKAPP539]: GET Reply:

  • Topic Author
  • Posted

    In the success handler in the beginning of the code, if you add the status message, what statuses do you get?

    Please login or register to see this code.

     

     

    Better, lets look at the complete response

    Please login or register to see this code.

     

    Posted
    On 11/20/2022 at 5:00 PM, jgab said:

    What version are you running?

     iam running the latest  0,92 att the time 

    Posted (edited)

    i think ther is a new bugg  this has workd befor . if i have 2 sensors  in  one rule  it dosent work any more 

     

    Please login or register to see this code.

     

    i think somting has happend  whit this line  in the update  whit the timers   it workd in 0.92  and i have done noting att all bute uppdat the Eventrunner 4

     

    rule("trueFor(00:02,{Dorrsensortvatt,Rorelse_Tvatt}:safe) & $tvattstuga == 'Auto' & $Styrning=='On' => log('#C:Red#Tvättstugan Belysning är nu släckt');Bel_TakTvatt:off ") 

     i have 2 sensors   one dorr and one motion senor  in the same rule

     

    This rule works  its  lowring the lights 

     

    --Lampan Dämpas 1 minut innan den ska släckas mellan 06:00-21:55 ---
    rule("trueFor(00:01,Rorelse_Tvatt:safe) & 06:10..21:58 & $tvattstuga == 'Auto' & $Styrning=='On' & Bel_TakTvatt:isOn => log('#C:Yellow#Tvättstugan dämpad till 10%');Bel_TakTvatt:value=10 ")

     

     

    and the door sensor is working.  I have anoter rule whit 2 sensors that behaves the same.. 

    Edited by systemfel
  • Topic Author
  • Posted
    46 minutes ago, systemfel said:

    i think ther is a new bugg  this has workd befor . if i have 2 sensors  in  one rule  it dosent work any more 

     

    Please login or register to see this code.

     

    i think somting has happend  whit this line  in the update  whit the timers   it workd in 0.92  and i have done noting att all bute uppdat the Eventrunner 4

     

    rule("trueFor(00:02,{Dorrsensortvatt,Rorelse_Tvatt}:safe) & $tvattstuga == 'Auto' & $Styrning=='On' => log('#C:Red#Tvättstugan Belysning är nu släckt');Bel_TakTvatt:off ") 

     i have 2 sensors   one dorr and one motion senor  in the same rule

     

    This rule works  its  lowring the lights 

     

    --Lampan Dämpas 1 minut innan den ska släckas mellan 06:00-21:55 ---
    rule("trueFor(00:01,Rorelse_Tvatt:safe) & 06:10..21:58 & $tvattstuga == 'Auto' & $Styrning=='On' & Bel_TakTvatt:isOn => log('#C:Yellow#Tvättstugan dämpad till 10%');Bel_TakTvatt:value=10 ")

     

     

    and the door sensor is working.  I have anoter rule whit 2 sensors that behaves the same.. 

     

    Yes, that was the type of bugs I was worried for - a cut and paste when I was moving functionality between ER and fibaroExtra.

    I pushed v0.95 that fixes that bug.

    Thanks.

    /J

    Posted
    24 minutes ago, jgab said:

     

    Yes, that was the type of bugs I was worried for - a cut and paste when I was moving functionality between ER and fibaroExtra.

    I pushed v0.95 that fixes that bug.

    Thanks.

    /J

     Tack själv  :)  

    • Like 1
    Posted (edited)

    Jan error occurred today see "warn" for the first time

    Please login or register to see this code.

     In version v0.95

    V0.94 no error

    Edited by Sjakie
    three QA's also same error
    Posted
    15 hours ago, emielstroeve said:

    hi @jgab it doesn't work.....

     

    log:

     

    Hi @jgab

     

    This solution works perfectly! Added the url in the ip variable, user/password and there we go!

     

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

    Jan error occurred today see "warn" for the first time

    Please login or register to see this code.

     In version v0.95

    V0.94 no error

    pushed v 0.96 with a fix.

    The error means that you have a rule with invisible characters in them.

    It will log a warning and the rule.

    If you want to ignore it do

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    39 minutes ago, emielstroeve said:

    Hi @jgab

     

    This solution works perfectly! Added the url in the ip variable, user/password and there we go!

     

    Funny, that's what I based my code on but I couldn't get it to work with the test site 

    Please login or register to see this link.

    so I made some small changes....

     

    I would recommend that you wrap it up in a global Lua function and put it in a separate QA file in ER4.

    Name the QA file U_something

    The "U_" prefix will prevent the updater to remove the QA file.

     

    Make a function ex. 

    Please login or register to see this code.

     

    and then call it from your rule

    Please login or register to see this code.

     

    • Like 1
    Posted

    Jan, awesome!!!!!!!!

    I see a few (30) rules with illegal characters.

    How to find?

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

    Jan, awesome!!!!!!!!

    I see a few (30) rules with illegal characters.

    How to find?

    Can you post one of the logs?

    Posted

    Please login or register to see this code.

     

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