Author Topic: template not updating **solved**  (Read 1425 times)

0 Members and 1 Guest are viewing this topic.

Offline hymrog

  • Senior Member
  • **
  • Posts: 52
    • Gahanna Weather
template not updating **solved**
« on: February 02, 2017, 08:22:09 PM »
Hello -

I have tried to add a couple of new templates to post additional information to my webpage.  I have updated the MBtags-template with the new data I would like to add:

wvar   rain0total-nonzerotime  last rain date
wvar   rain0total-sum60rain    rain last 60 minutes

I click the download template button on the meteobridge GUI and saved the new download and per the message, all appears to be good to go.  However, when running the dump for the MBtags the new data does not appear. 

Curious if anyone has had a similiar experience?  If so, how did you resolve?

Thanks for looking!

Greg
« Last Edit: February 19, 2017, 10:17:06 AM by docbee »

Offline wsNoordbergum

  • Contributor
  • ***
  • Posts: 135
    • wsNoordbergum
Re: template not updating
« Reply #1 on: February 07, 2017, 08:58:41 AM »
First of all I am using the leuven template.
I also added a few new tags, like temperature at 10 cm height and last rainfall etc.
First add the desired tags in tags.mb.txt like:

|lastRained|[rain0rate-nonzerotime.:--]|!

This will result in the following tag in tagsMB.txt

|lastRained|20170207105031|!

This data has to be transformed into the local date time stamp f.i. MM-DD-YYYY HH:MM -----> 02-07-2017 10:50

This is what the file tagsMB.php does:

$ws['lastRained']          = mbdate              ($wx['lastRained']);

It puts out the correct format into your template.

I think it's almost the same for saratoga.

The download button in meteobridge tells the device that the template has changed and it needs to be updated.
You should be able to see the added data on your uploaddirectory in the file tagsMB.txt on your server

goodluck
Davis Vantage Pro 2 UV/Solar
Meteobridge nano SD
Ecowitt WS90 WH40 WH31 WH57 GW2000 HP2550_c
CumulusMX/raspberry Pi 4b

Offline hymrog

  • Senior Member
  • **
  • Posts: 52
    • Gahanna Weather
Re: template not updating
« Reply #2 on: February 08, 2017, 05:35:04 PM »
Hi -

Thanks for the reply.  I am using the Saratoga templates.  So I would update the MBtags-template as such; wvar   rain0total-nonzerotime  last rain date, click the download button on the Meteobridge button and then the save button.  However when I run this, MBtags.php?sce=dump, the new tag is not there. 

I did a quick check using the th5hum-act tag downloaded the new template and saved and the tag was there as expected ran MBtags.php?sce=dump and the new tag appeared as expected.

I am thinking there may be bug either in the Meteobridge application or perhaps something with the templates.

g

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: template not updating
« Reply #3 on: February 09, 2017, 12:26:08 AM »
When you added the entries to the MBtags-template.txt file, did you use tabs to separate the entries?  It won't create the MBtags template unless tabs are used. The format is:

wvar{tab}(variablename){tab}comment{newline}

It's important to not have extra spaces and use one tab character as the field delimiter for the gen-MBtags.php generator.
I downloaded your MBtags-template.txt and corrected your additions at the bottom to have one tab separate the three fields.
Try that with gen-MBtags.php on your site.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline hymrog

  • Senior Member
  • **
  • Posts: 52
    • Gahanna Weather
Re: template not updating
« Reply #4 on: February 10, 2017, 05:17:15 AM »
Thanks, Ken. Worked like a charm. Was not using a tab before the description of the tag.

g

 

anything