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

Hello,

Please bear with me as I'm discovering All-in-One. I must say I'm struggling a little bit but definitely keen to progress.

I wrotte the following 

{0,"`mPasserelle`",{state="value=true",lineState = {"`lPasserelle`:value=0"},trueAct={"`lPasserelle`","turnOn","","{&Jour_Nuit:value=Nuit}"},falseAct={"`lPasserelle`","turnOff","180"}}},

where

mPasserelle is a a fibaro motion sensor

lPasserelle is fibaro switch that trigger a light

&journuit is a variable that tells me if we're at night.

 

I'm trying to achieve the following: if a motion sensor detect a move, and that the light ( was not already lit up then lit it up... before swithing it off 3mn later. Doing so only at night (&Jour_Nuit:value=Nuit) 

In order to not switch it off if the light was already on, I'm trying to use the linestate condition but I'm struggling to get it work:whatever value I'm putting 0 or 1, it does switch the light on... even if was already on.

 

any idea what I'm doing wrong will be greatly appreciated... i spend a couple on hours on it... with no success;
Many thanks in advance.

Gael

 

 

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

    Last night they woke me up twice at2 and 4 o'clock.

    Selected time fa 08:00 to get those messages if event take place between 23:00-08:00

    //Sjakie

    You can disable alert messages (or to choose how to receive them) by setting false in

     

    eMail       = {true,"2"}  --Send alert to user IDs list. eMail={true,"2,5,20"}

    popupNote   = false -- if true, alert popup notification will send to all users 

    pushNote    = {false,"2"}  -- if true, alerts interactive push notification will send

     

    That's my setup, receive alerts by email only.

    1 hour ago, GaelP said:

    Hello,

    Please bear with me as I'm discovering All-in-One. I must say I'm struggling a little bit but definitely keen to progress.

    I wrotte the following 

    {0,"`mPasserelle`",{state="value=true",lineState = {"`lPasserelle`:value=0"},trueAct={"`lPasserelle`","turnOn","","{&Jour_Nuit:value=Nuit}"},falseAct={"`lPasserelle`","turnOff","180"}}},

    where

    mPasserelle is a a fibaro motion sensor

    lPasserelle is fibaro switch that trigger a light

    &journuit is a variable that tells me if we're at night.

     

    I'm trying to achieve the following: if a motion sensor detect a move, and that the light ( was not already lit up then lit it up... before swithing it off 3mn later. Doing so only at night (&Jour_Nuit:value=Nuit) 

    In order to not switch it off if the light was already on, I'm trying to use the linestate condition but I'm struggling to get it work:whatever value I'm putting 0 or 1, it does switch the light on... even if was already on.

     

    any idea what I'm doing wrong will be greatly appreciated... i spend a couple on hours on it... with no success;
    Many thanks in advance.

    Gael

     

     

    Fibaro switch uses value true or false (not 0 or 1).  Please change

     {"`lPasserelle`:value=false"}

     

    By the way for dimmers use value of 0 or  > 0

    Going forward, you can always to verify what kind of value has a device by API

    http://<HC-IP>/api/devices/<DEV_ID>

    See properties section...

    Edited by cag014
    Posted (edited)
    On 11/3/2020 at 10:49 AM, Rover said:

    Please login or register to see this spoiler.

    Hi @cag014, please have a look at it.

     

     

    Edited by Rover
  • Topic Author
  • Posted (edited)
    21 minutes ago, Rover said:

    Hi @cag014, please have a look at it.

     

     

    It should be lowercase and  not AND. Always has been like that.

    @Rover

    Have changed the entire scanning engine to get rid of delays...

    Please try (might be some bugs). Please don't use any slaves, it should work directly.

     

     

    Please login or register to see this attachment.

    Edited by cag014
    Posted
    6 hours ago, cag014 said:

    It should be lowercase and  not AND. Always has been like that.

    @Rover

    Have changed the entire scanning engine to get rid of delays...

    Please try (might be some bugs). Please don't use any slaves, it should work directly.

     

     

    Please login or register to see this attachment.

    So you mean all devices <device>'hc2 and stop all slaves, or delete all slaves, or simple use only <device>'hc2 and let all slaves active without use?

    Posted
    11 hours ago, cag014 said:

    By the way for dimmers use value of 0 or  > 0

    Going forward, you can always to verify what kind of value has a device by API

    http://<HC-IP>/api/devices/<DEV_ID>

    See properties section...

     

    Many thank Cag. I'll give it a try this evening when I'm back from work :-)

     

    Posted (edited)

    Good Morning everyone,

    I have a newbie quesiton regarding slave. I'm a bit confused on how to use them in the all-in-one qa.

     

    - I have added a slaveswitch qa (id on the remote HC:46, id of the slave device:489): this works perfectly fine. I can switch it on & off manually and can use it as a local device in the all-in-one qa by declaring it in jS2n like any local device by refering to his slave device id: "lBatisseExt=489"    

     

    - Having said that, if I try to access it through his remote id, it does not work. It seems it does not recognise the device as a  switch:

    jSlave={ 

        hcb={user="admin",passwd="xxxx",ip="192.168.1.4"}

     

    jS2n={

    lBatisseExt="46'hcb"

     

    jM

    {2,"$blank",{onClock=true, timeLoopAct={"`lBatisseExt`","turnOff"}}}, 

     

    Result:

    [09.11.2020] [10:59:22] [DEBUG] [AOQ483]: ☠ [09 Nov 10:59:21] /opt/fibaro/AOQ483.jM hash table:11:~:
    {2,"$blank",{"timeLoopAct"={"46'hcb","turnOff",""},"onClock"=true}}

    (8) Action 'turnOff' not found for ID(46'hcb) Supported actions:

    `lBatisseExt`Bâtisse Extérieur:46'hcb:Bâtisse Extérieur Device's actions are:
    -
    AOQ Supported Actions: (13% in use)
    - addRmd armAlarm delAllRmd delLogRmd delRmd disableScene
    - disarmAlarm emitEvent enableScene killScene logRmd poll
    - powerOutage pressButton reboot rptAction runAction sendEmail
    - sendNote sendPush sendSms sendiPush setColor setConfiguration
    - setGlobal setProfile setRmd setSlider setState setStateDelay
    - setStateFormula setStateValue setTimeDrift setTimeSlot setTimeSpan setValue
    - shutdown startScene tts turnOff turnOn vacOff
    - vacOn verify

    [09.11.2020] [10:59:22] [ERROR] [QUICKAPP483]: QuickApp crashed

    [09.11.2020] [10:59:22] [ERROR] [QUICKAPP483]: main.lua:319: attempt to call a nil value (method 'stop')

     

    Edited by GaelP
    Posted

    hi @cag014,

    I got this email twice: 

     

    All-in-One-2 Report (wakeUp)

    Device 23: TestLicht @ KamerHans is wake up Event history: [unplugged 09 Nov 11:36,nack 09 Nov 11:36,wkUp 09 Nov 11:42]

     

    What does it mean and why did I got this two emails?

  • Topic Author
  • Posted (edited)
    2 hours ago, Rover said:

    So you mean all devices <device>'hc2 and stop all slaves, or delete all slaves, or simple use only <device>'hc2 and let all slaves active without use?

    Yes, use <device>'hc2. I suggest to stop/delete slave devices in order to reduce extra load on HC2.

    12 minutes ago, Rover said:

    hi @cag014,

    I got this email twice: 

     

    All-in-One-2 Report (wakeUp)

    Device 23: TestLicht @ KamerHans is wake up Event history: [unplugged 09 Nov 11:36,nack 09 Nov 11:36,wkUp 09 Nov 11:42]

     

    What does it mean and why did I got this two emails?

    Any change in number of alerted devices, email generated. Are you sure it's exactly the same email?

    58 minutes ago, GaelP said:

    Good Morning everyone,

    I have a newbie quesiton regarding slave. I'm a bit confused on how to use them in the all-in-one qa.

     

    - I have added a slaveswitch qa (id on the remote HC:46, id of the slave device:489): this works perfectly fine. I can switch it on & off manually and can use it as a local device in the all-in-one qa by declaring it in jS2n like any local device by refering to his slave device id: "lBatisseExt=489"    

     

    - Having said that, if I try to access it through his remote id, it does not work. It seems it does not recognise the device as a  switch:

    jSlave={ 

        hcb={user="admin",passwd="xxxx",ip="192.168.1.4"}

     

    jS2n={

    lBatisseExt="46'hcb"

     

    jM

    {2,"$blank",{onClock=true, timeLoopAct={"`lBatisseExt`","turnOff"}}}, 

     

    Result:

    [09.11.2020] [10:59:22] [DEBUG] [AOQ483]: ☠ [09 Nov 10:59:21] /opt/fibaro/AOQ483.jM hash table:11:~:
    {2,"$blank",{"timeLoopAct"={"46'hcb","turnOff",""},"onClock"=true}}

    (8) Action 'turnOff' not found for ID(46'hcb) Supported actions:

    `lBatisseExt`Bâtisse Extérieur:46'hcb:Bâtisse Extérieur Device's actions are:
    -
    AOQ Supported Actions: (13% in use)
    - addRmd armAlarm delAllRmd delLogRmd delRmd disableScene
    - disarmAlarm emitEvent enableScene killScene logRmd poll
    - powerOutage pressButton reboot rptAction runAction sendEmail
    - sendNote sendPush sendSms sendiPush setColor setConfiguration
    - setGlobal setProfile setRmd setSlider setState setStateDelay
    - setStateFormula setStateValue setTimeDrift setTimeSlot setTimeSpan setValue
    - shutdown startScene tts turnOff turnOn vacOff
    - vacOn verify

    [09.11.2020] [10:59:22] [ERROR] [QUICKAPP483]: QuickApp crashed

    [09.11.2020] [10:59:22] [ERROR] [QUICKAPP483]: main.lua:319: attempt to call a nil value (method 'stop')

     

    Are you sure that the line looks exactly as you posted?

    {2,"$blank",{"timeLoopAct"={"46'hcb","turnOff",""},"onClock"=true}}

     

    It's an error... timeLoopAct should be a table not a string... same for onClock, should be a parameter not a string.

    {2,"$blank",{timeLoopAct={"46'hcb","turnOff",""},onClock=true}}

     

    and yes, you can define in Lua parameter using string format, but this is the syntax for that:

    {2,"$blank",{["timeLoopAct"]={"46'hcb","turnOff",""},["onClock"]=true}}

    Edited by cag014
    Posted (edited)
    21 minutes ago, cag014 said:
    28 minutes ago, Rover said:

    I got this email twice: 

     

    All-in-One-2 Report (wakeUp)

    Device 23: TestLicht @ KamerHans is wake up Event history: [unplugged 09 Nov 11:36,nack 09 Nov 11:36,wkUp 09 Nov 11:42]

     

    What does it mean and why did I got this two emails?

    Any change in number of alerted devices, email generated. Are you sure it's exactly the same email?

    It is only one (HC3-)device 23, 2 emails.

    Now I saw also 2 emails a few minutes before: 

    All-in-One-1 Alert (Dead)

    Device 23: TestLicht @ KamerHans is dead Event history: [nack 09 Nov 11:36,unplugged 09 Nov 11:36]

    Yes it was exactly the same email (twice).

    21 minutes ago, cag014 said:

    Yes, use <device>'hc2. I suggest to stop/delete slave devices in order to reduce extra load on HC2.

    So it means that these devices are not visible anymore in the alarm zones? That is the only reason I use slaves...

    BTW this morning I have added (from 2 before) all the D/W sensor slaves to the alarm zones and now arming gets very fast, without repeated verifying ?.

    Edited by Rover
  • Topic Author
  • Posted
    11 minutes ago, Rover said:

    It is only one (HC3-)device 23, 2 emails.

    Now I saw also 2 emails a few minutes before: 

    All-in-One-1 Alert (Dead)

    Device 23: TestLicht @ KamerHans is dead Event history: [nack 09 Nov 11:36,unplugged 09 Nov 11:36]

    Yes it was exactly the same email (twice).

    So it means that these devices are not visible anymore in the alarm zones? That is the only reason I use slaves...

    BTW this morning I have added (from 2 before) all the D/W sensor slaves to the alarm zones and now arming gets very fast, without repeated verifying ?.

    What I meant that you don't need to use slaves to reduce delays... you can use slaves as much as needed, don't think now it matters...

    Posted (edited)

    I may have created confusion by copying the output of the debug window which is where you see the line formated this way:  9.11.2020] [10:59:22] [DEBUG] [AOQ483]: ☠ [09 Nov 10:59:21] /opt/fibaro/AOQ483.jM hash table:11:~:{2,"$blank",{"timeLoopAct"={"46'hcb","turnOff",""},"onClock"=true}}

     

    In the actual Jm, the syntax is correct: {2,"$blank",{onClock=true, timeLoopAct={"46'hcb","turnOn"}}}, 

     

    I have done the following test:

    if I use {2,"$blank",{onClock=true, timeLoopAct={"489","turnOn"}}}, 

    -> works (the slave device 489 is defined as "device=46 " in the user data of the slavedevice.)

     

    but if I use {2,"$blank",{onClock=true, timeLoopAct={"46'hcb","turnOn"}}}, 

    -> does not work. it returns in the debug window

    "

    2,"$blank",{"timeLoopAct"={"46'hcb","turnOn",""},"onClock"=true}}
    (8) Action 'turnOn' not found for ID(46'hcb) Supported actions:
    Bâtisse Extérieur:46'hcb:Bâtisse Extérieur Device's actions are:
    AOQ Supported Actions: (13% in use)
    - addRmd armAlarm delAllRmd delLogRmd delRmd disableScene
    - disarmAlarm emitEvent enableScene killScene logRmd p 

     

    and then it crash with "main.lua:319: attempt to call a nil value (method 'stop')

     

    I'm sure I'm doing smthg stupid but can't figure it out….

     

     

    Edited by GaelP
  • Topic Author
  • Posted
    35 minutes ago, GaelP said:

    I may have created confusion by copying the output of the debug window which is where you see the line formated this way:  9.11.2020] [10:59:22] [DEBUG] [AOQ483]: ☠ [09 Nov 10:59:21] /opt/fibaro/AOQ483.jM hash table:11:~:{2,"$blank",{"timeLoopAct"={"46'hcb","turnOff",""},"onClock"=true}}

     

    In the actual Jm, the syntax is correct: {2,"$blank",{onClock=true, timeLoopAct={"46'hcb","turnOn"}}}, 

     

    I have done the following test:

    if I use {2,"$blank",{onClock=true, timeLoopAct={"489","turnOn"}}}, 

    -> works (the slave device 489 is defined as "device=46 " in the user data of the slavedevice.)

     

    but if I use {2,"$blank",{onClock=true, timeLoopAct={"46'hcb","turnOn"}}}, 

    -> does not work. it returns in the debug window

    "

    2,"$blank",{"timeLoopAct"={"46'hcb","turnOn",""},"onClock"=true}}
    (8) Action 'turnOn' not found for ID(46'hcb) Supported actions:
    Bâtisse Extérieur:46'hcb:Bâtisse Extérieur Device's actions are:
    AOQ Supported Actions: (13% in use)
    - addRmd armAlarm delAllRmd delLogRmd delRmd disableScene
    - disarmAlarm emitEvent enableScene killScene logRmd p 

     

    and then it crash with "main.lua:319: attempt to call a nil value (method 'stop')

     

    I'm sure I'm doing smthg stupid but can't figure it out….

     

     

    Just to make sure that in jSlave you do use admin or other user that has access to device?

    Could you please post API of this device?

    http://192.1681.4/api/devices/46

    Posted

    Please login or register to see this code.

    jSlave={ 

        hcb={user="admin",passwd="xxx",ip="192.168.1.4"}, 

    Please login or register to see this code.

    Posted
    11 hours ago, cag014 said:

    It should be lowercase and  not AND. Always has been like that.

    @Rover

    Have changed the entire scanning engine to get rid of delays...

    Please try (might be some bugs). Please don't use any slaves, it should work directly.

     

     

    Please login or register to see this attachment.

    Please login or register to see this spoiler.

     

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

    Please login or register to see this code.

    jSlave={ 

        hcb={user="admin",passwd="xxx",ip="192.168.1.4"}, 

    Please login or register to see this code.

    According to that AOQ is correct! There is no actions for the device!? (see marked red). What is that device?

    Could you post how it looks in UI (icon), is there buttons on/off?

     

     

  • Topic Author
  • Posted
    36 minutes ago, Rover said:

    Please login or register to see this spoiler.

    Forgot about alarm property...

     

    Please login or register to see this attachment.

    Posted

    This is really weird, this is a FS221. migrated from an HC2 to an HC3 using the HC3 migration tool. 

    In the 192.168.1.4 gateways, the device does show a power off /power on button that works fine to on or off the light manually. 

    weird as well is that slave qa that refer to this device does work well.

     

    on the 192.168.1.4, I looked at the api of a few other device that were imported as well: same no actions listed.

    I'll try to forget an reinclude the device and will report.

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

    This is really weird, this is a FS221. migrated from an HC2 to an HC3 using the HC3 migration tool. 

    In the 192.168.1.4 gateways, the device does show a power off /power on button that works fine to on or off the light manually. 

    weird as well is that slave qa that refer to this device does work well.

     

    on the 192.168.1.4, I looked at the api of a few other device that were imported as well: same no actions listed.

    I'll try to forget an reinclude the device and will report.

    OK.

    In any case AOQ has an workaround for that (add + before command)

    {2,"$blank",{onClock=true, timeLoopAct={"46'hcb","+turnOn"}}}, 

    But using workaround AOQ can't verify validity of the command and execution.

    Posted

    Thanks for pointing me in the right direction!

     

    The issue was with the device configuration which was corrupted during the automatic migration from the HC2 to my 2nd HC3. I used the Fibaro migration tool that avoid to reinclude all module… but clearly there is an important issue with this tool as the device configuration seems to get corrupted as all devices shows no action through the api.

     

    I manually reconfigured the device -did not have to exclude / reinclude-: it did allocate a new ID to the device but at least now the API shows the correct list of actions and the AIO works as expected. 

    Result of the api query(94 is the new ID for 46):

    {"id":94,"name":"Batisse Potelet","roomID":222,"view":[{"assetsPath":"/dynamic-plugins/com.fibaro.binarySwitch/assets",...….actions":{"reconfigure":0,"toggle":0,"turnOff":0,"turnOn":0},"created":1604934655,"modified":1604934655,"sortOrder":51}}

     

    By the way do you recommand to create the device using the slave qa and then to refer to them in AIO as if they were local device or to not create them but use the "deviceid'hcl"  approach in AIO?

     

    really thanks for taking the time to help me out: clearly the issue was not related to AIO but to Fibaro HC3 migration tool. I'll reconfigure my other device and this should then be ok. 

     

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