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
    2 hours ago, Sjakie said:

    Jan,

    -Is ER capable to let say report every hour the memory usage?

    I saw it is much higher as before, I know HC3 is working harder as before also.

    To sleep well I would like to report if it is > 65%

    - what to see in Crash notifyer if a QA restarts?

    I modified a QA and was witing to see the time trigger executed and it was restarting!

    Second time I have seen a QA restarting, in the morning I sometimes scroll in the debug windows up but didt see any restart.

    Also I dont know if I should worry if thats happening.

    - What I see know is HC3 runs very nice also thanks to your effort!

     (only need to tackle a few HTTP isues)

    Thanks for the service,

    //Sjakie

     

    Please login or register to see this code.

     

    CrashNotifier usually logs the error message - doesn't it show anything?

    Posted

    Jan, I didt see anything in crash notifyer what could be an error.

     

    <in Rule:5[@@01:00 & ram=api.get('/diagnostics').memory.used & ram > 65 => 2:msg=log('Ram u...]: {"msg":"Error executing instruction:'[\">\",2]'","err":".\/include\/EventRunner.lua:1483: attempt to compare number with nil","src":"Rule:5[@@01:00 & ram=api.get('\/diagnostics').memory.used & ram > 65 => 2:msg=log('Ram u...]","ERR":true>

     

    //Sjakie

     

     

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

     

    Please login or register to see this code.

     

    CrashNotifier usually logs the error message - doesn't it show anything?

    Sorry, '=' bind weaker than '>'

    Please login or register to see this code.

     

    Posted

    sorry Jan,

    [24.02.2021] [07:46:20] [ERROR] [QUICKAPP796]: main.lua:11: attempt to call a nil value (global 'rule')

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

    sorry Jan,

    [24.02.2021] [07:46:20] [ERROR] [QUICKAPP796]: main.lua:11: attempt to call a nil value (global 'rule')

    Do you use 'Rule.eval' or 'rule'? 

    function rule(...) return Rule.eval(...) end

    Posted

    Jan, this ist what I had in mind It gives every hour the value false, it doest give the actual value

    < rule("@@01:00 & ram=api.get('/diagnostics').memory.used  => 2:msg=log('Ram usage %s%%',ram)")>

    This is giving the actual value of ram.

    How to get the total?

    To make the picture complete how to get the up time of the HC3?

    Ram raise from 58% to 72% in 24 hours. Remark till today I created each day a backup after small modifications thats why I didt notice it.

    I hope it will stay around this size others next question will be how to restart HC3 lets say every day at 12:00.

    I dont want the size of memory as trigger I dont want restart if HC3 is in armed state.

    Thanks for your service,

    //Sjakie

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

    Jan, this ist what I had in mind It gives every hour the value false, it doest give the actual value

    < rule("@@01:00 & ram=api.get('/diagnostics').memory.used  => 2:msg=log('Ram usage %s%%',ram)")>

    This is giving the actual value of ram.

    How to get the total?

    To make the picture complete how to get the up time of the HC3?

    Ram raise from 58% to 72% in 24 hours. Remark till today I created each day a backup after small modifications thats why I didt notice it.

    I hope it will stay around this size others next question will be how to restart HC3 lets say every day at 12:00.

    I dont want the size of memory as trigger I dont want restart if HC3 is in armed state.

    Thanks for your service,

    //Sjakie

    I fixed that error in a previous answer by grouping the operators - please have a look at that again

    uptime is available at api.get("/settings/info").serverStatus

    Posted

    Jan,

    In scene HT  <self:debug(self:prettyJsonStruct(HT))>

     attempt to index a nil value (global 'self')

     

    How to convert uptime in dd-mm=yyyy?

    <rule("@@01:00 & upTime=api.get('/settings/info').serverStatus => 2:msg=log('upTime %s%%',upTime)")>

    Thanks in advance,

    //Sjakie

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

    Jan,

    In scene HT  <self:debug(self:prettyJsonStruct(HT))>

     attempt to index a nil value (global 'self')

    Only accessible from Lua.  Works outside rules but inside QuickApp:main()

     

    31 minutes ago, Sjakie said:

     

    How to convert uptime in dd-mm=yyyy?

    <rule("@@01:00 & upTime=api.get('/settings/info').serverStatus => 2:msg=log('upTime %s%%',upTime)")>

    Thanks in advance,

    //Sjakie

    rule("@@01:00 => log(osdate('Uptime %H:%M',api.get('/settings/info/').serverStatus))")

     

    Posted

    Jan,

    Truth or......

    [27.02.2021] [11:34:10] [TRACE] [QUICKAPP802]: Uptime 09:58

    With this rule but HC3 General:

    Please login or register to see this image.

    /monthly_2021_02/afbeelding.png.04d407ffdfdb64b016c3beb0d530d394.png" />

     

    //Sjakie

     

     

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

    Jan,

    Truth or......

    [27.02.2021] [11:34:10] [TRACE] [QUICKAPP802]: Uptime 09:58

    With this rule but HC3 General:

    Please login or register to see this link.

     

    //Sjakie

     

     

    They round it up?

    Posted

    Jan,

    Your rule says almost 10 hours so it had a restart at one o'clock in the night

    This morning I saw uptime 21 hours now 1 day could be correct.

    I check uptime each morning to see in relation with memory usage.

    Weird behaviour

    I will restart to see if it syncs

    in General 5 min

    Jan your rule counts??? 3hours in 5 min?

    [27.02.2021] [12:07:39] [TRACE] [QUICKAPP802]: Uptime 12:06

     

    Posted

    Jan I hope you can understand it.?

    after restart and restore

    [27.02.2021] [15:46:39] [TRACE] [QUICKAPP802]: Uptime 14:51

    I dont understand he is counting from  one o'clock in the night.

    Pull the power plug

    [27.02.2021] [15:52:25] [TRACE] [QUICKAPP802]: Uptime 15:50

    Do I have a real ghost in my box?

    Thanks in advanced,

    //Sjakie

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

    Jan I hope you can understand it.?

    after restart and restore

    [27.02.2021] [15:46:39] [TRACE] [QUICKAPP802]: Uptime 14:51

    I dont understand he is counting from  one o'clock in the night.

    Pull the power plug

    [27.02.2021] [15:52:25] [TRACE] [QUICKAPP802]: Uptime 15:50

    Do I have a real ghost in my box?

    Thanks in advanced,

    //Sjakie

    That is strange. I would assume the serverStatus was reset when you reboot the machine.

    For me the uptime is reset when I reboot the box. Just tried.

    The times you report is a bit strange also as it advances the time with ~1 hour when the logs reports ~6min...

    Posted

    Jan,

    Good morning, what I am doing wrong?

    I dont get a value

    < Util.defTriggerVar("kamerTemperatuur")
         rule("kamerTemperatuur=(woonKamer.rookMelderTemp:value+woonKamer.deurTemp:value)/2")
        Rule.eval([[@09:07 =>  log('kamer temperatuur %s °C',kamerTemperatuur:value) ]])>

     

    Thanks,

    //Sjakie

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

    Jan,

    Good morning, what I am doing wrong?

    I dont get a value

    < Util.defTriggerVar("kamerTemperatuur")
         rule("kamerTemperatuur=(woonKamer.rookMelderTemp:value+woonKamer.deurTemp:value)/2")
        Rule.eval([[@09:07 =>  log('kamer temperatuur %s °C',kamerTemperatuur:value) ]])>

    kamerTemperatuur is just a variable, not a device, so kamerTemperatuur:value doesn't make sense,

    log('kamer temperatuur %s °C',kamerTemperatuur) is the correct way.

     

    Posted

    Jan, Thanks now I see some degrees!

    Sometimes there is stilla problem with scene HT that it doest refresh or something there for it becomes handy if I can see the list in debug as it should be.

    Jan can you debug in room.device -IDno sorted by room  one item a line?

    Thanks,

    //Sjakie

    Posted

    Hello! I have 2 greenhouses, two greenhouses have 1 large roof that can be opened by a percentage through
    Roller Shutter 3, each greenhouse has 2 temperature sensors, and there is a large fan for two greenhouses connected via Smart Module ... when it is not too hot, simply opening the roof is enough ... if it is very hot, you need to close the roof and turn on the fan .
    Here is my management logic:

    --1) Open the roof of greenhouses by 50% (id = 650), if the average temperature of greenhouse-1 (id = 789) and greenhouse-2 (id = 803) is more than 24 degrees and if the status of the roof ($ Roof_GreHou = " Close ") and the rule will be valid 1 hour after sunrise and 1 hour before sunset, as well as send a log of all actions in the telegram-bot to users with id = 233 (user1) and id = 251 (user2), then:
    --1.1 If the variable wind force ($ Wind = OK), then open the roof (id = 650) only by 50%
    --1.2 If the variable wind force ($ Wind = OK) and the roof is open by 50% for 30 minutes and the average temperature (id = 789,803) is still high then open the roof (id = 650) by 100%
    --1.3 If the variable wind force ($ Wind = OK) and the roof is 100% open for 30 minutes and the average temperature (id = 789,803) is still high, then close the roof (id = 650) and turn on the large fan (id = 350 )

    --1.4 If the variable wind force ($ Wind = more_10m \ c) then open the roof only by 10% and warn about it.
    --1.5 If the variable wind force ($ Wind = more_10m \ c) and the roof is open by 10% and the average temperature (id = 789,803) is still high, then close the roof (id = 650) and turn on the large fan (id = 350)
    --1.6 If the wind force is more than 15 m \ s, do not open the roof and turn on the large fan (id = 350)
    --1.7 If the average temperature (id = 789,803) is less than or equal to the outdoor temperature (id = 838) within 10 minutes, close the roof.

     

     

    rule [[once (average ({789,803}: value)> 24) & $ Roof_GreHou == 'Close' & sunset + 01: 00..sunrise-01: 00 =>
    || $ Wind == 'OK' >> 650: value = 50; --1.1
    233 & 251: email = log ('The roof of greenhouses is raised by 50 %%, because t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789: value, 803: value)
    || $ Wind == 'OK' >> 650: value = 50> 30 * 60 & 650: value = 100; --1.2
    233 & 251: email = log ('The roof of greenhouses is raised by 100 %%, because it is hot and opening by 50 %% does not help, and t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789 : value, 803: value)
    || $ Wind == 'OK' >> 650: value = 100> 30 * 60 & 650: value = 0; 350: on; --1.3

    233 & 251: email = log ('We close the roof of greenhouses and turn on a large fan, because it is very hot and the open roof does not help, and in the greenhouse-2 =% s', 789: value, 803: value)
    || $ Wind == 'more_10m \ c' >> 650: value = 10; --1.4
    233 & 251: email = log ('The roof of greenhouses is raised only by 10 %%, because the wind force is more than 10m \ s, with t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789: value, 803: value)
    || $ Wind == 'more_10m \ c' >> 650: value = 10> 30 * 60 & 650: value = 0; 350: on; --1.5
    233 & 251: email = log ('We close the roof of greenhouses and turn on a large fan, because it is very hot, strong wind and open roof does not help, and in the greenhouse-2 =% s', 789: value, 803: value)
    || once ($ Wind == 'more_15m \ c') >> 350: on; --1.6

    233 & 251: email = log ('ATTENTION ATTENTION ATTENTION: the roof of greenhouses cannot be raised, because the wind force is more than 15m \ s, therefore we include the big fan, thus t ° in the greenhouse-1 =% s, and in the greenhouse-2 = % s', 789: value, 803: value)
    || (average ({789,803}: value) <= (838: value)> 10 * 60) >> 650: value = 0; --1.7
    233 & 251: email = log ('Temperature is normal, close the roof or turn off the fan, t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789: value, 803: value)
    ]])

     

    I don't know if I described the logic as a whole and if I described it correctly:
    the roof is 50% open for 30 minutes
    and whether paragraph 1.7 is correct

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

    Hello! I have 2 greenhouses, two greenhouses have 1 large roof that can be opened by a percentage through
    Roller Shutter 3, each greenhouse has 2 temperature sensors, and there is a large fan for two greenhouses connected via Smart Module ... when it is not too hot, simply opening the roof is enough ... if it is very hot, you need to close the roof and turn on the fan .
    Here is my management logic:

    --1) Open the roof of greenhouses by 50% (id = 650), if the average temperature of greenhouse-1 (id = 789) and greenhouse-2 (id = 803) is more than 24 degrees and if the status of the roof ($ Roof_GreHou = " Close ") and the rule will be valid 1 hour after sunrise and 1 hour before sunset, as well as send a log of all actions in the telegram-bot to users with id = 233 (user1) and id = 251 (user2), then:
    --1.1 If the variable wind force ($ Wind = OK), then open the roof (id = 650) only by 50%
    --1.2 If the variable wind force ($ Wind = OK) and the roof is open by 50% for 30 minutes and the average temperature (id = 789,803) is still high then open the roof (id = 650) by 100%
    --1.3 If the variable wind force ($ Wind = OK) and the roof is 100% open for 30 minutes and the average temperature (id = 789,803) is still high, then close the roof (id = 650) and turn on the large fan (id = 350 )

    --1.4 If the variable wind force ($ Wind = more_10m \ c) then open the roof only by 10% and warn about it.
    --1.5 If the variable wind force ($ Wind = more_10m \ c) and the roof is open by 10% and the average temperature (id = 789,803) is still high, then close the roof (id = 650) and turn on the large fan (id = 350)
    --1.6 If the wind force is more than 15 m \ s, do not open the roof and turn on the large fan (id = 350)
    --1.7 If the average temperature (id = 789,803) is less than or equal to the outdoor temperature (id = 838) within 10 minutes, close the roof.

     

     

    rule [[once (average ({789,803}: value)> 24) & $ Roof_GreHou == 'Close' & sunset + 01: 00..sunrise-01: 00 =>
    || $ Wind == 'OK' >> 650: value = 50; --1.1
    233 & 251: email = log ('The roof of greenhouses is raised by 50 %%, because t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789: value, 803: value)
    || $ Wind == 'OK' >> 650: value = 50> 30 * 60 & 650: value = 100; --1.2
    233 & 251: email = log ('The roof of greenhouses is raised by 100 %%, because it is hot and opening by 50 %% does not help, and t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789 : value, 803: value)
    || $ Wind == 'OK' >> 650: value = 100> 30 * 60 & 650: value = 0; 350: on; --1.3

    233 & 251: email = log ('We close the roof of greenhouses and turn on a large fan, because it is very hot and the open roof does not help, and in the greenhouse-2 =% s', 789: value, 803: value)
    || $ Wind == 'more_10m \ c' >> 650: value = 10; --1.4
    233 & 251: email = log ('The roof of greenhouses is raised only by 10 %%, because the wind force is more than 10m \ s, with t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789: value, 803: value)
    || $ Wind == 'more_10m \ c' >> 650: value = 10> 30 * 60 & 650: value = 0; 350: on; --1.5
    233 & 251: email = log ('We close the roof of greenhouses and turn on a large fan, because it is very hot, strong wind and open roof does not help, and in the greenhouse-2 =% s', 789: value, 803: value)
    || once ($ Wind == 'more_15m \ c') >> 350: on; --1.6

    233 & 251: email = log ('ATTENTION ATTENTION ATTENTION: the roof of greenhouses cannot be raised, because the wind force is more than 15m \ s, therefore we include the big fan, thus t ° in the greenhouse-1 =% s, and in the greenhouse-2 = % s', 789: value, 803: value)
    || (average ({789,803}: value) <= (838: value)> 10 * 60) >> 650: value = 0; --1.7
    233 & 251: email = log ('Temperature is normal, close the roof or turn off the fan, t ° in the greenhouse-1 =% s, and in the greenhouse-2 =% s', 789: value, 803: value)
    ]])

     

    I don't know if I described the logic as a whole and if I described it correctly:
    the roof is 50% open for 30 minutes
    and whether paragraph 1.7 is correct

    The exact logic I haven't tried to comprehend but there is a bug, to send email to 2 users do

    Please login or register to see this code.

     

    Posted

    Jan good morning,

    How to convert a post in time?

    I like to do:

    Rule.eval([[#rise is after sunrise => post(#openCurtain)]])

    Thanks for your time,

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