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


  • 0

Use Harmony plugin state to start a scene


Question

Guest pmviana
Posted

Hi,

 

I don't know about Lua programming until now I survived using blocks but since there's a plugin for the Logitech Harmony Hub I would like to start a scene every time I start/end an activity in my Harmony Hub.

 

The Harmony Hub is working fine and I have all the activities listed in Fibaro HC2 and I can interact with them.

 

Can you provide me a codding example for turning on/of a switch everytime I start/finish an activity with my harmony remote?

 

Best regards,

Pedro Viana

17 answers to this question

Recommended Posts

  • 0
Posted

How do I know the activity ID? I cant find it anywhere. 

 

Thanks

 

Agustin

  • 0
Guest pmviana
  • Inquirer
  • Posted

    When I enter the activity setup I can find the id on the hiperlink above in the browser address field. Isn't this the id?

    • 0
    Posted

    Yes it is

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20">

    • 0
    Posted

    I would like to know how I turn on an activity in LUA too.

     

    This is not working:

     

    --[[

    %% properties
     
    %% globals
    --]]
     
    fibaro:call(233, "turnOn")
     
     
    Where 233 is obviously my Harmony Activity ID (watch TV)
    • 0
    Posted

    Wessel, just to make sure, as I would have tried it in the same way..

    Have you tried:

     

    fibaro:call(233, "turnOn");

     

    ?

    (notice the ; at the end..)

    • 0
    Posted

    Please login or register to see this link.

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20">

    Also semicolon is not mandatory in Lua usually.

    • 0
    Posted

    Hello Mati,

     

    At first I tried that.

    But now I figured out that this works:

     

    --[[

    %% properties
     
    %% globals
    --]]
     
    fibaro:call(233, "changeActivityState")
    • 0
    Posted

    Thanks for the update. Good to see it works now!

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    I will start playing with my smart hub tonight/tomorrow, lets see if I can get it to work

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Posted

    It is really convenient!

    Now I turn on activity "Watch TV" with a triple click on my light switch and the TV, receiver, decoder are turning on and the lights will dimm to 30%

     

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

    • 0
    Posted

    Is it possible to start a Fibaro scene from the Logitech Harmony R Control?

    In my case, after to turned on all teh devices, I need the Harmony remote control to change the TV's channels, so I prefer to start my Watch TV activity from the harmony control. Many Thanks

     

    PS: At the moment I have the same configuration that you described, starting my activity from Fibaro

    • 0
    Posted

    I think not yet.

    But maybe mr Nowacki can say something about this?

    • 0
    Posted

    So far this integration is only one-way, you can't control Fibaro devices with Harmony.

    • 0
    Posted

    I have just ordered my Harmony Ultimate. Then I read coincidently this feed and to my surprise something I hadn't anticipated Fibaro having! Im excited! 

    From what I have read so far it isnt possible from the Harmony to fire up a Fibaro Scene am I right?

    What I want to achieve is fairly simple.

    I want the lights (controlled by a fibaro RGBW module) to dim down, LED ceiling lights also controlled by a Fibaro Dimmer to also dim down, TV to fire up, Amp, DVD all from pressing a single button on the Harmony.

     

    I know I will be able to control everything from the Harmony except the LED lights - from reading this post. 

    Any suggestions please guys?

    • 0
    Posted

    You can always measure power of the TV and do stuff if watt > 30 or something.

    • 0
    Posted

    Thank you for the very informative posts.

     

    I learned that with fibaro:call(XYZ, "changeActivityState") I can alter the current state of the Harmony activity XYZ.

    Question: Is there a command where I can call for the ON or OFF activity directly?

     

    I am asking as the Harmony Plugin on the HC2 is not updating the status if I e.g. change the activity status from another device, e.g. remote or iPhone.

     

    My corresponding problem: If I change the activity with another remote, the FIBARO status will be wrong. Let’s say I turned the TV already ON using my iPhone but the FIBARO activity is still saying OFF. Now I want to turn the TV OFF with the fibaro:call(XYZ, "changeActivityState") command. But all I will do is to send from the Fibaro the turn ON command even the devices are already ON.

     

    What I would need is a command to send the ACTIVITY OFF or the ACTIVITY ON command directly by the HC2.

    Is this possible?

     

    Would be great if one of the experts here could help J

     

     

    PS: Is there a command to check what Activity state is selected?

    • 0
    Posted

    Right now there is no option to send the ACTIVITY OFF or the ACTIVITY ON command directly by the HC2, but there is a way to check the Activity state:

    fibaro:getValue(ActiviyID, "ui.activityCurrentStateValueLabel.caption") 

    You should receive a string which includes "Off" or "Running".

    So  in case the activity is off, you need to execute fibaro:call(XYZ, "changeActivityState") one time more.

     

    [DEBUG] 07:49:09: TV State [Off] i18n_startStopActivitySwitchOff > i18n_activityCurrentStateRunnin

    • 0
    Posted

    Great info and idea. Thanks cag014!

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

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