Weather value from website into eWon

This is an example of an API call to update a Flexy tag:

https://m2web.talk2m.com/t2mapi/get/MyeWON/rcgi.bin/UpdateTagForm?TagName1=Tank&TagValue1=12&t2maccount=MyAccount&t2musername=MyName&t2mpassword=MyPassword&t2mdeveloperid=61e9ddf4-6ade-493e-ad4e-a79dde788140&t2mdeviceusername=MyeWONUser&t2mdevicepassword=MyeWONPassword

But as I’m thinking more about what you are trying to do, use data from another API in a web page running on the Flexy, it would be much easier to just use their API directly and there is nothing in the Flexy preventing you from doing that. It’s just a normal web server. You are going to need to decide which API to use and read up on it and then write your API calls and put them in the HTTP on the Flexy.

Also, in case you were not aware, we have a developer forum which is more focused on topics like this so I would recommend searching that for ideas as well:

https://techforum.ewon.biz/

But you are going to find the appropriate examples in the Weather API documentation, forum, etc. that you choose to use. For example, if you want the current weather for a city and you are using the OpenWeather map API you will just call:

api.openweathermap.org/data/2.5/weather?q={city name}

Of course you will have to use your API key. But you can embed that in any web page running on the Flexy, whether it was created by ViewON or not. You will take the response and use it in whatever element you’d like or you can use one of the pre-made widgets like the one I showed in a previous response above.

You can find hundreds of examples from open weather map here:

https://openweathermap.org/api

Kyle

Topic closed due to inactivity.

How would you code this in the page javascript area of viewon? When I paste the code in it doesn’t compile. (sorry I’m not a javascript guy)