'TEMPS' - Electron-based weather app for nearly every Pup...

Window managers, icon programs, widgets, etc.
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

'TEMPS' - Electron-based weather app for nearly every Pup...

#1 Post by Mike Walsh »

Evening, all.

I can't help thinking I've mentioned this somewhere else.....but I'm hanged if I can find it. So, for anyone who'd like a halfway-decent weather app, which runs from the tray, here is

Temps

I've been running this for around a year, and I'm extremely impressed with it. I think I found it on either MakeUseOf or OMG! Ubuntu (but I can't remember now!)

Homepage is here:-

https://jackd248.github.io/temps/

It's essentially a smartphone app, but has been adapted to run on the Windows, Mac & Linux desktops. After downloading, extract the package, and you'll end with a directory called either temps-linux-ia32 or temps-linux-x64, depending on your architecture.....it's available for both.

Inside this directory, you'll find a binary called, quite simply, 'temps'. Click on this, and after quite a few seconds, it'll launch. I believe it's not only setting itself in /tmp during this time (like AppImages do), but it's also connecting to the OpenWeatherMap API.


Image


Talking of which, you'll need to get yourself an OpenWeatherMap API 'key'. You can use the existing one that comes with it, but after around 4-6 weeks this will quit on you. Just go to

http://openweathermap.org/

.....create a free a/c, and then click on the API tab at the top, and you can create as many API 'keys' as you need. Doesn't take long.

--------------------------------------------

When you've got your 'key', bring the app up with a click on the tray icon, then click on the two horizontal bars in the top-left corner; this will take you to the settings view. You'll need to delete the default location, which is Berlin; enter your location (you can get this from the OpenWeatherMap 'Maps' tab), then delete the API key and enter your own. I find the easiest way to do this is to copy'n'paste the same way Puppy does in urxvt; simply highlight to 'copy', then use the middle mouse button to 'paste'. (If you attempt to right-click for 'Paste' while the app's open, it promptly disappears..!)


Image


When you've got the settings how you want 'em, just click on 'Apply'.

You get a four day forecast, and you can bring up temperatures for different times of the day by clicking on any of the forecast days. This gives you a simple temperature 'line graph'; by moving along this it'll show the rise & fall throughout the day. To go back, just click anywhere on the line.


Image


It changes colour according to the temperature; from greys/dark blues for very cold, to deep orange & red for very hot.....and it has some pretty neat animations for rain/hail/sleet/snow, etc. All very nifty!

(I'm afraid mine are dull gray at the moment, 'cos it's currently bloody cold over here..!!) :lol:

---------------------------------------------------------------------------------

You can unpack the directory anywhere you want. /Opt is as good a place as any, or better still, /mnt/home. If you want it to start at boot-time, just sym-link the 'temps' binary into /root/Startup.

Couldn't be simpler!

It creates a directory in /root/.config. If you want to run this in multiple Pups, as I do, the easiest way is to place the Temps directory on a remote partition; sym-link the Temps 'binary' into each Pup's /root/Startup; allow it to create the 'config' folder in /root/.config the first time, then move this to the same location as the remote Temps directory, and sym-link it back into each Pup's /root/.config directory. This preserves your settings, and saves having to set it up again for every Pup.

--------------------------------------------------------------------------------

A word of warning, though; it seems the bods at OpenWeather occasionally decide to edit place names. Mine has been entered as 'King's Lynn, GB' for ages.....until this last week or so, that is. I started getting 'Failure during data fetching', along with loads of squiggles instead of the proper display. Turns out someone had taken it into their head to remove the apostrophe ('), so that it now reads 'Kings Lynn, GB'. That's all it took to chuck a spanner in the works, so.....do be aware of this possibility, boys & girls.

--------------------------------------------------------------------------

Personally, I can thoroughly recommend this one, kiddiwinks. It's one of the neatest weather apps I've seen by a country mile. The only Pups I can't get it to run in are Racy 5.5 and Lucid; it requires a minimum glibc of at least 2.15, I'm afraid.....

Enjoy.


Mike. :wink:
Last edited by Mike Walsh on Tue 21 Nov 2017, 14:20, edited 2 times in total.

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#2 Post by spiritwild »

I've been running it a while also. Although, lately it's been having issues with "failure during data fetching"

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

spiritwild wrote:I've been running it a while also. Although, lately it's been having issues with "failure during data fetching"
Mm-hm. Sounds familiar..... :roll: :)

I tracked my problem down to the simple fact of some bright spark at t'other end deciding to remove one apostrophe from the spelling of my location. And, as I said, that was all it took to completely bugger things up.

I kept checking my location with its normal spelling, and it kept coming back with 'location not found'... (??)

I did re-install the contents of the Temp directory.....but according to the Github page, it hasn't been upgraded for around a year. The version available for d/l is still the exact same one I downloaded a year ago!

Anyway; my advice is to check the spelling for the location you use very closely, using OpenWeather's own 'Maps' tab on the website. Zoom in as far as you need to, in order to make sure you get the closest location possible.....there's a hell of a lot more weather stations reporting to these websites than most folks realise. I could hardly believe it, but despite King's Lynn being fairly average-sized as far as towns go, it turns out there's nearly 30 weather stations within a 10-mile radius of us..! So it really is a case of 'take your pick'...

No guarantees, but that fixed it for me earlier this evening. It's worth a try.


Mike. :wink:

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#4 Post by perdido »

spiritwild wrote:I've been running it a while also. Although, lately it's been having issues with "failure during data fetching"
When mine did that - after I clicked the little = icon in upper left there was a line on the next screen that says "You need a free api key from openweathermap"

Mike described how to get one in his first post.

.

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#5 Post by spiritwild »

Thanks, working now. It use to work with city,st but they seem to have changed it up a bit.

I just removed the state and it seemed to be working again.

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#6 Post by Terry H »

Mike,
Thanks for creating this thread introducing this weather app, it works very nice apart from an issue on bootup. I installed it and set up, all working well. On bootup I get an error message that /Path/to/Temps-linux-ia32/Temps.app not found, so it doesn't start at all. The path is correct.

As the executable is named only Temps, so to test it I renamed the executable to Temps.app. On startup, it runs and initially displays an error, but then changes to display the local forecast correctly. It still displays the error message screen with message /Path/to/Temps-linux-ia32/Temps.app.app not found. Strange that it gives a not found error but still runs.

So the question is does anyone have an idea why it is trying to execute Temps.app, subsequently causing the error?

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

Hi, Terry.

You want my advice? Ignore it.

I've had the exact same problem all the months I've been using it, right from day one. After the first few times (when, just like you, I started trying to 'fix' it), I quit worrying about it. It starts up, every time, as good as gold. Why bother trying to 'fix' summat that isn't actually 'broken'?

Sure, it's a wee bit annoying.....but it's got so it's just part of the normal start-up routine. It's like the desktop 'furniture'; you get so used to seeing the stuff there, that, half the time, you simply don't pay it that much attention any longer..!

So long as it runs every time, and does what its developer intended it should.....why worry? I suspect it's a bug in the internal code that slipped through the net. I've learnt to live with it. And don't forget; this was originally an Android/iOS smartphone app (you can tell that by the shape of the window). It could be something to do with the way in which those OS's mount stuff.

Who knows?


Mike. :wink:
Last edited by Mike Walsh on Wed 03 Jan 2018, 11:54, edited 1 time in total.

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#8 Post by Terry H »

Thanks Mike, happy with your reply. At least I now know I'm not getting an error, that others aren't getting. Will live with it now.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#9 Post by B.K. Johnson »

What about this as an alternative? That is if you use Firefox. Sorry Mike!
Attachments
Screenshot-2018-1-2 2Forum-forecast.png
weather app in Firefox.
(187.1 KiB) Downloaded 522 times
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#10 Post by Mike Walsh »

No worries, BKJ.

The more choices there are available for Pup, the better I like it. Helps us all out that way.....because, as you doubtless know, what appeals to one person doesn't necessarily float another one's boat!

Thanks for the info.


Mike. :wink:

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#11 Post by spiritwild »

it's funny, maybe I'm weird or just creative. You could do anything with browser add ons, wine, online apps, etc. For me it's more of a "I made this work".

I have the temperature displayed on conky, just the temp and either cloudy,sunny or whatever. It's so damn primitive but it's the fact that I had to edit the command to run inside the program.

Except when theirs a glitch, then I go insane.

You would think it's the greatest thing on earth. I may never even pay attention to it but hey, it's my creation. to each their own.

I guess it's like gardening, when it's all said and done, I could have bought tomatoes cheaper. lol

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#12 Post by Mike Walsh »

Hi, spiritwild.

That's how it is with me and .pets, SFSs, etc. I like nothing better than taking a package built for one distribution (say, 'buntu-based), and re-packaging it with whatever's necessary to make it run in, say, one of the Slackos. Perhaps even a different Pup-series.

