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

send openweather temperature value with Json script


Bidulle

Question

Hi,

I am totaly newby.
I am trying to send some data to an external led screen.

I have make this script to send a simple text and it works:

 

Please login or register to see this code.

 

Now, I want to send the Temperature value that I receive from OpenWeather in my HC3, instead of "Temp ext: XXX" in my previous exemple to "Temp ext: 8,24°C"

8,24°C is the value from the data that I have in HC3 device 81):

 

Please login or register to see this code.

 

I just have now idea how to do that.
Thanks for your help
 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
22 hours ago, Bidulle said:

Hi,

I am totaly newby.
I am trying to send some data to an external led screen.

I have make this script to send a simple text and it works:

 

Please login or register to see this code.

 

Now, I want to send the Temperature value that I receive from OpenWeather in my HC3, instead of "Temp ext: XXX" in my previous exemple to "Temp ext: 8,24°C"

8,24°C is the value from the data that I have in HC3 device 81):

 

Please login or register to see this code.

 

I just have now idea how to do that.
Thanks for your help
 

If you want to send live data to that screen, so it is updated every time the temperature sensor changes its values you need to listen for that event. You can do it by a simple loop, or if you are more advanced you can use refreshStateSubscriber or other tools, like fibaroExtra or ER5, that have built in methods for event listening. As you say you are a newcomer, i propose to use a simple loop. First wrap your HTTP call that sends the text to the screen into a function , than create a loop that listens to temperature changes. When termperature changes, call the HTTP function with an argument of the temperature coming from the sensor.

 

 

 

Please login or register to see this code.

 

I have never tested it, but should work. 

 

 

 

 

Edited by Neo Andersson
  • Like 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks @Neo Andersson for this solution.
    I really appreciate the time you take for me.

    Sorry for my bad English, i am French ;-)

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