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

Get temp from Vera lite and put in a VD


jolerius

Question

Hi

 

I am running a HC2 as my zwave controller. But i also has a vera Lite for my 433mhz devices via RFXtrx device.

 

So what is the easiest way for me to fetch status from 433mhz devices.

To start with i want to get the current temperature from several tempsensor and the luup variable for that, according to micasaverde, is:

Please login or register to see this code.

But where do i go from here? How can i get it into my HC2?

 

I want a virtual device updated every 15 minutes with the current temperature.

and can i somehow make my HC2 think that my VD really is a temp sensor?

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • I kinde of got it.

     

    Used this code

    Please login or register to see this code.

    But i ran into more problems. 

    This line:

    fibaro:debug(response)

    shows me:

    -4,1

     

    But this line:

    fibaro:call(38, "setProperty", "ui.Label1.value", response)

    Changes the label to:

    -4.0999999999999996

     

    Why isn't it showing the same?

    Can i narrow it down in someway to "-4,1"? Or is it better to use global variables for that?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • i searched for round function, but my LUA skills ar not that good so i really can't figure out how to use it?

    Any help?

    Link to comment
    Share on other sites

    • 0

    I'm not coder but I think it's as easy as copy and paste from this forum the round function...

    Then round(Fibaro:globalVarible...

    You get the idea?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I am starting to get it now. But what I can see the round function removes the decimals?

    I want it o round the number to one decimal.

    Ex 4.1889419 to 4.2.

    Anyone know how to accomplish this?

    Link to comment
    Share on other sites

    • 0

    I kinde of got it.

     

    Used this code

    Please login or register to see this code.

    But i ran into more problems. 

    This line:

    fibaro:debug(response)

    shows me:

    -4,1

     

    But this line:

    fibaro:call(38, "setProperty", "ui.Label1.value", response)

    Changes the label to:

    -4.0999999999999996

     

    Why isn't it showing the same?

    Can i narrow it down in someway to "-4,1"? Or is it better to use global variables for that?

     

    It is a bug in the labels, I already reported it in Bugzilla.

     

    workaround:

     

    fibaro:call(38, "setProperty", "ui.Label1.value", response.." ")

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • It is a bug in the labels, I already reported it in Bugzilla.

     

    workaround:

     

    fibaro:call(38, "setProperty", "ui.Label1.value", response.." ")

    or we could make use of the bug and put 

    fibaro:call(38, "setProperty", "ui.Label1.value", response.." °C")

    Please login or register to see this image.

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

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