Custom Navigation Tiles - How to make a Dynamic Weather Tile using Weather Underground API

You could try using JScript and a web service.

Here is one such service, though it will show the Router’s Public WAN address rather than the LAN IP …

http://api.ipify.org?format=jsonp&callback=getIP

function getIP(json) {
  alert("My public IP address is: " + json.ip);
}

I’ll leave it to @JTRTech to figure out the actual working implementation. :wink:

Thanks Q. LOL

TBH Its not something I understand the need for?

Given your asking for IP, Subnet, Hostname and Gateway your talking LAN addresses which you should really be setting as static ip addresses In which case its easy just make a tile with string for details and map to each terminal…

Why do you want IP address to be on a tile may I ask?

my weather doesn’t come up

Everything is static. But like anything with PCs many things can change. I’ve had a driver update that was pushed through windows updates to the NIC revert the address to dhcp so for support reasons it would be helpful. I was just curious if there was a simple way to pull that information without needing to use a command line output from a text file. The wan IP could even be helpful because if that is usually not static it could allow the user to give you their wan IP so that you could rdp into the server.

2 Likes

Remote access was the only thing I thought would make sense and sounds like thats it.
Only way I know of would be via cmd prompt. if you try searching for an ActiveXObject for getting lan IP you might be able to simplify.

Have a look for the internet conectivity check script which will give you everything you need, youll just need to change the cmd command to something like ipconfig

I know security in theory is better with auto updates but I have always opted to have manual update install after having a server update and mess up the firewall ages ago.
For remote login for support etc I opt for teamviewer as it takes out all the issues of dynamic IP both LAN and WAN and also does not need changes to firewall (which is LAN address did switch to dynamic would likely me out of whack with rdp port forwarding rule)

1 Like

I’ve been using the Weather Tile for over a year now and it was working fine. But when I upgraded to 5.2.14, every time I opened the Navigation Screen, all of my Tiles would take 3-10 seconds to load and I would have to wait for the Tiles to load before I could do anything.

I found out that if I unmapped the Weather Tile from the Navigation Screen, loading times went back to normal.

Did the new Samba version change the way scripts were handled on the Navi Screen? Or, is it just me?

Can you show a video of that? Or animated gif? I’ve not noticed it but that doesn’t mean much.

Hmm, I remapped it but now it loads just fine. I’ll try and see if I can reproduce it.

Perhaps it had issue connecting to api .

Even if it did have issues with connecting, why would that hang the whole system? Can the script run in the background?

It shouldn’t but it could be lots of things. Its hard to say.

This issue is actually a generic weakness in the way the Web Helper functions are implemented (no timeout parameter on web access functions). Everything APPEARS to work fine while the web servers are responding as expected, but such a “working system” will fail when the internet connection or web server fails to respond.

The current script engine uses JScript (ancient ECMA3 script standard) which doesn’t support time-out functions, so there is currently no way to implement timeouts in JScript functions such as wrappers for web access AFAIK.

Such problems will be easily solved when the Script engine is upgraded to Google’s V8. Another way to fix it would be to create some better web helper functions.

I thought weather underground was ending service for their api?.. could be why people are having issues as well… https://apicommunity.wunderground.com/weatherapi/topics/end-of-service-for-the-weather-underground-api

He resurrected a post from 1 year ago. Who knows if it’s relevant or not. I’m fairly sure it was figured out a year ago.

Good point though and if you still need weather you may need to find a new service with an API.