Author Topic: Weather Link Live Desktop GUI  (Read 7743 times)

0 Members and 1 Guest are viewing this topic.

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Weather Link Live Desktop GUI
« on: January 09, 2020, 12:34:27 AM »
I picked up a Weather Link Live, and the one thing I wanted was a display I could put on my computer desktop. 

Nothing that I found in searching seemed to fit exactly what I wanted.... so I wrote this one.

https://github.com/darmbrust/weatherlink

Its rough around the edges - if you play with it, you will definitely be a beta tester.  The released jar files should work on Linux and Windows, if you are on Mac, well, you will have to build it yourself at the moment.

This only supports Weather Link Live, on your local network.  It pulls all the data from the rest API, and reads the live UDP stream.
No configuration at all should be required - assuming autodiscovery works on your network.

It currently stores all of the data - so the data is all there - it will be fairly easy to add features like exporting the data to a CSV file, pushing to external sites, etc.

Feedback (and pull requests) welcome :)

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: Weather Link Live Desktop GUI
« Reply #1 on: January 09, 2020, 01:17:40 AM »
I think its really good , fresh clean looking graphics , not distorted or pixelated and I like seeing this new end user stuff .I hope it evolves and don't get too carried away sometimes less is more less is more manageable..

ps post a screenshot if possible always attracts the interest a picture speaks a thousand words.. congrats hope to see more..Brian

for reference you can use the attachment option
 [ You are not allowed to view attachments ]

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
« Last Edit: January 09, 2020, 07:17:55 AM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Weather Link Live Desktop GUI
« Reply #3 on: January 09, 2020, 08:30:29 AM »
Under Win10, I get a "Error: A JNI Error has occurred, please check your installation and try again.

After closing this dialog box, I got a Java exception error one.

I just ran the Java updater with the same result.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #4 on: January 09, 2020, 11:06:59 AM »
Under Win10, I get a "Error: A JNI Error has occurred, please check your installation and try again.

After closing this dialog box, I got a Java exception error one.

I just ran the Java updater with the same result.

Greg H.

Do you know what version of java you have installed? 

If you can run things from a command prompt, running 'java --version' would be useful information.
Depending on whether its purely a java problem, or if my code actually went a little ways before it died, there may be a log file in:
C:\Users\<username>\Weather Link Live GUI Data\  that could also contain useful info.

It also should give better debugging information if you can try to launch it from a command prompt:
java -jar weatherlinkWindows.jar


Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #5 on: January 09, 2020, 11:15:54 AM »
That looks really nice! Create a dark theme and it would serve a great purpose.

I can see running this on a Raspberry Pi with an LCD case.


That would be pretty cool.  I've not had the time to play with a Pi yet.... but in theory everything here would work on it.  The GUI is written in JavaFX, which has a release for PI.  With the newer versions of modular java, one could slim down this deployment size a fair bit too (though I haven't done that yet, since I just run it on a desktop).

JavaFX is styled with css, for the most part - so its pretty easy to change the theming.
Though the gauges library I'm using doesn't use css as much as the rest of JavaFX. 

For my purposes right now, I have plenty of screen space on my main computer, so I just set it in a corner and let it run.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Weather Link Live Desktop GUI
« Reply #6 on: January 09, 2020, 12:16:20 PM »
Under Win10, I get a "Error: A JNI Error has occurred, please check your installation and try again.

After closing this dialog box, I got a Java exception error one.

I just ran the Java updater with the same result.

Greg H.

See below:

Code: [Select]
PS C:\Users\Greg\Downloads> java -jar weatherlinkWindows.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/sagebits/weatherlink/gui/WeatherLauncher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
PS C:\Users\Greg\Downloads>

and the java version reports

Quote
PS C:\Users\Greg\Downloads> java --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
PS C:\Users\Greg\Downloads>

Greg H.

Do you know what version of java you have installed? 

