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
4 godziny temu, jgab napisał:

 

Alternatively

Please login or register to see this code.

 

 

rule([[swiatlopilotkuchnia:central.keyId==1 =>

       local attr = swiatlopilotkuchnia:central.keyAttribute;

       || attr=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1}:on

       || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off

       || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off

       || attr=='Pressed2' & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on

       || attr=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on

 ]])

 

What is wrong? can't see it from debug:

 

[ERROR] [QUICKAPP453]: Error in 'swiatlopilotkuchnia:central.keyId==1         local attr = swiatlopilotkuchnia:central.keyAttribute;        || attr=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1}:on        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off        || attr=='Pressed2' & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on        || attr=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on  ': ./include/EventRunner.lua:1255: Parser error char 176 ('=>') in expression 'swiatlopilotkuchnia:central.keyId==1         local attr = swiatlopilotkuchnia:central.keyAttribute;        || attr=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1}:on        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off        || attr=='Pressed2' & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on        || attr=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on  ' (./include/EventRunner.lua:994: attempt to index a nil value (field '?'))

 

 

Posted

And one more question, how to set color and brightness of rgbw module in rule?

  • Topic Author
  • Posted
    9 hours ago, michal85pl said:

     

    rule([[swiatlopilotkuchnia:central.keyId==1 =>

           local attr = swiatlopilotkuchnia:central.keyAttribute;

           || attr=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1}:on

           || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off

           || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off

           || attr=='Pressed2' & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on

           || attr=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on

     ]])

     

    What is wrong? can't see it from debug:

     

    [ERROR] [QUICKAPP453]: Error in 'swiatlopilotkuchnia:central.keyId==1         local attr = swiatlopilotkuchnia:central.keyAttribute;        || attr=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1}:on        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off        || attr=='Pressed2' & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on        || attr=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on  ': ./include/EventRunner.lua:1255: Parser error char 176 ('=>') in expression 'swiatlopilotkuchnia:central.keyId==1         local attr = swiatlopilotkuchnia:central.keyAttribute;        || attr=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1}:on        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off        || attr=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off        || attr=='Pressed2' & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on        || attr=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on  ' (./include/EventRunner.lua:994: attempt to index a nil value (field '?'))

    The construct looks like

    ıı <test> >> <action>

    ıı <test> >> <action>

    ıı <test> >> <action>

     

    You have. used => instead of >>

    See my original example.

     

    ıı <test> >> <action>

    ıı <test> >> <action>

     

    is a short form for writing

    if <test> then <action>

    elseif <test> then <action>

    elseif ...

    9 hours ago, michal85pl said:

    And one more question, how to set color and brightness of rgbw module in rule?

    I don't have a RGB module but I think that

    rule("rgbID:color={99,0,0,0}")

    should work

    • Thanks 1
    Posted

    Jan,

    Thanks for your support and time!

    First time I see this simular on slow mailbox?

    What can I do to solve?

    The morning programm didt start.

    //Sjakie

  • Topic Author
  • Posted
    Just now, Sjakie said:

    Jan,

    Thanks for your support and time!

    First time I see this simular on slow mailbox?

    What can I do to solve?

    The morning programm didt start.

    //Sjakie

    HC2 or HC3?

    Posted

    Jan,

    Happenly HC3

    Processors are going sky high since last night before around 10-30%

    new error end of file

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

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

    Jan,

    Happenly HC3

    Processors are going sky high since last night before around 10-30%

    new error end of file

    Please login or register to see this attachment.

     

    Yes, your system is so overloaded that it starts to malfunction.

    The particular error indicates that an API call failed, it will try to recover, but it's obviously bad.

    How many QAs do you have on the HC3?

    How many ER4 QAs?

    Any other QAs? Sonos, Hue etc?

    Any scenes?

    Posted

    Jan,

    I am overloaded too! (Hehe)

    Yesterday evening running30%

    API call is my old scene in QA heater web.get I gues.

    ER QA's 24 just deleted 8 pieces brought CPU back to normal >>in proces of combining.

    Remark QA was empty on main.

    HUE your QA, IOS Locator, Telegram

    Weather OWM,

    Sonos(Krikroff),>>removed

    Scenes 6 >> 4 active

    //Sjakie

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

    Jan,

    I am overloaded too! (Hehe)

    Yesterday evening running30%

    API call is my old scene in QA heater web.get I gues.

    ER QA's 24 just deleted 8 pieces brought CPU back to normal >>in proces of combining.

    Remark QA was empty on main.

    HUE your QA, IOS Locator, Telegram

    Weather OWM,

    Sonos(Krikroff),>>removed

    Scenes 6 >> 4 active

    //Sjakie

    You shouldn't need 24 ER4 QAs...

    I use 3+1

    Lights QA, Alarms QA, Presence QA, + test QA

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

    You shouldn't need 24 ER4 QAs...

    I use 3+1

    Lights QA, Alarms QA, Presence QA, + test QA

    The other thing that may create spikes in CPU for you is that there seems to be an issue with QAs that does http requests to external devices (telegram, sonos, hue etc) and the requests fails for some reason. It has been reported in other posts in the forum ( @10der). If your QAs make heavy use of such QAs and they have (network) issues it may affect your HC3.

    It's a guess but it could be an explanation for your problems.

    Hopefully we will see a fixes and stability improvements for the HC3.

    Posted

    Jan,

    Its also a left over from the problems I had with hue in HC2 3QA's now

    I started yesterday to combine will continue today to bring the number of QA's back.

    Those who are not in use at this moment I will delete (Telegram and IOS).

    Can you be so kind to translate my heater from HC2 >> QA so that API call error can be eleiminated, I tryed yesterday several hours to fix but no luck.

    Thanks again for your service exelence!!

     

    //Sjakie

    Posted

    Jan,

    Cleaned all QA's and removed all web.get stuff >> need to be fixed later.

    Deleted all QA's and CPU was 10-30%

    Upload QA and saw error from deleted QA's>>stopped HC3 and after restart gone.>>ok

    10 QA ER now will be later reduced  to 6/7 or even 4 if all QS's running well.

    One QA OWM and Children of HUE.

    CPU 0-30% peak 60-100% every 2 min

    To fix my curtains can you please make  a rule to witdraw value of clouds?

    I have given it a try but I cant get it work

    local clouds = tostring(fibaro.getValue(810, "value"))

    fibaro.debug("Clouds: ", clouds)

    Rule.eval([[.......& (clouds:value=<85 & clouds:value= <=100 => action]])

     

    Thanks in advance for the quick and excellent support!!!?

    //Sjakie

    Posted

    PS

    I use clouds % to operate curtains.

    My outside Lux devices arent relayable>> one is already broaken the 2nd  fa jumped ar 11:00 o'clock from 9 to 467 lux.

    Curtain are suposed to open around 40lux.

     

     

    Posted
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & {swiatlokuchnia1,swiatlokuchnia2}:isOff => {swiatlokuchnia1}:on]])
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off]]) 
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & {swiatlokuchnia1,swiatlokuchnia2}:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off]])
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed2' & {swiatlokuchnia1,swiatlokuchnia2}:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on]])
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on]])
     
    Yesterday everything was working fine, I've got four sets of such a rules for different switches. Today, single press of a button causes weird behavior (couple times turns on and of light)restart of QA or HC3 does't help, any ideas?
     
     
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: Incoming trigger:{"value":{"keyId":1,"keyAttribute":"Pressed"},"property":"centralSceneEvent","id":479,"type":"device"}
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: Incoming trigger:{"value":{"keyId":1,"keyAttribute":"Pressed"},"property":"centralSceneEvent","id":480,"type":"device"}
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: [false]>>'Rule:19[swiatlopilotkuchnia:central.keyId==2 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: [false]>>'Rule:20[swiatlopilotkuchnia:central.keyId==2 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnialed:isOn => swiatlokuchnialed:off...]'[
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: [true]>>'Rule:21[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOn") => nil
    [06.01.2021] [[17:18:14] [DEBUG] [QUICKAPP453]: [true]>>'Rule:22[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil
    [06.01.2021] [[17:18:14] [DEBUG] [QUICKAPP453]: Incoming trigger:{"property":"centralSceneEvent","value":{"keyId":1,"keyAttribute":"Pressed"},"id":479,"type":"device"}
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: Incoming trigger:{"property":"centralSceneEvent","value":{"keyId":1,"keyAttribute":"Pressed"},"id":480,"type":"device"}
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:23[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:24[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [true]>>'Rule:19[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:25[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOn") => nil
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:20[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [true]>>'Rule:21[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil[
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: fibaro.call(482,"turnOff") => nil
  • Topic Author
  • Posted
    15 hours ago, michal85pl said:
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & {swiatlokuchnia1,swiatlokuchnia2}:isOff => {swiatlokuchnia1}:on]])
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia1}:off]]) 
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & {swiatlokuchnia1,swiatlokuchnia2}:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off]])
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed2' & {swiatlokuchnia1,swiatlokuchnia2}:isOff => {swiatlokuchnia1,swiatlokuchnia2}:on]])
    rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed2' & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => {swiatlokuchnia2}:on]])
     
    Yesterday everything was working fine, I've got four sets of such a rules for different switches. Today, single press of a button causes weird behavior (couple times turns on and of light)restart of QA or HC3 does't help, any ideas?
     
     
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: Incoming trigger:{"value":{"keyId":1,"keyAttribute":"Pressed"},"property":"centralSceneEvent","id":479,"type":"device"}
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: Incoming trigger:{"value":{"keyId":1,"keyAttribute":"Pressed"},"property":"centralSceneEvent","id":480,"type":"device"}
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: [false]>>'Rule:19[swiatlopilotkuchnia:central.keyId==2 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: [false]>>'Rule:20[swiatlopilotkuchnia:central.keyId==2 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnialed:isOn => swiatlokuchnialed:off...]'[
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: [true]>>'Rule:21[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOn") => nil
    [06.01.2021] [[17:18:14] [DEBUG] [QUICKAPP453]: [true]>>'Rule:22[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:14] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil
    [06.01.2021] [[17:18:14] [DEBUG] [QUICKAPP453]: Incoming trigger:{"property":"centralSceneEvent","value":{"keyId":1,"keyAttribute":"Pressed"},"id":479,"type":"device"}
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: Incoming trigger:{"property":"centralSceneEvent","value":{"keyId":1,"keyAttribute":"Pressed"},"id":480,"type":"device"}
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:23[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:24[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [true]>>'Rule:19[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:25[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOn") => nil
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [false]>>'Rule:20[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: [true]>>'Rule:21[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil[
    [06.01.2021] [17:18:15] [DEBUG] [QUICKAPP453]: fibaro.call(482,"turnOff") => nil

     

    Update to fix42 that I just uploaded and see if it improves.

    I'm not really sure what's going on but I've rolled back my previous update

    Posted
    3 godziny temu, jgab napisał:

     

    Update to fix42 that I just uploaded and see if it improves.

    I'm not really sure what's going on but I've rolled back my previous update

    It didn't resolve the problem...

     

     

    swiatlokuchnia1 = 481,
    swiatlokuchnia2 = 482,

     

    rule#19 rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & {swiatlokuchnia1,swiatlokuchnia2}:isOff => swiatlokuchnia1:on]])
    rule#20 rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => swiatlokuchnia1:off]])

    rule#21 rule([[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=='Pressed'  & {swiatlokuchnia1,swiatlokuchnia2}:isOn => {swiatlokuchnia1,swiatlokuchnia2}:off]])

     

    1x Click

     

    [07.01.2021] [13:04:55] [DEBUG] [QUICKAPP453]: [true]>>'Rule:19[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [07.01.2021] [13:04:55] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOn") => nil
    [07.01.2021] [13:04:55] [DEBUG] [QUICKAPP453]: [true]>>'Rule:20[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [07.01.2021] [13:04:55] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil
    [07.01.2021] [13:04:55] [DEBUG] [QUICKAPP453]: [true]>>'Rule:21[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [07.01.2021] [13:04:56] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil
    [07.01.2021] [13:04:56] [DEBUG] [QUICKAPP453]: fibaro.call(482,"turnOff") => nil

     

    --------

     

     swiatlostol1 = 486,
     swiatlostol2 = 487,

     

    ryle#7 rule([[swiatlopilotsalon:central.keyId==2 & swiatlopilotsalon:central.keyAttribute=='Pressed' & swiatlostol1:isOff & swiatlostol2:isOff => swiatlostol1:on]])
    rule#8 rule([[swiatlopilotsalon:central.keyId==2 & swiatlopilotsalon:central.keyAttribute=='Pressed' & swiatlostol1:isOn & swiatlostol2:isOff => swiatlostol1:off]])

     

    1xClick

     

    [07.01.2021] [13:05:15] [DEBUG] [QUICKAPP453]: [true]>>'Rule:7[swiatlopilotsalon:central.keyId==2 & swiatlopilotsalon:central.keyAttribute=='Pr...]'

    [07.01.2021] [13:05:15] [DEBUG] [QUICKAPP453]: fibaro.call(486,"turnOn") => nil

    [07.01.2021] [13:05:15] [DEBUG] [QUICKAPP453]: [true]>>'Rule:8[swiatlopilotsalon:central.keyId==2 & swiatlopilotsalon:central.keyAttribute=='Pr...]'

    [07.01.2021] [13:05:15] [DEBUG] [QUICKAPP453]: fibaro.call(486,"turnOff") => nil

    Posted

    Reinstalling ER4 QA did't help...

  • Topic Author
  • Posted (edited)
    3 hours ago, michal85pl said:

    Reinstalling ER4 QA did't help...

    These 2 rules can trigger at the same time

    Please login or register to see this code.

     

    {swiatlokuchnia1,swiatlokuchnia2}:isOn is true if both or one of the lights/switches are on.

    The logic is that if you test a number of lights in a room, the room is considered light if at least one light is on.

    Opposite, :isOff is only true if all lights(sensor are off.

     

    To test if all is on you can use

    {swiatlokuchnia1,swiatlokuchnia2}:isAllOn

    Edited by jgab
    Posted

     

    15 minut temu, jgab napisał:

    These 2 rules can trigger at the same time

    Please login or register to see this code.

     

    {swiatlokuchnia1,swiatlokuchnia2}:isOn is true if both or one of the lights/switches are on.

    The logic is that if you test a number of lights in a room, the room is considered light if at least one light is on.

    Opposite, :isOff is only true if all lights(sensor are off.

     

    To test if all is on you can use

    {swiatlokuchnia1,swiatlokuchnia2}:isAllOn

    I've changed it to:

     

    rule([[pilotkuchnia:central.keyId==1 & pilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnia1:isOff & swiatlokuchnia2:isOff => swiatlokuchnia1:on]])

    rule([[pilotkuchnia:central.keyId==1 & pilotkuchnia:central.keyAttribute=='Pressed'  & swiatlokuchnia1:isOn & swiatlokuchnia2:isOff => swiatlokuchnia1:off]])

     

    and also tried isAllOn, and it resolved this :

     

    [07.01.2021] [13:04:55] [DEBUG] [QUICKAPP453]: [true]>>'Rule:21[swiatlopilotkuchnia:central.keyId==1 & swiatlopilotkuchnia:central.keyAttribute=...]'
    [07.01.2021] [13:04:56] [DEBUG] [QUICKAPP453]: fibaro.call(481,"turnOff") => nil
    [07.01.2021] [13:04:56] [DEBUG] [QUICKAPP453]: fibaro.call(482,"turnOff") => nil

     

    but there's still main problem:

     

    [07.01.2021] [16:52:13] [DEBUG] [QUICKAPP615]: [true]>>'Rule:16[pilotkuchnia:central.keyId==1 & pilotkuchnia:central.keyAttribute=='Pressed'  & ...]'
    [07.01.2021] [16:52:13] [DEBUG] [QUICKAPP615]: fibaro.call(481,"turnOn") => nil
    [07.01.2021] [16:52:14] [DEBUG] [QUICKAPP615]: [true]>>'Rule:17[pilotkuchnia:central.keyId==1 & pilotkuchnia:central.keyAttribute=='Pressed'  & ...]'
    [07.01.2021] [16:52:14] [DEBUG] [QUICKAPP615]: fibaro.call(481,"turnOff") => nil

     

     

  • Topic Author
  • Posted (edited)

    This is fun

    Please login or register to see this code.

    When the first rule triggers is turns on swiatlokuchnia1

    Then when the second rule is tried, swiatlokuchnia1 is on...

     

    2 ways around this

    Please login or register to see this code.

    because || >> is. like if-then-elseif-then-... it will only run the rule that matches

     

    Other approach is to add a break at the end of the first rule. A break menas that it will not try any other rules that matches

    Please login or register to see this code.

     

    Edited by jgab
    • Thanks 1

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