I also like taking stuff I find at Github or Sourceforge (especially the latter; they have a huge repo of stuff there), and turning it into a working Puppy package, complete with Menu entries and everything. Initially, I'll build these for myself, but if they then survive further testing throughout the 'kennels', I'm more than happy to share.

I've become extremely proficient at tracking down relevant libs, etc..!

'I made this work'. Yep, couldn't agree more. It's very satisfying when that happens.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#13 Post by Mike Walsh »

Evening, all.

Following on from Terry H's observation about getting a start-up error message for Temps, saying it couldn't be found (but still started!), I've tracked the problem down.

IF you remove the sym-link for the 'Temps' binary from ~/Startup. It'll still start.....once. It places a .desktop entry in ~/.config/autostart.....which, from what I understand, is fast becoming the 'standard' location for stuff you want to start at boot. There's rumours that ~/Startup may be eventually left-out in later Puppies, and removed from the 'path'.

However, for this particular app, you can't correct that error. This thing started life as an Android smartphone app.....hence the .app extension it keeps looking for. You can edit and mess around with the executable's name and/or the .desktop entry in ~/.config/autostart all you like.....but this thing has been hard-coded to re-create its startup script/.desktop entry every time it shuts down. So any edits you make simply get overwritten.....and you get the error messages, and failure to start.