If you can run things from a command prompt, running 'java --version' would be useful information.
Depending on whether its purely a java problem, or if my code actually went a little ways before it died, there may be a log file in:
C:\Users\<username>\Weather Link Live GUI Data\  that could also contain useful info.

It also should give better debugging information if you can try to launch it from a command prompt:
java -jar weatherlinkWindows.jar

Also, I don't see any directory named C:\Users\Greg\Weather Link Live GUI Data\

The jar file is still in the Downloads directory, but I wouldn't think that it should matter. (as long as it can find it)

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #7 on: January 09, 2020, 12:33:49 PM »
The classversion output of that error tells me that some version of Java 8 is trying to run the software (though I have no idea what release of java 8 wouldn't report its version with a java --version command)

Java 8 is essentially end-of-life at this point.

You need Java 11 for this app, I'd recommend installing the OpenJDK version, it doesn't have the installer all loaded up with crapware and such like the Oracle installers do.
https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot

I believe you can install this along side your existing 8 installation (though I would remove Java 8 from your computer unless you know you actually need it / use it)
I'm not sure if the 11 installer will change your system default to 11 instead of 8. 

If the installer does change your default - then you should be able to just double click the jar file.
If it does not (java --version on the command line still doesn't work and/or reports java 8 ) then you just need to launch my app with the java 11 version.  Something like:

C:\Program Files\AdoptOpenJDK\jdk-11.0.5.10-hotspot\bin\java.exe -jar C:\Users\Greg\Downloads\weatherLink.jar

You could construct a shortcut to that effect.

At some point, I'll figure out how to build it with the JavaFX packaging tooling, where I can include the necessary Java right with an installer for the GUI.... but haven't found the time to dig into that stuff yet.



Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Weather Link Live Desktop GUI
« Reply #8 on: January 09, 2020, 03:27:38 PM »
The classversion output of that error tells me that some version of Java 8 is trying to run the software (though I have no idea what release of java 8 wouldn't report its version with a java --version command)

Java 8 is essentially end-of-life at this point.

You need Java 11 for this app, I'd recommend installing the OpenJDK version, it doesn't have the installer all loaded up with crapware and such like the Oracle installers do.
https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot

I believe you can install this along side your existing 8 installation (though I would remove Java 8 from your computer unless you know you actually need it / use it)
I'm not sure if the 11 installer will change your system default to 11 instead of 8. 

If the installer does change your default - then you should be able to just double click the jar file.
If it does not (java --version on the command line still doesn't work and/or reports java 8 ) then you just need to launch my app with the java 11 version.  Something like:

C:\Program Files\AdoptOpenJDK\jdk-11.0.5.10-hotspot\bin\java.exe -jar C:\Users\Greg\Downloads\weatherLink.jar

You could construct a shortcut to that effect.

At some point, I'll figure out how to build it with the JavaFX packaging tooling, where I can include the necessary Java right with an installer for the GUI.... but haven't found the time to dig into that stuff yet.

OK, I uninstalled x86 and 64 bit Java 8 and installed the AdoptOpenJDK. It is working now. I'll let it run for a while and see what it does.

Thanks for the help.  [tup]

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #9 on: January 09, 2020, 04:12:22 PM »
Cool.  Like I said, its pretty alpha / beta right now, I've already noticed a couple more bugs today that I'm working on fixes for.

Learning all the interesting surprises about when the Live Link does and doesn't send data - for example, it stops sending valid wind direction data every time the wind speed goes to 0.   And if still, it stops sending the avg wind directions too... lots of edge cases to handle.

I suspect I have a problem with how the peak wind speed is being graphed too, its way to jagged.  I suspect there is something wrong with how I'm condensing the data for graphing.

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Weather Link Live Desktop GUI
« Reply #10 on: January 09, 2020, 04:47:15 PM »
just use the last known good wind direction value when the speed is zero

Offline CW2274

  • Forecaster
  • *****
  • Posts: 6751
    • Conditions @ CW2274 West Tucson-Painted Hills Ranch
Re: Weather Link Live Desktop GUI
« Reply #11 on: January 09, 2020, 05:08:45 PM »
it stops sending valid wind direction data every time the wind speed goes to 0. 
I use WL USB and it never sends direction when the wind is dead calm.

Offline CW2274

  • Forecaster
  • *****
  • Posts: 6751
    • Conditions @ CW2274 West Tucson-Painted Hills Ranch
Re: Weather Link Live Desktop GUI
« Reply #12 on: January 09, 2020, 05:47:12 PM »
it stops sending valid wind direction data every time the wind speed goes to 0. 
I use WL USB and it never sends direction when the wind is dead calm.
I should probably amend this...whether WL (read Davis products) sends direction or not when the wind is dead calm, I actually don't know. What I do know is that NWS web site and MesoWest will not decipher/show wind direction when dead calm, as it should be.

Offline johnd

  • Forecaster
  • *****
  • Posts: 4849
    • www.weatherstations.co.uk
Re: Weather Link Live Desktop GUI
« Reply #13 on: January 10, 2020, 03:50:53 AM »
I should probably amend this...whether WL (read Davis products) sends direction or not when the wind is dead calm, I actually don't know. What I do know is that NWS web site and MesoWest will not decipher/show wind direction when dead calm, as it should be.

Which is completely logical: If there's no significant wind blowing (ie calm conditions) then how can the wind be said to have any particular direction?
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #14 on: January 10, 2020, 12:08:02 PM »
I've put out an update ( https://github.com/darmbrust/weatherlink/releases/tag/1.01 ) - fixes some bugs with the charting, and issues what would happen during startup if the last stored data had no direction data for the wind.

Also improved the behavior if the weather link live was busy when it tries to read the periodic data.

Just replace the jar file you currently have, if you already have installed it.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Weather Link Live Desktop GUI
« Reply #15 on: January 12, 2020, 10:37:31 AM »
Unfortunately, the AdoptOpenJDK breaks my UniFi controller app.
I installed Java8 again (most recent download) and UniFi worked again.
This broke Weatherlink Live Desktop GUI.
Is there a way to force the WLL GUI to use the AdoptOpenJDK so I can leave the original Java for UniFi? Command line switch?
I like this WLL GUI, but I have to be able to access UniFi and update firmware, etc. I suppose I could try it on my Linux box, but I have a bunch of stuff already running on it.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline Oilswell

  • Senior Member
  • **
  • Posts: 80
Re: Weather Link Live Desktop GUI
« Reply #16 on: January 12, 2020, 12:54:54 PM »
Wow, beautiful job!

Sent from my SM-N960W using Tapatalk


Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4108
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Weather Link Live Desktop GUI
« Reply #17 on: January 13, 2020, 03:36:54 PM »
Unfortunately, the AdoptOpenJDK breaks my UniFi controller app.
I installed Java8 again (most recent download) and UniFi worked again.
This broke Weatherlink Live Desktop GUI.
Is there a way to force the WLL GUI to use the AdoptOpenJDK so I can leave the original Java for UniFi? Command line switch?
I like this WLL GUI, but I have to be able to access UniFi and update firmware, etc. I suppose I could try it on my Linux box, but I have a bunch of stuff already running on it.

Greg H.

I found out that there is an option under the .jar desktop link properties for "Opens with", and the OpenJDK Platform Binary was available. I used the "Change" button and selected the OpenJDK. Works fine, and I can still keep the original Java for UniFi.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #18 on: January 14, 2020, 12:46:46 AM »
Unfortunately, the AdoptOpenJDK breaks my UniFi controller app.
I installed Java8 again (most recent download) and UniFi worked again.
This broke Weatherlink Live Desktop GUI.
Is there a way to force the WLL GUI to use the AdoptOpenJDK so I can leave the original Java for UniFi? Command line switch?
I like this WLL GUI, but I have to be able to access UniFi and update firmware, etc. I suppose I could try it on my Linux box, but I have a bunch of stuff already running on it.

Greg H.

I found out that there is an option under the .jar desktop link properties for "Opens with", and the OpenJDK Platform Binary was available. I used the "Change" button and selected the OpenJDK. Works fine, and I can still keep the original Java for UniFi.

Greg H.

Glad you got it to work for both.
As long as you still have the JDK 11 installed somewhere, you just need to be able to launch with it.  You can make a shortcut that links to the java 11 java.exe, and pass in the jar path as a parameter, or you can even make a .bat file if you want to be really old school :)

Java 8 is essentially dead, (and its license precludes its use for anything but personal use anymore) so most new stuff wont get developed with it.  Oracle put Java on the fast train for releases after that, (9, 10 in less than a year, which no one used), and 11, which is a "long term support" release... but the amount of changes from 8 to 11 unfortunately breaks most software that was written for 8.

They are currently on Java 13, but because of their churn, most folks won't write to it, until they get to their next LTS release. 

I'll publish another version pretty soon, found some errors in the automated chart updates for the rain fall.  Harder to test here this time of year, all of our moisture is frozen...

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #19 on: January 14, 2020, 09:49:13 PM »
New version is posted again, mostly bug fixes for the rain charts.  Just replace the jar file if you already have it, otherwise, see the readme.

https://github.com/darmbrust/weatherlink

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #20 on: April 22, 2020, 03:15:56 AM »
I've made a few minor updates in the last few months - details and latest here:

https://github.com/darmbrust/weatherlink/releases/tag/1.06

Mostly bugfixes as I've noticed them - you can also now specify the IP address manually in case it can't auto-locate it (which is a problem in some home networks, depending on if/how they carry multicast DNS)

Offline grumblin

  • Member
  • *
  • Posts: 3
Re: Weather Link Live Desktop GUI
« Reply #21 on: April 24, 2020, 02:56:16 PM »
This looks fantastic.  I can't wait to try it if (ever) my Weatherlink Live ever shows up.  It's backordered, of course.

It looks like (since I don't yet have the Weatherlink Live in my hand) that you can't use use the new unit to log data to send to APRS (since it isn't connected directly to a computer with logging software).  I wonder if there's a way to do this without having to buy one of the older style loggers.

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #22 on: May 05, 2020, 10:02:50 PM »
I've never done APRS stuff, but assuming the spec is out there and available, it should be pretty trivial to have my software publish it.  I have all the data internally, I just haven't had time to do more work on the program yet to allow exporting to excel, more charting, upload to external sites, etc.

Anyone with a basic understanding of SQL and some java knowledge could extend my software to publish the data it records.

But it only records when its running on a desktop, so, likely less reliable than dedicated loggers.

Offline grumblin

  • Member
  • *
  • Posts: 3
Re: Weather Link Live Desktop GUI
« Reply #23 on: May 06, 2020, 06:06:31 PM »
OK got my Weatherlink Live finally and fired this utility up.  Incredibly well done.  Many thanks - leaving it minimized so it just keeps capturing.  [tup] [tup] [tup] [tup]

Offline darmbrust

  • Senior Member
  • **
  • Posts: 51
    • Weather Link GUI
Re: Weather Link Live Desktop GUI
« Reply #24 on: January 12, 2021, 12:27:32 AM »
[edit] tweaking to not point at a version that had a regression [edit]
Bumping my old thread to let you know I published a minor update to the app - https://github.com/darmbrust/weatherlink/releases/tag/1.12

Primary change was some updates to how data is archived - if you have been running this since my initial release, your database is likely quite large by now.  This update will trim unnecessary data, and archive old data into an archive DB.  This will fix the sluggish startup you may have been seeing, and reduce the data storage footprint. 

If you do not want the historical archive data, you can clear it.  See the readme: https://github.com/darmbrust/weatherlink/blob/1.12/README.md

If anyone is finding this useful, and would like any other enhancements - feel free to put them on github.
« Last Edit: January 14, 2021, 04:29:36 PM by darmbrust »

 

anything