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

tcp connection from scene?


Question

Posted

Is it possible to initialize an outgoing TCP connection, e.g. HTTP, using LUA code in a scene? I know it's possible from virtual devices but I don't want to use that weird system with code that runs once a second for this. I simply want to monitor some value and trigger a scene that does an HTTP request.

The last thing I saw about this issue was in

Please login or register to see this link.

where Fibaro said "Net module is visible only in virtual devices API at the moment. Of course in next releases it will be accessible in scenes, too.".

But the Net module is still not there as far as I can tell?

4 answers to this question

Recommended Posts

  • 0
Posted

No, net is not available in scene.

You can use a virtual devices to store the net result in a variable and the scene will get the value from variable.

  • 0
  • Inquirer
  • Posted

    I'm interested in sending out a notification via http as soon as a value changes, which is exactly what the event driven approach in scenes is good for. Using polling in an infinite loop via a virtual device feels pretty awkward. No big deal but I just find it very strange that we can't do very basic thinks like this in scenes. I thought that this functionality was what we paid for in HC2 rather than HCL.

    I guess when Fibaro said "Of course in next releases it will be accessible in scenes" in 2012, it ment absolutely nothing?

    [ Added: 2014-08-27, 07:08 ]

    Oh and the code does not run "each second" as the description say, it runs every 3 seconds (if you're lucky that is, because sometimes it just stops running for a while and then comes back).

    This should be considered if you're interested in a value that changes from some value to another and quickly changes back within 3 seconds....

    • 0
    Posted

    Put the code into a button and call that button from the scene whenever the value changes. That way you avoid the polling issue and doesn't have to wait three seconds for an update

    • 0
    Posted

    Use of HTTP protocol in scenes is already possible in current alpha, in stable version please use virtual device's button activated in scene.

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