That's why I put the sym-link into /root/Startup.....because it was the only way to consistently start the thing. Or, thinking about it, a wee script placed in /etc/init.d would probably do the trick just as well.....pointing to the executable's location.


Mike. :wink:

Terry H
Posts: 708
Joined: Sun 29 Mar 2009, 16:48
Location: The Heart of Muskoka, ON Canada

#14 Post by Terry H »

Following your revisiting Temps, I have installed it on my Stretch-7.5 RC2 install, which is my got to puppy. I am running it from /root/startup with symlink to executable. It now starts without error message. I just have a timing issue, that it is starting prior to my wifi being accessible. So I may look at running from a script with a sleep in it, but its not a big issue as it is, just a click on taskbar icon after wifi up and its fine.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

Hi, Terry.

Mm. Nice one. Of course, the thing that puts many people off using Electron-based apps is the enormous size of the Electron 'framework' itself. In the case of Temps, the whole thing is around 125 MB (!!).....but the 'framework' accounts for something like 110 of that.

So by running a 'common' install of Temps from a remote data partition, sym-linked into every Pup at the appropriate places, and a 'common' .config directory sym-linked the same way, Temps occupies no 'Puppy-space' at all, maintains the settings across the kennels, and is available to all Pups.

(And that 'error' message is just like part of the furniture now; I'm so used to it, I no longer 'see' it any more.)

Win-win..!


Mike. :wink:

Post Reply