steelseries-gauge dont works on path ../weewx/skins/seasons WHY ?

75 views
Skip to first unread message

airbo...@gmx.de

unread,
Dec 11, 2020, 3:25:46 PM12/11/20
to weewx-user
Hi al togerther.
Please give me a little help. I#m searchong in this forum but I dont find any information for this small problem.
I worked since several years with WeeWX - and it works fine !!!  32676 Lügde, Zum Golfplatz (bschnare.de)  Now I add the SteelSeries - and it also works fine with the path ../skins/ss/...
Now I want to install one or two 'Instruments'  on to the 'first' website  (without /ss/ - you can see it in the top area. But it dont works. There is the value missing.
Where is my mistake ? Where is 'my missing link' ? 
The gauge needs the value from one file - OK. But what script-path (or so) have I add - and at which position ? Or is it more to do ?
Please give me an idea. Or an link where the same smale problem was in discussion.
Thanks a lot !!
Best wishes from good old Germany.
Bodo

gjr80

unread,
Dec 12, 2020, 6:32:55 PM12/12/20
to weewx-user
Hi,

There are a few things you need to do to add a SteelSeries gauge to a new page. They are:

1. add the necessary div tag(s) to the page HTML to placehold the gauge(s)
2. add the necessary script tags to the page HTML to call the SteelSeries javascript
3. configure the SteelSeries javascript file gauges.js

Since you have a correctly rendered (apart form current data) gauge on your page you have 1 correct (the placeholder clearly exists) and 2 correct (a gauge is rendered) and the issue is with 3.

In such cases using the browser/web console in your web browser (usually found under developer tools but name and location varies from browser to browser) while viewing the problem page will give you some clues. In this case when I view your page I see the following in the browser console:


Which tells me that indeed gauges.js cannot find gauge-data.txt. The solution is to alter the following setting in gauges.js (circa line 74):

            realTimeUrlWeewx : 'gauge-data.txt', // *** WeeWX Users: Change to your location of the gauge data file ***

and add some path info. The trick in your case, since you are using one copy of gauges.js to support the Seasons skin and ss skin, will be to add path info that works for both your Seasons and ss skins. You will need to find a suitable absolute path that works for both, perhaps something like /Wetter/ss/gauge-data.txt or /wp-content/Wetter/ss/gauge-data.txt, the correct setting depends on you web server root and its directory structure. I suggest you make the changes to gauges.js on your web server monitoring the browser/web console for both pages until you have both pages working properly. This way you make changes/test immediately rather than having to restart WeeWX and wait for a report cycle to complete. Once you have the correct setting go back to your WeeWX machine and make the appropriate changes to skins/ss/scripts/gauges.js so that your changes will not be lost on the next WeeWX restart.

Note that if you wish to have the mouseover trend graphs display on both pages as well you will have a similar issue with the following setting in gauges.js (circa line 38):

            imgPathURL : '', // *** Change this to the relative path for your 'Trend' graph images

Gary

Graham Eddy

unread,
Dec 12, 2020, 6:36:41 PM12/12/20
to weewx...@googlegroups.com
symlinks might be more manageable

airbo...@gmx.de

unread,
Dec 13, 2020, 6:06:19 AM12/13/20
to weewx-user
First of all, 
Thanks a lot to both of you for the time you spend for my question.

I will try and coming back soon to tell you.
Bodo

airbo...@gmx.de

unread,
Dec 14, 2020, 1:28:36 PM12/14/20
to weewx-user
Got it !
Garry - after you confirmed that the nessesary file named gauga-data.txt and this information is missing - I could go forwards again.
I try different pathes, but it dont like to work with me ;-)
At last I try the 'symlink' - note from Graham. I dont knew about this possibiliy on RasPi/Linux until yet.
Now it works !! One update-step later (5 min) as the 'official' update from weewx, because weewx and steelserias do both at the same time their own update.
So the gauge-data.txt-Update comes a little to late for the upload to my website. But that's OK.

Thank you for spending your time for me and for your help.
Thanks for your note to the developer tools ! I also dont knew it. Very helpfull ! Also the note to use an own develop-area for testing the correct path.
In this case I also have a hint: take first a copy from /ss/gauge-data.txt to the next higher folder, where the (weewx) index.html is located. OK - there it don‘t will be updated – but it is a good functional test. And after that use the note from Graham and take a symlink to the ss-folder. 

All the best.

Bodo

Reply all
Reply to author
Forward
0 new messages