Author Topic: Meteotemplate - new free website template  (Read 641289 times)

0 Members and 3 Guests are viewing this topic.

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7125 on: June 03, 2017, 02:30:53 AM »
New leaf block now working, thanks Brian.

Jachym, if one only has say one or 2 (but one in my case) leaf wetness sensor, then the other 3 in the block are
obsolete, therefore i changed

line 87
Code: [Select]
for($i=1;$i<=4;$i++){
to

line 87
Code: [Select]
for($i=1;$i<=1;$i++){
Could something be added to the settings to turn off none needed sensors perhaps?
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7126 on: June 03, 2017, 03:29:04 AM »
Hi,
Not really because in the Api documentation and in the email I sent to all developers,  I explained how this works, each sw should only send whatever is available, the template then checks what is in the Api, otherwise you would have to disable every sensor you don't have and look on the demo how many there are, all the pollution etc. If you have one, then the Api should receive lw1 and lw1 only, in such case, no other sensor will be displayed for lw

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7127 on: June 03, 2017, 03:30:50 AM »
But i only have 1 yet all 4 displayed, albeit no data was shown for the other 3

I see what you mean, the API is saying 4, forget it asked, i will just modify the code
« Last Edit: June 03, 2017, 04:09:26 AM by Bashy »
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7128 on: June 03, 2017, 06:25:49 AM »
The problem is that if you only have one, then wd should only send lw1 and no other lws, that's how the template treats the Api data

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7129 on: June 03, 2017, 06:35:27 AM »
I just thought we would turn it on in mt like the soil block, don't we ad the depth and if we don't admit then it's not shown. But it's not a problem, I just fiddles with the block and it's showing 1, no biggy...
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7130 on: June 03, 2017, 07:56:17 AM »
No:

API documentation:
Quote
If any of the parameters are not available (sensor currently not reporting, sensor not available at all, your SW does not log this etc.), then simply omit the corresponding parameter from the URL.

The reason it is done in this way is because otherwise everything you see in the DEMO API viewer, the things supported by the api, would have to be manually disabled. Not to mention that in theory the API supports unlimited number of these extra sensors, in the blocks I limited it to 4, but I can change this, the API has unlimited number. And surely you would not want having to manually disable all the pollution, all the extra sensors, noise levels, lightning etc.

The logic is that if for example you have 3 LW sensors, there should be LW1, LW2 and LW3 in the API data and if one of them is "" then the template will show this as blank, which is again different. Not showing it at all would mean "I dont have this sensor", showing blank value means "this sensor is currently not reporting "

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7131 on: June 03, 2017, 07:59:11 AM »
That logic does not make sense, why show a sensor that has no data?
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7132 on: June 03, 2017, 08:15:58 AM »
There is IMHO a difference between no sensor and currently N/A sensor and it can tell for example you that something is wrong or the user that you have this sensor at all. But if you read the API documentation, which is exactly what was there at the beginning for the developers as well, it says that it should not be included even at situations when the sensor is inactive, so in theory such situation should not happen - all sensors sent via the API should have some data.

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7133 on: June 03, 2017, 08:19:47 AM »
OK, so you are saying,  the sensors that are not in use, should no be sent through the API, that's fine, but in this instance it is, therefore it is showing 3 extra sensor that are not in use, hence why I have changed the block to show just one, as see in my moisture block, under menu
http://Http://www.brecklandweather.com/template
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7134 on: June 03, 2017, 09:08:21 AM »
Yes, I understand why you did that and yes is also the answer to your question... SW should not be sending parameters for sensors which are N/A.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - New block/block update
« Reply #7135 on: June 03, 2017, 09:14:40 AM »
Hi guys,

New Block – France – Climate

this block allows you to choose a station in France from the MeteoFrance network and it will show you an interactive graph of long-term averages, including max/min temperature, record max/min temperature, precipitation or sunshine hours.

DEMO: http://www.meteotemplate.com/template/indexBlockDemoWide.php?block=climateFR

Block Update - High/Low U.S.

in this update I added an interactive map, which will try to reverse geocode the locations where the highs and lows were observed. Please note that this might not be 100% working, in some cases you might not see the points because the original data does not come with GPS coordinates and the template has to try to find it itself.

If you are updating this block make sure you delete the cache folder, previous cache file will not work.

DEMO: http://www.meteotemplate.com/template/indexBlockDemoNarrow.php?block=highLowUS

Enjoy



Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 656
    • Jay's Woodcrafts
Re: Meteotemplate - new free website template
« Reply #7136 on: June 03, 2017, 10:18:45 AM »
Jachym,
I installed the high/lowus block and deleted the cache but the map doesn't show.  Thoughts?  Noticed also that the calendar to select other days isn't working either.
Jay
http://www.jayswoodfurniture.com/meteo/indexDesktop.php
« Last Edit: June 03, 2017, 10:22:50 AM by jay_hoehn »
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7137 on: June 03, 2017, 10:40:43 AM »
Jachym,
I installed the high/lowus block and deleted the cache but the map doesn't show.  Thoughts?  Noticed also that the calendar to select other days isn't working either.
Jay
http://www.jayswoodfurniture.com/meteo/indexDesktop.php

Jay are you 100% sure you fully updated the block? I.e. replaced/added ALL files from the block folder? The only file you should always ignore is settings.php, but that one is not included in these packages anyway, so updating a block/plugin always means replaceing ALL files. I suspect you did not upload the other scripts that were part of this update.

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 656
    • Jay's Woodcrafts
Re: Meteotemplate - new free website template
« Reply #7138 on: June 03, 2017, 10:43:58 AM »
Did it a second time before I posted.  I would be happy to try it again if you want,  Even deleted the entire folder the second time.
Jay
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7139 on: June 03, 2017, 11:03:42 AM »
Sorry Jay, yes you are right I see the problem. Stupid copy/paste mistake and it worked on my server because I used the other block too... Just a sec

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - Block Hotfix - U.S. High/Low 3.1
« Reply #7140 on: June 03, 2017, 11:09:32 AM »
Block Hotfix - U.S. High/Low 3.1

- fixes map issue

Enjoy

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 656
    • Jay's Woodcrafts
Re: Meteotemplate - new free website template
« Reply #7141 on: June 03, 2017, 11:12:18 AM »
Thanks, Jachym.  That solved the issue.  I like the map.
Jay
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - Block Update – Netherlands – Forecast 2.0
« Reply #7142 on: June 03, 2017, 07:15:06 PM »
Block Update – Netherlands – Forecast 2.0

Hi guys,

major update of this block:

- added forecast from KNMI – in the settings you choose your desired default, thanks to Marco for his help
- icons replaced with SVGs
- added full compatibility with template v14 new features
- block optimization – despite all the new features the block size was reduced by 92%

DEMO: http://www.meteotemplate.com/template/indexBlockDemoWide.php?block=forecastNL

Enjoy

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7143 on: June 04, 2017, 05:53:25 AM »

Yes, I understand why you did that and yes is also the answer to your question... SW should not be sending parameters for sensors which are N/A.

Another thought, what about if the end user does have 4 sensors but only wants to show say sensor 1 and 3 for what ever reason they may have :) I'm just saying, wouldn't it be easier, useful to be able to turn on/off sensors, when  they have all the sensors but 1 is playing up and giving bad readings, should prefer of that 1 sensor be turned off in the template, do you see what I'm saying now?
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - Block Update / New Blocks
« Reply #7144 on: June 04, 2017, 12:34:26 PM »
Hi guys

Block Update – Greece – Radar 2.0

more info/DEMO: http://meteotemplate.com/blog/?p=2703

New Block – Greece – Current Conditions

more info/DEMO: http://meteotemplate.com/blog/?p=2705

New Block – Greece – Climate

more info/DEMO: http://meteotemplate.com/blog/?p=2707

New Block – Greece – Marine Forecast

more info/DEMO: http://meteotemplate.com/blog/?p=2709

Enjoy


Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Meteotemplate - Block Update - Leaf 2.0
« Reply #7145 on: June 04, 2017, 07:01:13 PM »
Block Update - Leaf 2.0

- added possibility to manually enable sensors or set to "auto" and the template will try to determine sensor availability automatically
- fixed a bug when LW=0

Enjoy

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7146 on: June 05, 2017, 01:48:36 AM »
Block Update - Leaf 2.0

- added possibility to manually enable sensors or set to "auto" and the template will try to determine sensor availability automatically
- fixed a bug when LW=0

Enjoy

Thank you, just tried it in auto but all four still showed up, is there a time for the script to check back to see
if there is any live data for the other sensors? sorry, didnt wait it out if there is, but the off switch works great :)
re the bug, is that the on Brian mentioned about, i.e. the font being black when at 0, background not showing,
still the same in that respect, see image please. image is when it was set to auto, gonna go back and set to
auto again and give it a few minutes....
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7147 on: June 05, 2017, 05:34:32 AM »
It would work if it was 0, but not if it is "", not sure why they still show up, but thats why the off switch is there now :D

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Meteotemplate - new free website template
« Reply #7148 on: June 05, 2017, 05:39:34 AM »
They are all zero ;)
Kind regards
Bashy

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteotemplate - new free website template
« Reply #7149 on: June 05, 2017, 05:44:42 AM »
No they are not, in the API file they are "", if they were 0 it would mean the sensor is active and showing measured 0. Those zeros are just the string converted to a number, but it is not 0 in the API file.