DYI Weather template with data from Davis Weatherlink, Gemini
I have been very fond of our weather website with the Weather34 application(W34), but there is an end to everything.....
Doing an upgrade of the server it collapsed and showed a blank screen. I'm no programmer but I had to test if it was possible to update the app using ChatGPT and Gemini. Burt several hours later I gave up !!
Intro
I have put a lot of work building an interface for pulling data from Davis Weatherlink(WL) and creating a Cumulus data text file, "realtime.txt", so it could be used by W34. The data from the txt file is also used by 2 WEB-sites so in my case the backward compatibility is very important.
When creating the new WEB-site I used the old logic so the new WEB-application is retrieving the data from "realtime.txt".
Coding
To keep it simple I showed Gemini the picture from my Node-RED application, the code "cumulusdata.php" and the file specification for "realtime.txt". After some hours of dialog the above WEB-site was created and put into production.
There is no fancy way to change between languages so you have to change direct in the code to adapt to your country.
WEB server structure
Root
index.html => The application
add_on
cumulusdata.php => Retrieving data from WL and updating ”realtime.txt”
realtime.templ => Template creating a ”realtime.txt” at a new installation
realtime.txt => The data file
Code
"cumulusdata.php" is just slightly changed from the "original" and is also using the old v1 way for credentials. This is due to that I'm using old hardware that can update the data once a minute for free.
"index.html" is found here.
Remarks
The fields data[64] and data[65], water temperature/level, are not populated in the published code and this is due to that they are not served by WL.
W34 showed a lot of information and maybe it could be to much sometimes ? So this application is of the type "less is more" 😎 but on the other hand it have links in the menu to more detailed data from the weather station;

Comments
Post a Comment
Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !