Saratoga: Getting the thermometer to have the correct units and values

Issue #23 resolved
nincehelser created an issue

For the heck of it, I reinstalled the Saratoga templates from scratch. Again, the thermometer was messed up, and this is what I have to do to fix it.

The symptom is that you get Celsius values with a Fahrenheit label on the thermometer (there are other effects, too...this is just the most obvious)

To fix this, I had to modify file: ajaxWDwx.js. The line is below, and I had to change it from ./clientraw.txt to ../wx/WD/clientraw.txt to find my real clientraw.txt file.

var clientrawFile = '../wx/WD/clientraw.txt'; // location of clientraw.txt relative to this page on website

Remember to do a ctrl-f5 to make sure you refresh with the latest files.

Another effect of doing this is it changes the text and date format of the update notifications which I've mentioned in a previous issue.

Comments (10)

  1. Gary Roderick

    George, if the issue here is the location of clientraw.txt then that can be controlled through the [StdReport] section of weewx.conf. Under WD you can change the HTML_ROOT setting to whatever folder you wish. Note this will place all the weewxWD files in this folder. You shoudl be able to control the location of individual weewxWD generated files through per-report settings in skin.conf. The Weewx customization guide I think covers this. I think you will find that Greg's first idea with weewxWD was to drive WD live and from this flowed the idea to drive Carter Lake and Saratoga templates. WD was probably chosen as the folder because it was!

  2. nincehelser reporter

    It makes sense to keep the weewx-WD files consolidated in one folder.

    The issue might be Saratoga's having a quirk that can require a settings change outside of the Settings.php file. If so, it might be best left alone and documented.

  3. Fernando

    nincehelser,

    I don't have to make those changes to fix my thermometer. If I make your suggested change my template brakes.

  4. nincehelser reporter

    I suspect it might have to do with where you store the files from the WD folder.

    What's the path to your files?

  5. Fernando

    nincehelser,

    Is not. I am doing the same as you are... ../wx/WD/ <- you are going two sub dir above your file. ../www/beta/ <- this is me. It brakes as soon as I do that.

    But if I do ../beta/ it works because is no different than stating the relative path of /.

  6. nincehelser reporter

    Clear as mud.

    The way I read what you wrote, we aren't putting the WD files in the same place at all. It sounds like you are putting them all in the same folder as the Saratoga templates (everything is in beta). If you're doing that, you shouldn't have to change any settings at all and it should work fine.

    I'm putting them one directory up and two directories down relative from the Saratoga scripts. That means I also have to adjust the path in ajaxWDwx.js to match, or else I get nonsense.

    Let me put it another way.

    My Saratoga scripts are in /var/www/peru.

    My clientraw files are all in /var/www/wx/WD

  7. Gary Roderick

    Given above and recent commits is this issue sorted? Do we need to look at clientraw.txt as this is he data source or the thermometer.

  8. Fernando

    gjr,

    The gif above the Thermometer still broken... It comes and goes as the pages refreshes. Is also not showing the correct gif for the time or weather.

  9. Gary Roderick

    Saratoga thermometer units and value now correct. Other issues raised in this issue to be raised separately if the still exist. Note that missing current conditions .gif near thermometer is directly related to and will be addressed through the missing current conditions in issue #13

  10. Log in to comment