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

    I don't see setBrightness in device's action list!?

    SInce I don't have Hue lights device, could you please post standard fibaro command that you're useing?

    fibaro:call(818," ? ")

    thanks

  • Topic Author
  • Posted

    I have installed Hue plugin, but in device properties "parentId:0" while in your example "parentId: 817"

    What plugin you use?

    Posted

    i use the standard fibaro hue plugin and command is changeBrightness ( it works in a lua scene i used before aio setup).

     

    Please remeber that you suggested me two modifications in aio:

    1)in line 447

    Please login or register to see this code.

    cause on startup-hue device returns null value

    2)somewhere around  line 1008

     if j.parentId>1 or j.remoteGatewayId>0 then jDlist["numDev"]=jDlist["numDev"]+1;jDlist[j.id]=j.properties.nodeId;jDlist["nId"..jDlist[j.id]]=os_time()

    to use slave gateway devices

     

  • Topic Author
  • Posted

    That's OK.

    But looking on device actions "setBrightness" is not in the list.

    Another issue, this Hue device doesn't look like salve. is it slave device?

    Please post the command that you have used in Lua scenes.

    I have tried fibaro:call(<ID>, "setBrightness",255) and it doesn't work in lua scene?

    Posted

    Command is changebrightness,sorry.

     

    If you mean device bond to’ slave gateway no, it’ s on primary. Or  i i misunderstood your question...

  • Topic Author
  • Posted (edited)

    same

    fibaro:call(<id>,"changebrightness",255) doesn't work.

    Maybe you're using Virtual device to control Hue?

     

    I have tried to include plugin Hue several times and always the paerntId=0.

    Could you please post device 817 properties (he is the parent of 818)?

     

    Edited by cag014
    Posted

    Please login or register to see this code.

  • Topic Author
  • Posted

    Still cannot find this command...

    Please could you post your Scene code where you're using this command " fibaro:call(<id>,"changebrightness",255) "

     

    Posted

    Could I ask for some help to debug this line?

     

    {0,"190",{state="value=true",timeSlot="$sunsetHour~,~$sunriseHour",trueAct={{"188":value<60},{"192":value<10},{"188","setValue,20",""},{"188","turnOff","","={190:valueModified>30|190:value=false}"}}}}

     

    190: motion sensor

    188: dimmer

    192: light sensor

     

    The aim is to set to power to 20% for switch 188 in case it's running below 60% and light sensor is below 10. Once done, it should turn off after 30 seconds of motion sensor is back to safe mode. Can you help with it?

     

    Thanks in advance!

     

  • Topic Author
  • Posted

    Sorry about late reply...

    Question what for you're using sunset and sunrise hour?

    Please test line below

    Please login or register to see this code.

    Let me know if it works

    Posted
    On 7/19/2020 at 2:12 AM, cag014 said:

    Still cannot find this command...

    Please could you post your Scene code where you're using this command " fibaro:call(<id>,"changebrightness",255) "

     

    --[[
    %% autostart
    %% properties
    %% weather
    %% events
    338 CentralSceneEvent 2 Pressed
    338 CentralSceneEvent 4 Pressed
    %% globals
    --]]

    local startSource = fibaro:getSourceTrigger();
    if (
     ( (startSource["type"] == "event" and startSource["event"]["type"] == "CentralSceneEvent") )
    or
     ( (startSource["type"] == "event" and startSource["event"]["type"] == "CentralSceneEvent") )
    or
    startSource["type"] == "other"
    )
    then
        local deviceValue1 = tonumber(fibaro:getValue(817, "on"));
        if (deviceValue1 > 0) then
            fibaro:call(817, "turnOff");
        else
        fibaro:call(817, "changeBrightness", 255);    
        fibaro:call(817, "turnOn");
        end
    end
     

  • Topic Author
  • Posted (edited)

    @gggizmo

    Thank you.

    Looks like it does work, but no such an action listed in device's property.

    Anyhow, please download attached code and copy to your scene.

    In order not to change your definitions and arrays please copy the code from following line to the end.

    --======================Copy form here for updates==============================================

    --

    --

    ::endAos::

     

    Now, to add non exist device's command, add plus sign "+" before the command. The command will be added without any verification.

    Please be careful, any error in command name won't generate any warning. It's user's responsibility to verify if it works.

    for example:

    {"817","+changeBrightness,255",""}

    {"817","+changeHue,255",""}

    {"817","+changeSaturation,255",""}

    Please let me know if it works and I'll include the change in next release

    Thanks

    Please login or register to see this attachment.

    Edited by cag014
    Posted

    Does version 3.1 include the modification for slave gateway?

    Do i have to replace code after 

    --======================Copy form here for updates==============================================

     

    ?

  • Topic Author
  • Posted

    Yes, includes slave

    Yes replace code from this line (including the line)

    Posted

     

    [DEBUG] 17:58:11: 2020-07-27 17:58:10.999517 [ fatal] Unknown exception: /opt/fibaro/scenes/103.lua:40: '}' expected near '"},{"'

     

    {0,"`icucina`",{state="centralSceneSupport=4.Pressed",trueAct={"`lcucina`","+changeBrightness,255,""},{"`lcucina`","turnOff;else;turnOn","","{`lcucina`:on=true}"}}}},

     

    what i'm missing?

    Posted

    0,"`icucina`",{state="centralSceneSupport=4.Pressed",trueAct={"`lcucina`","+changeBrightness,255",""},{"`lcucina`","turnOff;else;turnOn","","{`lcucina`:on=true}"}}},

     

     

    Please login or register to see this code.

    {0,"`icucina`",{state="centralSceneSupport=4.Pressed",trueAct={{"`lcucina`","+changeBrightness,255",""},{"`lcucina`","turnOff;else;turnOn","","{`lcucina`:on=true}"}}}},

     

    this is correct syntax, at last.

     

    Tnx 

  • Topic Author
  • Posted

    You fix it before I have found the syntax error...

    So.. it works?

    Posted
    1 hour ago, cag014 said:

    You fix it before I have found the syntax error...

    So.. it works?

     

     

    yes, perfectly.

     

    You Know i'm waiting for you to release aos for hc3 to migrate to new home center. I can't replicate over 70% of my actual configuratione in hc3...maybe i bought it too early

  • Topic Author
  • Posted

    I have initial release, but still have some issues with alarm zone control, everything else looks working fine.

    Since I don't have many devices connected to HC3 and I cannot test all options I sent a copy to

    @SmartLifeSystems and we are working on bugs.

    Please let me know if you want to join to test it

     

     

    Posted
    On 6/15/2020 at 1:44 PM, cag014 said:

    Wow... on startup Hue device returns null value!?

    Any how, please replace line 447 with that one

    Please login or register to see this code.

    Tested and works.

     

     

    @cag014 - The more I read into the comments of your AIO script the more solutions I find. Thanks a lot for putting this together. Just followed the advice you gave gggizmo and finally coule embed my Hue light as well - Kudos to gggizmo for raising :-) 

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