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

Basic Code Clips for LUA starters


Question

Posted

To help those that are not familiar with LUA a starter library of clips that work in Fibaro.

Please add any you find useful.

  • Answers 151
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

Recommended Posts

  • 0
Posted

Please login or register to see this image.

/emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" /> from 3.552+

Please login or register to see this code.

we want 3.551+ lol

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" /> android push notifications! your already talking about 3.552+ wow you do move quick!

  • 0
Posted

Looks like 3.552+ will be my "Super hero"

Please login or register to see this image.

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

  • 0
Posted

new virtual device for controlling holiday mode in all sections

chose slider and LUA from virtual device

Please login or register to see this code.

  • 0
Guest dsilletti
Posted

Please login or register to see this image.

/emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" /> from 3.552+

Please login or register to see this code.

GREAT!

Please login or register to see this image.

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

  • 0
Posted

Great Socha!!!

It works perfectly!

Thank you very much!

Mario

  • 0
Posted

in 3.552+ new wakeup function

Please login or register to see this code.

example

Please login or register to see this code.

  • 0
Posted

Hi,

Easy question for this group probably. How can I put a message in the event panel using Lua. I tried fibaro:log(put this in the event log) but that obviously doesn't work. What is the correct command to do this?

Thanks

Hans

  • 0
Posted

in virtual device

Please login or register to see this code.

in scene

Please login or register to see this code.

  • 0
Posted

Thanks mr Socha. This gives messages in the scene (debug) window. I would like them in the Event Log. This will enable me to log when a particular event triggered etc.

So how can I get scene 'debug' alike messages stored in the Event panel, with a timestamp etc..

  • 0
Posted

we don't have easy way to get that but you can use

give you info about it is open or not

Please login or register to see this code.

give you info about connection

Please login or register to see this code.

  • 0
Posted
new virtual device for controlling holiday mode in all sections

chose slider and LUA from virtual device

Please login or register to see this code.

I have 4 heating sections, ID: 3,7,8,9

I have change your code at this place to have my own heating ID

id_sections = {3,7,8,9 }

The code works perfectly on the ID:3, but not for the others.

What I'm doing wrong?

  • 0
Posted

Arbu-jl, move slider and tell me all info what you will saw under virtual devices

  • 0
Posted

A.Socha

Results are:

- Trying for 3

- Status = 200

Pause

- Going to next section

- Trying for 7

- Status = 200

That's all

What I can see, If I send the slider value, without moving it 4 times, all my heating IDs change as expected. But I need to press 4 times on the slider....

  • 0
Posted

Arbu-jl,

try this one

Please login or register to see this code.

  • 0
Posted

A.Socha

Results are:

- Trying for 3

- Status =

- There is no such section

- Going to next section

Pause

- Trying for 7

- Status =

- There is no such section

- Going to next section

Pause

- Trying for 8

- Status =

- There is no such section

- Going to next section

Pause

- Trying for 9

- Status =

- There is no such section

- Going to next section

That's all, nothing has been changed on heating, values have not been changed...

[ Added: 2013-07-06, 12:05 ]

Sorry, my mistake, I forgot to change credentials...

Results are...

- Trying for 3

- Status = 200

- setting temp

- Holiday mode set Status 200

- Going to next section

Pause

- Trying for 7

- Status = 200

That's all

  • 0
Guest spazpeker
Posted

I have a horstmann hrt4-zw wireless electronic room thermostat with hrt4 asr-zw receiver

i can see them both in HC2 and the thermostat switches on and off the receiver

with the HC2 I can override the thermostat and turn on and off the receiver successfully

i have 20 floor temperature sensors connected to 5 universal sensor boards

what code do i use to overide the stat when my floor temp reaches say 32 deg

  • 0
Posted

I want to make a Lua code to send push messages, where am I wrong??

fibaro:call(2, "sendPush", "Allarme Attivato", "Messaggio da FIBARO")

is it right? “does not work”

Sorry for my english

  • 0
Posted

hi,

your device ID is wrong

go to the device api :

http:///api/devices

and get the id for the device you want tu push on.

the type is "type": "iOS_device" (For iOs and android)

Steve

  • 0
Posted

Sorry

Because the code for sending email is working and the code to send Push does not work??

fibaro:call(2, "sendEmail", "Allarme Attivato", "Messaggio da FIBARO") => working

fibaro:call(2, "sendPush", "Allarme Attivato", "Messaggio da FIBARO") => Does not work

thanks in advance and Sorry for my english

  • 0
Posted
fibaro:call(2, "sendPush", "Allarme Attivato", "Messaggio da FIBARO") => Does not work

Change "2" to a ID number of your IOS Device as suggested by Poppy.

2 is the User's ID not iOS device ID.

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