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

Action Name in LUA


Question

Posted

Dear Friends, I am still learning how to program in LUA still have some questions to solve.

In the following command: fibaro: call (deviceID, actionName, ...), which are the actionName that could be used? I realized that each device can use multiple actions, but how do I know which actions are supported for each device?

Thank you very much.

Henrique César Pellegrino Masetto

Electrical Engineer - IDS Digital Solution

7 answers to this question

Recommended Posts

  • 0
Posted

some basics

in

hc/api/devices?id=id_of_devices

you got list every property and actions what you can use

so for example your device got id = 4 then on hc/api/devices?id=4 you will find for dimmer actions like turnOn(), TurnOff(), SetValue() etc

when you will saw:

turnOn() 0

setValue() 1

that mean how many function got arguments

so for turnOn you will use only fibaro:call (4, "turnOn") but for setValue will be fibaro:call (4, "setvalue", "lv_of dimming"), use left menu it helps a lot

  • 0
Posted

Hi Henrique,

For a list of actions, where they are used and some examples of how to use the Lua ones, have a look at the Fibaro UK page:

Please login or register to see this link.

I hope this helps.

Happy Automating

Adam Bewsher

  • 0
Posted
Hi Henrique,

For a list of actions, where they are used and some examples of how to use the Lua ones, have a look at the Fibaro UK page:

Please login or register to see this link.

I hope this helps.

Happy Automating

Adam Bewsher

Adam +1 for your contribute

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

  • 0
Posted

Adam.Bewsher, great

Please login or register to see this image.

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

Henrique, you can also use my HC2 Toolkit (

Please login or register to see this link.

) and ... Get Devices / choose the device in grid / right click: Show actions or Get API raw data

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

  • 0
Posted
Hi Henrique,

For a list of actions, where they are used and some examples of how to use the Lua ones, have a look at the Fibaro UK page:

Please login or register to see this link.

I hope this helps.

Happy Automating

Adam Bewsher

It surely does! I just ordered an iKettle

Please login or register to see this image.

/emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

  • 0
Posted

Adam.

The database for virtual devices on your site is a great idea too ->

Please login or register to see this link.

for those who have not stumbled upon yet.

I'd certainly nominate the following from Krikroff, Robmac and others from here to add to your DB / handy resources when you have time ...

Scheduler by Robmac at

Please login or register to see this link.

HC2 Toolkit framework by Krikroff at

Please login or register to see this link.

HC2 Toolkit App by Krikroff at

Please login or register to see this link.

Thanks to all above and the many others on this forum that I've not summarised such as Shad, Dalle and others - XBMC, Sonos, Presence simulator ... etc.

Everyone exploring HC2 should read and learn from these guys. Thanks.

  • 0
Posted

Hi ipsofacto,

Thanks! Appreciate the feedback.

We'll definitely be putting all of the above onto the database (Sonos got added today in fact.)

We've also got a few more ideas for useful resources up our sleeves.

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" /> More details soon...

Regards,

Daniel

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