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

how to call other system from lua


Markoe

Question

Hi

 

Can someone point me to right direction

 

I want to send this command to my other controller from Fibaro

Please login or register to see this link.

world

 

How to put that command to my scene?

 

thanks for advance

 

Edited by Markoe
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

For scene you need write it in LUA like this

 

Please login or register to see this code.

 

for VD you have 2 possibility:

in LUA:

(very simple ex,  in VD IP zone write IP address of remote server and in PORT remote port 3480)

Please login or register to see this code.

 

 

in TEXT (in VD IP zone write IP address of remote server and in PORT remote port 3480):

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Yes , succes .

     

    17 hours ago, drboss said:

    error = function(err) print('error = ' .. err) end end,

     

    I did replace with "error = function(err) print('error = ' .. err) end, " . After that it did work.

     

    Thank you for your help @drboss.  This was way byond me present skills :-)

     

    Was it so that global lua fuctions are not allowed at Fibaro. I would love to make this as a global function so I can use it in multible scenes and not copying the same code to all needed schenes.

     

     

     

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, Markoe said:

    Was it so that global lua fuctions are not allowed at Fibaro. I would love to make this as a global function

    it's not possible. we asking from FIBARO this functionality more than 2 years

    Link to comment
    Share on other sites

    • 0

    if I not need return parameters from function and I use the same code (functionality) in many scenes and VD I write it in separate scenes and call it with arguments.

    Ex. for call universal scene for send Telegram message

    Please login or register to see this code.

    But exist two way method to call scene with arguments and return result. The best example is GEA v6 script from  forum.domotique-fibaro.fr. Author use global variable to return results with time stamp. Another method (I test my very alfa code) is use possibility to write results as debug message of another scene.

     

     

    Link to comment
    Share on other sites

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